Foxit PDF SDK

fs_ltvverifier.h
浏览该文件的文档.
1
14 #ifndef FS_LTVVERIFIER_H_
15 #define FS_LTVVERIFIER_H_
16
17 #include "common/fs_common.h"
18 #include "pdf/fs_pdfdoc.h"
19
25 namespace foxit {
29 namespace pdf {
31 class Response FS_FINAL : public Object{
32 public:
38 typedef enum _ResponseType {
40 e_TypeNone = 0,
42 e_TypeCRL = 1,
44 e_TypeOCSP = 2
45 } ResponseType;
46
47
55 Response(ResponseType type, const String& response_data) {
56 this->type = type;
57 this->response_data = response_data;
58 }
59
61 Response() : type(Response::e_TypeNone) {}
62
64 ~Response() {}
65
71 Response(const Response& other) {
72 type = other.type;
73 response_data = other.response_data;
74 }
75
83 Response& operator = (const Response& other) {
84 type = other.type;
85 response_data = other.response_data;
86 return *this;
87 }
88
96 bool operator == (const Response& other) const {
97 return (type == other.type && response_data == other.response_data);
98 }
99
107 bool operator != (const Response& other) const {
108 return!(*this == other);
109 }
110
120 void Set(ResponseType type, const String& response_data) {
121 this->type = type;
122 this->response_data = response_data;
123 }
124
129 ResponseType type;
130
132 String response_data;
133 };
134
136 class TimeRange FS_FINAL : public Object{
137 public:
144 TimeRange(const DateTime& start_time, const DateTime& end_time) {
145 this->start_time = start_time;
146 this->end_time = end_time;
147 }
148
150 TimeRange() {}
151
153 ~TimeRange() {}
154
160 TimeRange(const TimeRange& other) {
161 start_time = other.start_time;
162 end_time = other.end_time;
163 }
164
172 TimeRange& operator = (const TimeRange& other) {
173 start_time = other.start_time;
174 end_time = other.end_time;
175 return *this;
176 }
177
185 bool operator == (const TimeRange& other) const {
186 return (start_time == other.start_time && end_time == other.end_time);
187 }
188
196 bool operator != (const TimeRange& other) const {
197 return!(*this == other);
198 }
199
208 void Set(const DateTime& start_time, const DateTime& end_time) {
209 this->start_time = start_time;
210 this->end_time = end_time;
211 }
212
214 DateTime start_time;
216 DateTime end_time;
217 };
218
220 class CertVerifyResult FS_FINAL : public Object{
221 public:
227 typedef enum _CertStatus {
229 e_CertStatusValid = 0,
231 e_CertStatusRevoked = 1,
233 e_CertStatusExpired = 2,
235 e_CertStatusUnknown = 3
236 } CertStatus;
237
243 typedef enum _RevocationReason {
245 e_ReasonNoStatus = -1,
247 e_ReasonUnspecified = 0,
249 e_ReasonKeyCompromise = 1,
251 e_ReasonCACompromise = 2,
253 e_ReasonAffiliationChanged = 3,
255 e_ReasonSuperseded = 4,
257 e_ReasonCessationOfOperation = 5,
259 e_ReasonCertificateHold = 6,
261 e_ReasonRemoveFromCRL = 7,
263 e_ReasonPrivilegeWithDrawn = 8,
265 e_ReasonAACompromise = 9
266 } RevocationReason;
267
273 typedef enum _ResponseInfoLocation {
275 e_LocationNotSet = 0,
277 e_LocationDSS = 1,
279 e_LocationSignature = 2,
281 e_LocationOnline = 3
282 } ResponseInfoLocation;
283
284
312 CertVerifyResult(const String& cert, bool is_ca, bool is_trusted, const Response& response,
313 const TimeRange& response_effect_time_range, const DateTime& revoke_time,
314 CertStatus cert_status, RevocationReason reason,
315 const DateTime& cert_check_time,
316 bool exist_signature_vri_creation_time, const DateTime& signature_vri_creation_time,
317 bool exist_response_signature_vri_creation_time, const DateTime& response_signature_vri_creation_time,
318 ResponseInfoLocation response_info_location) {
319 this->cert = cert;
320 this->is_ca = is_ca;
321 this->is_trusted = is_trusted;
322 this->response = response;
323 this->response_effect_time_range = response_effect_time_range;
324 this->revoke_time = revoke_time;
325 this->cert_status = cert_status;
326 this->reason = reason;
327 this->cert_check_time = cert_check_time;
328 this->exist_signature_vri_creation_time = exist_signature_vri_creation_time;
329 this->signature_vri_creation_time = signature_vri_creation_time;
330 this->exist_response_signature_vri_creation_time = exist_response_signature_vri_creation_time;
331 this->response_signature_vri_creation_time = response_signature_vri_creation_time;
332 this->response_info_location = response_info_location;
333 }
334
336 CertVerifyResult()
337 : is_ca(false)
338 , is_trusted(false)
339 , cert_status(CertVerifyResult::e_CertStatusUnknown)
340 , reason(CertVerifyResult::e_ReasonNoStatus)
341 , exist_signature_vri_creation_time(false)
342 , exist_response_signature_vri_creation_time(false)
343 , response_info_location(CertVerifyResult::e_LocationNotSet) {}
344
346 ~CertVerifyResult() {}
347
353 CertVerifyResult(const CertVerifyResult& other) {
354 cert = other.cert;
355 is_ca = other.is_ca;
356 is_trusted = other.is_trusted;
357 response = other.response;
358 response_effect_time_range = other.response_effect_time_range;
359 revoke_time = other.revoke_time;
360 cert_status = other.cert_status;
361 reason = other.reason;
362 cert_check_time = other.cert_check_time;
363 exist_signature_vri_creation_time = other.exist_signature_vri_creation_time;
364 signature_vri_creation_time = other.signature_vri_creation_time;
365 exist_response_signature_vri_creation_time = other.exist_response_signature_vri_creation_time;
366 response_signature_vri_creation_time = other.response_signature_vri_creation_time;
367 response_info_location = other.response_info_location;
368 }
369
377 CertVerifyResult& operator = (const CertVerifyResult& other) {
378 cert = other.cert;
379 is_ca = other.is_ca;
380 is_trusted = other.is_trusted;
381 response = other.response;
382 response_effect_time_range = other.response_effect_time_range;
383 revoke_time = other.revoke_time;
384 cert_status = other.cert_status;
385 reason = other.reason;
386 cert_check_time = other.cert_check_time;
387 exist_signature_vri_creation_time = other.exist_signature_vri_creation_time;
388 signature_vri_creation_time = other.signature_vri_creation_time;
389 exist_response_signature_vri_creation_time = other.exist_response_signature_vri_creation_time;
390 response_signature_vri_creation_time = other.response_signature_vri_creation_time;
391 response_info_location = other.response_info_location;
392 return *this;
393 }
394
402 bool operator == (const CertVerifyResult& other) const {
403 return (cert == other.cert && is_ca == other.is_ca && is_trusted == other.is_trusted &&
404 response == other.response &&
405 response_effect_time_range == other.response_effect_time_range &&
406 revoke_time == other.revoke_time &&
407 cert_status == other.cert_status && reason == other.reason &&
408 cert_check_time == other.cert_check_time &&
409 exist_signature_vri_creation_time == other.exist_signature_vri_creation_time&&
410 signature_vri_creation_time == other.signature_vri_creation_time &&
411 exist_response_signature_vri_creation_time == other.exist_response_signature_vri_creation_time &&
412 response_signature_vri_creation_time == other.response_signature_vri_creation_time &&
413 response_info_location == other.response_info_location);
414 }
415
423 bool operator != (const CertVerifyResult& other) const {
424 return!(*this == other);
425 }
426
456 void Set(const String& cert, bool is_ca, bool is_trusted, const Response& response,
457 const TimeRange& response_effect_time_range, const DateTime& revoke_time,
458 CertStatus cert_status, RevocationReason reason,
459 const DateTime& cert_check_time,
460 bool exist_signature_vri_creation_time, const DateTime& signature_vri_creation_time,
461 bool exist_response_signature_vri_creation_time, const DateTime& response_signature_vri_creation_time,
462 ResponseInfoLocation response_info_location) {
463 this->cert = cert;
464 this->is_ca = is_ca;
465 this->is_trusted = is_trusted;
466 this->response = response;
467 this->response_effect_time_range = response_effect_time_range;
468 this->revoke_time = revoke_time;
469 this->cert_status = cert_status;
470 this->reason = reason;
471 this->cert_check_time = cert_check_time;
472 this->exist_signature_vri_creation_time = exist_signature_vri_creation_time;
473 this->signature_vri_creation_time = signature_vri_creation_time;
474 this->exist_response_signature_vri_creation_time = exist_response_signature_vri_creation_time;
475 this->response_signature_vri_creation_time = response_signature_vri_creation_time;
476 this->response_info_location = response_info_location;
477 }
478
480 String cert;
481
483 bool is_ca;
485 bool is_trusted;
487 Response response;
489 TimeRange response_effect_time_range;
491 DateTime revoke_time;
496 CertStatus cert_status;
501 RevocationReason reason;
506 DateTime cert_check_time;
508 bool exist_signature_vri_creation_time;
513 DateTime signature_vri_creation_time;
515 bool exist_response_signature_vri_creation_time;
520 DateTime response_signature_vri_creation_time;
525 ResponseInfoLocation response_info_location;
526 };
527
529 FSDK_DEFINE_ARRAY(CertVerifyResultArray, CertVerifyResult);
530
532 class CertIssuerPair FS_FINAL : public Object{
533 public:
540 CertIssuerPair(const String& cert, const String& issuer) {
541 this->cert = cert;
542 this->issuer = issuer;
543 }
544
546 CertIssuerPair() {}
547
549 ~CertIssuerPair() {}
550
556 CertIssuerPair(const CertIssuerPair& other) {
557 cert = other.cert;
558 issuer = other.issuer;
559 }
560
568 CertIssuerPair& operator = (const CertIssuerPair& other) {
569 cert = other.cert;
570 issuer = other.issuer;
571 return *this;
572 }
573
581 bool operator == (const CertIssuerPair& other) const {
582 return (cert == other.cert && issuer == other.issuer);
583 }
584
592 bool operator != (const CertIssuerPair& other) const {
593 return!(*this == other);
594 }
595
604 void Set(const String& cert, const String& issuer) {
605 this->cert = cert;
606 this->issuer = issuer;
607 }
608
610 String cert;
612 String issuer;
613 };
614
616 class RevocationArrayInfo FS_FINAL : public Object{
617 public:
624 RevocationArrayInfo(const StringArray& ocsp_array, const StringArray& crl_array) {
625 this->ocsp_array = ocsp_array;
626 this->crl_array = crl_array;
627 }
628
630 RevocationArrayInfo() {}
631
633 ~RevocationArrayInfo() {}
634
640 RevocationArrayInfo(const RevocationArrayInfo& other) {
641 ocsp_array = other.ocsp_array;
642 crl_array = other.crl_array;
643 }
644
652 RevocationArrayInfo& operator = (const RevocationArrayInfo& other) {
653 ocsp_array = other.ocsp_array;
654 crl_array = other.crl_array;
655 return *this;
656 }
657
665 bool operator == (const RevocationArrayInfo& other) const {
666 size_t ocsp_count = ocsp_array.GetSize();
667 size_t crl_count = crl_array.GetSize();
668 if (ocsp_count != other.ocsp_array.GetSize() || crl_count != crl_array.GetSize())
669 return false;
670 for (size_t i = 0; i < ocsp_count; i++) {
671 if (ocsp_array.GetAt(i) != other.ocsp_array.GetAt(i))
672 return false;
673 }
674 for (size_t i = 0; i < ocsp_count; i++) {
675 if (crl_array.GetAt(i) != other.crl_array.GetAt(i))
676 return false;
677 }
678 return true;
679 }
680
688 bool operator != (const RevocationArrayInfo& other) const {
689 return!(*this == other);
690 }
691
700 void Set(const StringArray& ocsp_array, const StringArray& crl_array) {
701 this->ocsp_array = ocsp_array;
702 this->crl_array = crl_array;
703 }
704
706 StringArray ocsp_array;
708 StringArray crl_array;
709 };
710
717 class RevocationCallback {
718 public:
724 virtual void Release() = 0;
725
736 virtual StringArray GetCertChainFromSignature(const String& signature_content) = 0;
737
748 virtual Response GetResponseOnLineForSingleCert(const CertIssuerPair& cert_issuer_pair) = 0;
749
761 virtual CertVerifyResult VerifyOCSP(const CertIssuerPair& cert_issuer_pair, const String& ocsp_data) = 0;
762
774 virtual CertVerifyResult VerifyCRL(const CertIssuerPair& cert_issuer_pair, const String& crl_data) = 0;
775
783 virtual bool IsCA(const String& cert) = 0;
784
795 virtual DateTime GetDTSTime(const String& signature_content) = 0;
796
807 virtual String GetTSTSignature(const String& signature_content) = 0;
808
820 virtual DateTime GetTSTTime(const String& signature_content) = 0;
821
833 virtual CertIssuerPair GetOCSPCertAndIssuer(const String& ocsp_data, const StringArray& trust_cert_chain) = 0;
834
846 virtual DateTime GetOCSPProducedAtTime(const String& ocsp_data) = 0;
847
855 virtual bool IsOCSPNeedCheck(const String& ocsp_data) = 0;
856
867 virtual TimeRange GetCertValidTimeRange(const String& cert) = 0;
868
879 virtual String GetOCSPSignature(const String& ocsp_data) = 0;
880
891 virtual String GetCRLSignature(const String& crl_data) = 0;
892
903 virtual RevocationArrayInfo GetRevocationInfoFromSignatureData(const String& signature_content) = 0;
904
913 virtual bool IsIssuerMatchCert(const CertIssuerPair& cert_issuer_pair) = 0;
914
915 protected:
916 ~RevocationCallback() {}
917 };
918
927 class TrustedCertStoreCallback {
928 public:
936 virtual bool IsCertTrusted(const String& cert) = 0;
937
945 virtual bool IsCertTrustedRoot(const String& cert) = 0;
946
947 };
948
958 class CertChainResolverCallback {
959 public:
969 virtual StringArray GetCertificates() = 0;
970 };
971
972 class SignatureVerifyResult;
974 FSDK_DEFINE_ARRAY(SignatureVerifyResultArray, SignatureVerifyResult)
975
976
984 class LTVVerifier FS_FINAL : public Base{
985 public:
991 typedef enum _TimeType {
993 e_SignatureCreationTime = 0,
995 e_SignatureTSTTime = 1,
997 e_CurrentTime = 2,
1002 e_VRICreationTime = 3
1003 } TimeType;
1004
1010 typedef enum _VerifyMode {
1012 e_VerifyModeAcrobat = 1
1013 } VerifyMode;
1014
1015
1031 explicit LTVVerifier(const PDFDoc& document, bool is_verify_signature, bool use_expired_tst,
1032 bool ignore_doc_info, TimeType time_type);
1033
1039 LTVVerifier(const LTVVerifier& other);
1047 LTVVerifier& operator = (const LTVVerifier& other);
1048
1056 bool operator == (const LTVVerifier& other) const;
1064 bool operator != (const LTVVerifier& other) const;
1065
1067 ~LTVVerifier();
1068
1076 bool IsEmpty() const;
1077
1088 void SetRevocationCallback(RevocationCallback* callback);
1089
1100 void SetVerifyMode(VerifyMode mode);
1101
1111 void SetTrustedCertStoreCallback(TrustedCertStoreCallback* callback);
1112
1123 SignatureVerifyResultArray Verify();
1124
1136 SignatureVerifyResultArray VerifySignature(const Signature& signature);
1137
1145 void AddDSS(const SignatureVerifyResult& signature_verify_result);
1146
1158 void SetCertChainResolverCallback(CertChainResolverCallback* callback);
1159
1160 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1161 explicit LTVVerifier(FS_HANDLE handle = NULL);
1162 };
1163
1165 class SignatureVerifyResult FS_FINAL : public Base{
1166 public:
1172 typedef enum _LTVState {
1174 e_LTVStateInactive = 0,
1176 e_LTVStateEnable = 1,
1178 e_LTVStateNotEnable = 2
1179 } LTVState;
1180
1181
1187 SignatureVerifyResult(const SignatureVerifyResult& other);
1195 SignatureVerifyResult& operator = (const SignatureVerifyResult& other);
1196
1204 bool operator == (const SignatureVerifyResult& other) const;
1212 bool operator != (const SignatureVerifyResult& other) const;
1213
1221 bool IsEmpty() const;
1222
1224 ~SignatureVerifyResult();
1225
1231 String GetSignatureName();
1237 String GetSignatureHashValue();
1244 uint32 GetSignatureState();
1251 DateTime GetSignatureCheckTime();
1258 LTVVerifier::TimeType GetSignatureCheckTimeType();
1264 LTVState GetLTVState();
1265 LTVState GetLTVState();
1266
1272 CertVerifyResultArray GetCertificateVerifyResults();
1273
1279 SignatureVerifyResultArray GetOCSPSigantureVerifyResults();
1280
1287 SignatureVerifyResult GetTSTSignatureVerifyResult();
1288
1289 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1290 explicit SignatureVerifyResult(FS_HANDLE handle = NULL);
1291
1292 };
1293
1294 } // namespace pdf
1295 } // namespace foxit
1296 #endif // FS_LTVVERIFIER_H_
1297
foxit::pdf::CertIssuerPair::Set
void Set(const String &cert, const String &issuer)
设置值。
Definition: fs_ltvverifier.h:604
foxit::pdf::RevocationCallback::Release
virtual void Release()=0
用于释放当前回调对象本身的回调函数。
foxit::pdf::RevocationCallback::GetRevocationInfoFromSignatureData
virtual RevocationArrayInfo GetRevocationInfoFromSignatureData(const String &signature_content)=0
用于从签名中获取撤销信息（数组类型）的回调函数。
foxit::pdf::CertVerifyResult::operator==
bool operator==(const CertVerifyResult &other) const
相等运算符。
Definition: fs_ltvverifier.h:402
foxit::pdf::CertVerifyResult::response_effect_time_range
TimeRange response_effect_time_range
响应生效的时间范围。
Definition: fs_ltvverifier.h:489
foxit::pdf::RevocationCallback::GetOCSPCertAndIssuer
virtual CertIssuerPair GetOCSPCertAndIssuer(const String &ocsp_data, const StringArray &trust_cert_chain)=0
用于获取 OCSP 响应的证书-颁发者对的回调函数。
foxit::pdf::CertIssuerPair::operator==
bool operator==(const CertIssuerPair &other) const
相等运算符。
Definition: fs_ltvverifier.h:581
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
foxit::pdf::CertVerifyResult::e_CertStatusUnknown
表示证书状态未知。
Definition: fs_ltvverifier.h:235
foxit::pdf::SignatureVerifyResult::LTVState
LTVState
LTV 状态枚举，指示签名是否为 LTV 签名。
Definition: fs_ltvverifier.h:1172
foxit::pdf::TimeRange::TimeRange
TimeRange()
构造函数。
Definition: fs_ltvverifier.h:150
foxit::pdf::SignatureVerifyResult::GetSignatureCheckTime
DateTime GetSignatureCheckTime()
获取实际用于检查签名的时间。
foxit::DateTime
Definition: fs_basictypes.h:482
foxit::StringArray
Definition: fs_basictypes.h:230
foxit::pdf::SignatureVerifyResult::e_LTVStateInactive
表示 LTV 未激活。
Definition: fs_ltvverifier.h:1174
foxit::StringArray::GetSize
size_t GetSize() const
获取当前数组中元素的大小。
foxit::pdf::RevocationCallback::GetCertChainFromSignature
virtual StringArray GetCertChainFromSignature(const String &signature_content)=0
用于从签名内容中获取证书链的回调函数。
foxit::pdf::SignatureVerifyResult::GetSignatureHashValue
String GetSignatureHashValue()
获取签名哈希值。
foxit::Object
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:221
foxit::pdf::CertVerifyResult::e_ReasonKeyCompromise
撤销原因：密钥泄露。
Definition: fs_ltvverifier.h:249
foxit::pdf::RevocationCallback::IsCA
virtual bool IsCA(const String &cert)=0
用于判断证书是否为 CA 证书的回调函数。
foxit::pdf::CertVerifyResult::e_LocationOnline
响应信息通过在线请求获得。
Definition: fs_ltvverifier.h:281
foxit::pdf::RevocationArrayInfo::crl_array
StringArray crl_array
CRL 响应内容数组。
Definition: fs_ltvverifier.h:708
foxit::pdf::TrustedCertStoreCallback::IsCertTrusted
virtual bool IsCertTrusted(const String &cert)=0
用于检查输入证书是否受信任的回调函数。
foxit::pdf::TimeRange::TimeRange
TimeRange(const DateTime &start_time, const DateTime &end_time)
带参数的构造函数。
Definition: fs_ltvverifier.h:144
foxit::pdf::CertVerifyResult::cert
String cert
证书内容。
Definition: fs_ltvverifier.h:480
foxit::pdf::CertVerifyResult::e_CertStatusExpired
表示证书已过期。
Definition: fs_ltvverifier.h:233
foxit::pdf::CertIssuerPair::cert
String cert
证书内容。
Definition: fs_ltvverifier.h:610
foxit::pdf::CertVerifyResult::Set
void Set(const String &cert, bool is_ca, bool is_trusted, const Response &response, const TimeRange &response_effect_time_range, const DateTime &revoke_time, CertStatus cert_status, RevocationReason reason, const DateTime &cert_check_time, bool exist_signature_vri_creation_time, const DateTime &signature_vri_creation_time, bool exist_response_signature_vri_creation_time, const DateTime &response_signature_vri_creation_time, ResponseInfoLocation response_info_location)
设置值。
Definition: fs_ltvverifier.h:456
foxit::pdf::RevocationCallback::IsOCSPNeedCheck
virtual bool IsOCSPNeedCheck(const String &ocsp_data)=0
用于获取是否需要检查 OCSP 响应的标志的回调函数。
foxit::pdf::RevocationArrayInfo::~RevocationArrayInfo
~RevocationArrayInfo()
析构函数。
Definition: fs_ltvverifier.h:633
foxit::pdf::CertVerifyResult::e_ReasonCertificateHold
撤销原因：证书暂停。
Definition: fs_ltvverifier.h:259
foxit::pdf::Response::type
ResponseType type
响应类型。请参考从 Response::e_TypeNone 开始的值， 应为这些值之一。
Definition: fs_ltvverifier.h:129
fs_common.h
通用定义和类的头文件。
foxit::pdf::RevocationCallback::GetResponseOnLineForSingleCert
virtual Response GetResponseOnLineForSingleCert(const CertIssuerPair &cert_issuer_pair)=0
用于在线获取证书响应的回调函数。
foxit::pdf::Response::operator=
Response & operator=(const Response &other)
赋值运算符。
Definition: fs_ltvverifier.h:83
foxit::pdf::SignatureVerifyResult::SignatureVerifyResult
SignatureVerifyResult(const SignatureVerifyResult &other)
带另一个签名验证结果对象的构造函数。
foxit::pdf::TimeRange::operator!=
bool operator!=(const TimeRange &other) const
不相等运算符。
Definition: fs_ltvverifier.h:196
foxit::pdf::CertVerifyResult::e_ReasonRemoveFromCRL
撤销原因：从 CRL 中移除。
Definition: fs_ltvverifier.h:261
foxit::pdf::SignatureVerifyResult::GetCertificateVerifyResults
CertVerifyResultArray GetCertificateVerifyResults()
获取证书验证结果。
foxit::pdf::CertVerifyResult::e_LocationDSS
响应信息在 DSS 字典中找到。
Definition: fs_ltvverifier.h:277
foxit::pdf::Response::e_TypeNone
无响应。
Definition: fs_ltvverifier.h:40
foxit::pdf::CertVerifyResult::e_ReasonCACompromise
撤销原因：CA 泄露。
Definition: fs_ltvverifier.h:251
foxit::pdf::TimeRange::TimeRange
TimeRange(const TimeRange &other)
带另一个时间范围对象的构造函数。
Definition: fs_ltvverifier.h:160
foxit::pdf::RevocationCallback::GetOCSPSignature
virtual String GetOCSPSignature(const String &ocsp_data)=0
用于从 OCSP 响应中获取签名内容的回调函数。
foxit::pdf::RevocationCallback::GetCRLSignature
virtual String GetCRLSignature(const String &crl_data)=0
用于从 CRL 响应中获取签名内容的回调函数。
foxit::pdf::CertVerifyResultArray
Definition: fs_ltvverifier.h:529
foxit::pdf::RevocationCallback::GetOCSPProducedAtTime
virtual DateTime GetOCSPProducedAtTime(const String &ocsp_data)=0
用于获取 OCSP 响应生成时间的回调函数。
foxit::pdf::SignatureVerifyResult::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::pdf::SignatureVerifyResultArray
Definition: fs_ltvverifier.h:974
foxit::pdf::SignatureVerifyResult::~SignatureVerifyResult
~SignatureVerifyResult()
析构函数。
foxit::pdf::TimeRange::Set
void Set(const DateTime &start_time, const DateTime &end_time)
设置值。
Definition: fs_ltvverifier.h:208
foxit::pdf::CertVerifyResult::exist_signature_vri_creation_time
bool exist_signature_vri_creation_time
指示签名的 VRI 创建时间是否存在。
Definition: fs_ltvverifier.h:508
foxit::pdf::CertVerifyResult::cert_status
CertStatus cert_status
证书状态。请参考从 CertVerifyResult::e_CertStatusValid 开始的值， 应为这些值之一。
Definition: fs_ltvverifier.h:496
foxit::pdf::CertVerifyResult::e_ReasonAffiliationChanged
撤销原因：附属关系发生变化。
Definition: fs_ltvverifier.h:253
foxit::pdf::SignatureVerifyResult::operator=
SignatureVerifyResult & operator=(const SignatureVerifyResult &other)
赋值运算符。
foxit::pdf::CertChainResolverCallback
Definition: fs_ltvverifier.h:958
foxit::pdf::TimeRange::~TimeRange
~TimeRange()
析构函数。
Definition: fs_ltvverifier.h:153
foxit::pdf::TrustedCertStoreCallback::IsCertTrustedRoot
virtual bool IsCertTrustedRoot(const String &cert)=0
用于检查输入证书是否用作受信任根的回调函数。
foxit::pdf::Response::Response
Response(const Response &other)
带另一个响应对象的构造函数。
Definition: fs_ltvverifier.h:71
foxit::pdf::CertChainResolverCallback::GetCertificates
virtual StringArray GetCertificates()=0
检索可用于完成证书链的证书数组。
foxit::pdf::RevocationCallback::GetCertValidTimeRange
virtual TimeRange GetCertValidTimeRange(const String &cert)=0
用于获取表示证书有效期的时间范围的回调函数。
foxit::pdf::TrustedCertStoreCallback
Definition: fs_ltvverifier.h:927
foxit::pdf::SignatureVerifyResult
Definition: fs_ltvverifier.h:1165
foxit::pdf::CertVerifyResult::RevocationReason
RevocationReason
证书撤销原因枚举。
Definition: fs_ltvverifier.h:243
foxit::pdf::CertVerifyResult::e_CertStatusValid
表示证书有效。
Definition: fs_ltvverifier.h:229
foxit::pdf::CertVerifyResult::signature_vri_creation_time
DateTime signature_vri_creation_time
签名的 VRI 创建时间。此时间对象的 utc_hour_offset 和 utc_minite_offset 被忽略。
Definition: fs_ltvverifier.h:513
foxit::pdf::CertVerifyResult::e_CertStatusRevoked
表示证书已被撤销。
Definition: fs_ltvverifier.h:231
foxit::pdf::Response::operator==
bool operator==(const Response &other) const
相等运算符。
Definition: fs_ltvverifier.h:96
foxit::pdf::TimeRange
Definition: fs_ltvverifier.h:136
foxit::pdf::RevocationArrayInfo::operator=
RevocationArrayInfo & operator=(const RevocationArrayInfo &other)
赋值运算符。
Definition: fs_ltvverifier.h:652
CFX_ByteString
字节字符串类
Definition: fx_string.h:317
foxit::pdf::TimeRange::start_time
DateTime start_time
当前时间范围的开始时间。
Definition: fs_ltvverifier.h:214
foxit::pdf::CertVerifyResult::~CertVerifyResult
~CertVerifyResult()
析构函数。
Definition: fs_ltvverifier.h:346
foxit::pdf::CertVerifyResult::response_signature_vri_creation_time
DateTime response_signature_vri_creation_time
响应签名的 VRI 创建时间。此时间对象的 utc_hour_offset 和 utc_minite_offset 被忽略。
Definition: fs_ltvverifier.h:520
foxit::pdf::Response::e_TypeCRL
CRL 响应。
Definition: fs_ltvverifier.h:42
foxit::pdf::CertVerifyResult::cert_check_time
DateTime cert_check_time
检查此证书有效性的实际时间。 此时间对象的 utc_hour_offset 和 utc_minite_offset 被忽略。
Definition: fs_ltvverifier.h:506
foxit::pdf::SignatureVerifyResult::GetLTVState
LTVState GetLTVState()
获取 LTV 状态，指示签名是否为 LTV 签名。
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair()
构造函数。
Definition: fs_ltvverifier.h:546
foxit::pdf::Signature
Definition: fs_signature.h:99
foxit::pdf::Response::Response
Response()
构造函数。
Definition: fs_ltvverifier.h:61
foxit::pdf::CertVerifyResult::is_trusted
bool is_trusted
指示证书是否被用户信任。
Definition: fs_ltvverifier.h:485
foxit::pdf::RevocationCallback::VerifyCRL
virtual CertVerifyResult VerifyCRL(const CertIssuerPair &cert_issuer_pair, const String &crl_data)=0
用于验证 CRL 响应是否与证书匹配并获取证书验证结果的回调函数。
foxit::pdf::SignatureVerifyResult::GetSignatureCheckTimeType
LTVVerifier::TimeType GetSignatureCheckTimeType()
获取实际用于检查签名的时间类型。
foxit::pdf::Response::response_data
String response_data
响应内容。
Definition: fs_ltvverifier.h:132
foxit::pdf::CertVerifyResult::is_ca
bool is_ca
指示证书是否为 CA 证书。
Definition: fs_ltvverifier.h:483
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair(const String &cert, const String &issuer)
带参数的构造函数。
Definition: fs_ltvverifier.h:540
operator==
bool operator==(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否相等。
Definition: fs_basictypes.h:128
foxit::pdf::Response::Set
void Set(ResponseType type, const String &response_data)
设置值。
Definition: fs_ltvverifier.h:120
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair(const CertIssuerPair &other)
带另一个证书-颁发者对对象的构造函数。
Definition: fs_ltvverifier.h:556
foxit::pdf::CertVerifyResult::operator=
CertVerifyResult & operator=(const CertVerifyResult &other)
赋值运算符。
Definition: fs_ltvverifier.h:377
foxit::pdf::SignatureVerifyResult::GetOCSPSigantureVerifyResults
SignatureVerifyResultArray GetOCSPSigantureVerifyResults()
获取每个证书的 OCSP 签名的签名验证结果。
foxit::pdf::SignatureVerifyResult::GetTSTSignatureVerifyResult
SignatureVerifyResult GetTSTSignatureVerifyResult()
获取此签名的时间戳令牌的验证结果。
foxit::pdf::SignatureVerifyResult::operator==
bool operator==(const SignatureVerifyResult &other) const
相等运算符。
foxit::pdf::CertVerifyResult::CertVerifyResult
CertVerifyResult()
构造函数。
Definition: fs_ltvverifier.h:336
foxit::StringArray::GetAt
String GetAt(size_t index) const
检索当前数组中由索引指定位置的元素副本。
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::pdf::CertVerifyResult::CertVerifyResult
CertVerifyResult(const CertVerifyResult &other)
带另一个证书验证结果对象的构造函数。
Definition: fs_ltvverifier.h:353
foxit::pdf::RevocationCallback::GetTSTTime
virtual DateTime GetTSTTime(const String &signature_content)=0
用于从签名内容中获取时间戳令牌时间的回调函数。
foxit::pdf::CertVerifyResult::CertStatus
CertStatus
证书状态枚举。
Definition: fs_ltvverifier.h:227
foxit::pdf::RevocationCallback
Definition: fs_ltvverifier.h:717
foxit::pdf::CertVerifyResult::e_ReasonNoStatus
撤销原因：证书无状态。
Definition: fs_ltvverifier.h:245
foxit::pdf::RevocationArrayInfo::Set
void Set(const StringArray &ocsp_array, const StringArray &crl_array)
设置值。
Definition: fs_ltvverifier.h:700
foxit::pdf::RevocationCallback::IsIssuerMatchCert
virtual bool IsIssuerMatchCert(const CertIssuerPair &cert_issuer_pair)=0
用于检查颁发者是否与证书匹配的回调函数。
operator!=
bool operator!=(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否不相等。
Definition: fs_basictypes.h:140
foxit::pdf::Response
Definition: fs_ltvverifier.h:31
foxit::pdf::RevocationArrayInfo
Definition: fs_ltvverifier.h:616
fs_pdfdoc.h
PDF文档相关定义和类的头文件。
foxit::pdf::CertVerifyResult::reason
RevocationReason reason
证书的撤销原因。请参考从 CertVerifyResult::e_ReasonNoStatus 开始的值， 应为这些值之一。
Definition: fs_ltvverifier.h:501
foxit::pdf::CertIssuerPair
Definition: fs_ltvverifier.h:532
foxit::pdf::Response::Response
Response(ResponseType type, const String &response_data)
带参数的构造函数。
Definition: fs_ltvverifier.h:55
foxit::pdf::TimeRange::operator=
TimeRange & operator=(const TimeRange &other)
赋值运算符。
Definition: fs_ltvverifier.h:172
foxit::pdf::CertIssuerPair::~CertIssuerPair
~CertIssuerPair()
析构函数。
Definition: fs_ltvverifier.h:549
NULL
#define NULL
空指针值。
Definition: fx_system.h:792
foxit::pdf::CertVerifyResult::e_ReasonPrivilegeWithDrawn
撤销原因：特权被撤销。
Definition: fs_ltvverifier.h:263
foxit::pdf::TimeRange::end_time
DateTime end_time
当前时间范围的结束时间。
Definition: fs_ltvverifier.h:216
foxit::pdf::CertVerifyResult::response
Response response
证书的响应。
Definition: fs_ltvverifier.h:487
foxit::pdf::SignatureVerifyResult::e_LTVStateEnable
表示 LTV 已启用。
Definition: fs_ltvverifier.h:1176
foxit::pdf::CertVerifyResult::e_LocationSignature
响应信息在签名内容中找到。
Definition: fs_ltvverifier.h:279
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo()
构造函数。
Definition: fs_ltvverifier.h:630
foxit::pdf::SignatureVerifyResult::GetSignatureName
String GetSignatureName()
获取签名名称。
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:771
foxit::pdf::CertVerifyResult::revoke_time
DateTime revoke_time
从响应中获得的撤销时间。
Definition: fs_ltvverifier.h:491
foxit::pdf::Response::~Response
~Response()
析构函数。
Definition: fs_ltvverifier.h:64
foxit::pdf::RevocationArrayInfo::ocsp_array
StringArray ocsp_array
OCSP 响应内容数组。
Definition: fs_ltvverifier.h:706
foxit::pdf::CertVerifyResult::e_ReasonUnspecified
撤销原因：未指定原因。
Definition: fs_ltvverifier.h:247
foxit::pdf::Response::operator!=
bool operator!=(const Response &other) const
不相等运算符。
Definition: fs_ltvverifier.h:107
foxit::pdf::CertVerifyResult::operator!=
bool operator!=(const CertVerifyResult &other) const
不相等运算符。
Definition: fs_ltvverifier.h:423
foxit::pdf::RevocationCallback::VerifyOCSP
virtual CertVerifyResult VerifyOCSP(const CertIssuerPair &cert_issuer_pair, const String &ocsp_data)=0
用于验证 OCSP 响应是否与证书匹配并获取证书验证结果的回调函数。
foxit::pdf::CertVerifyResult::exist_response_signature_vri_creation_time
bool exist_response_signature_vri_creation_time
指示响应签名的 VRI 创建时间是否存在。
Definition: fs_ltvverifier.h:515
foxit::pdf::SignatureVerifyResult::GetSignatureState
uint32 GetSignatureState()
获取签名状态。
foxit::pdf::CertIssuerPair::operator=
CertIssuerPair & operator=(const CertIssuerPair &other)
赋值运算符。
Definition: fs_ltvverifier.h:568
foxit::pdf::LTVVerifier::TimeType
TimeType
时间类型枚举。
Definition: fs_ltvverifier.h:991
foxit::pdf::CertVerifyResult::e_ReasonSuperseded
撤销原因：已被替代。
Definition: fs_ltvverifier.h:255
foxit::pdf::CertVerifyResult::response_info_location
ResponseInfoLocation response_info_location
响应信息（作为撤销信息）的位置，可在此位置找到证书响应。 请参考从 CertVerifyResult::e_LocationNotSet 开始的值， 应为这些值之一。
Definition: fs_ltvverifier.h:525
foxit::pdf::CertIssuerPair::issuer
String issuer
证书的颁发者。
Definition: fs_ltvverifier.h:612
foxit::pdf::CertVerifyResult::CertVerifyResult
CertVerifyResult(const String &cert, bool is_ca, bool is_trusted, const Response &response, const TimeRange &response_effect_time_range, const DateTime &revoke_time, CertStatus cert_status, RevocationReason reason, const DateTime &cert_check_time, bool exist_signature_vri_creation_time, const DateTime &signature_vri_creation_time, bool exist_response_signature_vri_creation_time, const DateTime &response_signature_vri_creation_time, ResponseInfoLocation response_info_location)
带参数的构造函数。
Definition: fs_ltvverifier.h:312
foxit::pdf::RevocationCallback::GetDTSTime
virtual DateTime GetDTSTime(const String &signature_content)=0
用于从签名内容中获取 DTS（文档时间戳签名）时间的回调函数。
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo(const StringArray &ocsp_array, const StringArray &crl_array)
带参数的构造函数。
Definition: fs_ltvverifier.h:624
foxit::pdf::CertVerifyResult::e_ReasonCessationOfOperation
撤销原因：停止操作。
Definition: fs_ltvverifier.h:257
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo(const RevocationArrayInfo &other)
带另一个撤销数组信息对象的构造函数。
Definition: fs_ltvverifier.h:640
foxit::pdf::CertVerifyResult::ResponseInfoLocation
ResponseInfoLocation
响应信息位置枚举。
Definition: fs_ltvverifier.h:273
foxit::pdf::TimeRange::operator==
bool operator==(const TimeRange &other) const
相等运算符。
Definition: fs_ltvverifier.h:185
foxit::pdf::LTVVerifier
Definition: fs_ltvverifier.h:984
foxit::pdf::SignatureVerifyResult::e_LTVStateNotEnable
表示 LTV 未启用。
Definition: fs_ltvverifier.h:1178
foxit::pdf::RevocationArrayInfo::operator==
bool operator==(const RevocationArrayInfo &other) const
相等运算符。
Definition: fs_ltvverifier.h:665
foxit::pdf::CertVerifyResult::e_LocationNotSet
位置未设置。
Definition: fs_ltvverifier.h:275
foxit::uint32
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
foxit::pdf::RevocationArrayInfo::operator!=
bool operator!=(const RevocationArrayInfo &other) const
不相等运算符。
Definition: fs_ltvverifier.h:688
foxit::Base
Definition: fs_basictypes.h:449
foxit::pdf::CertVerifyResult::e_ReasonAACompromise
撤销原因：AA 泄露。
Definition: fs_ltvverifier.h:265
foxit::pdf::CertIssuerPair::operator!=
bool operator!=(const CertIssuerPair &other) const
不相等运算符。
Definition: fs_ltvverifier.h:592
foxit::pdf::RevocationCallback::GetTSTSignature
virtual String GetTSTSignature(const String &signature_content)=0
用于从签名内容中获取时间戳令牌内容的回调函数。
foxit::pdf::SignatureVerifyResult::operator!=
bool operator!=(const SignatureVerifyResult &other) const
不相等运算符。
foxit::pdf::Response::ResponseType
ResponseType
响应类型枚举。
Definition: fs_ltvverifier.h:38
foxit::pdf::CertVerifyResult
Definition: fs_ltvverifier.h:220
foxit::pdf::Response::e_TypeOCSP
OCSP 响应。
Definition: fs_ltvverifier.h:44