Foxit PDF SDK

fs_ltvverifier.h
Go to the documentation of this file.
1
15 #ifndef FS_LTVVERIFIER_H_
16 #define FS_LTVVERIFIER_H_
17
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20
26 namespace foxit {
30 namespace pdf {
32 class Response FS_FINAL : public Object{
33 public:
39 typedef enum _ResponseType {
41 e_TypeNone = 0,
43 e_TypeCRL = 1,
45 e_TypeOCSP = 2
46 } ResponseType;
47
48
56 Response(ResponseType type, const String& response_data) {
57 this->type = type;
58 this->response_data = response_data;
59 }
60
62 Response() : type(Response::e_TypeNone) {}
63
65 ~Response() {}
66
72 Response(const Response& other) {
73 type = other.type;
74 response_data = other.response_data;
75 }
76
84 Response& operator = (const Response& other) {
85 type = other.type;
86 response_data = other.response_data;
87 return *this;
88 }
89
97 bool operator == (const Response& other) const {
98 return (type == other.type && response_data == other.response_data);
99 }
100
108 bool operator != (const Response& other) const {
109 return!(*this == other);
110 }
111
121 void Set(ResponseType type, const String& response_data) {
122 this->type = type;
123 this->response_data = response_data;
124 }
125
130 ResponseType type;
131
133 String response_data;
134 };
135
137 class TimeRange FS_FINAL : public Object{
138 public:
145 TimeRange(const DateTime& start_time, const DateTime& end_time) {
146 this->start_time = start_time;
147 this->end_time = end_time;
148 }
149
151 TimeRange() {}
152
154 ~TimeRange() {}
155
161 TimeRange(const TimeRange& other) {
162 start_time = other.start_time;
163 end_time = other.end_time;
164 }
165
173 TimeRange& operator = (const TimeRange& other) {
174 start_time = other.start_time;
175 end_time = other.end_time;
176 return *this;
177 }
178
186 bool operator == (const TimeRange& other) const {
187 return (start_time == other.start_time && end_time == other.end_time);
188 }
189
197 bool operator != (const TimeRange& other) const {
198 return!(*this == other);
199 }
200
209 void Set(const DateTime& start_time, const DateTime& end_time) {
210 this->start_time = start_time;
211 this->end_time = end_time;
212 }
213
215 DateTime start_time;
217 DateTime end_time;
218 };
219
221 class CertVerifyResult FS_FINAL : public Object{
222 public:
228 typedef enum _CertStatus {
230 e_CertStatusValid = 0,
232 e_CertStatusRevoked = 1,
234 e_CertStatusExpired = 2,
236 e_CertStatusUnknown = 3
237 } CertStatus;
238
244 typedef enum _RevocationReason {
246 e_ReasonNoStatus = -1,
248 e_ReasonUnspecified = 0,
250 e_ReasonKeyCompromise = 1,
252 e_ReasonCACompromise = 2,
254 e_ReasonAffiliationChanged = 3,
256 e_ReasonSuperseded = 4,
258 e_ReasonCessationOfOperation = 5,
260 e_ReasonCertificateHold = 6,
262 e_ReasonRemoveFromCRL = 7,
264 e_ReasonPrivilegeWithDrawn = 8,
266 e_ReasonAACompromise = 9
267 } RevocationReason;
268
274 typedef enum _ResponseInfoLocation {
276 e_LocationNotSet = 0,
278 e_LocationDSS = 1,
280 e_LocationSignature = 2,
282 e_LocationOnline = 3
283 } ResponseInfoLocation;
284
285
313 CertVerifyResult(const String& cert, bool is_ca, bool is_trusted, const Response& response,
314 const TimeRange& response_effect_time_range, const DateTime& revoke_time,
315 CertStatus cert_status, RevocationReason reason,
316 const DateTime& cert_check_time,
317 bool exist_signature_vri_creation_time, const DateTime& signature_vri_creation_time,
318 bool exist_response_signature_vri_creation_time, const DateTime& response_signature_vri_creation_time,
319 ResponseInfoLocation response_info_location) {
320 this->cert = cert;
321 this->is_ca = is_ca;
322 this->is_trusted = is_trusted;
323 this->response = response;
324 this->response_effect_time_range = response_effect_time_range;
325 this->revoke_time = revoke_time;
326 this->cert_status = cert_status;
327 this->reason = reason;
328 this->cert_check_time = cert_check_time;
329 this->exist_signature_vri_creation_time = exist_signature_vri_creation_time;
330 this->signature_vri_creation_time = signature_vri_creation_time;
331 this->exist_response_signature_vri_creation_time = exist_response_signature_vri_creation_time;
332 this->response_signature_vri_creation_time = response_signature_vri_creation_time;
333 this->response_info_location = response_info_location;
334 }
335
337 CertVerifyResult()
338 : is_ca(false)
339 , is_trusted(false)
340 , cert_status(CertVerifyResult::e_CertStatusUnknown)
341 , reason(CertVerifyResult::e_ReasonNoStatus)
342 , exist_signature_vri_creation_time(false)
343 , exist_response_signature_vri_creation_time(false)
344 , response_info_location(CertVerifyResult::e_LocationNotSet) {}
345
347 ~CertVerifyResult() {}
348
354 CertVerifyResult(const CertVerifyResult& other) {
355 cert = other.cert;
356 is_ca = other.is_ca;
357 is_trusted = other.is_trusted;
358 response = other.response;
359 response_effect_time_range = other.response_effect_time_range;
360 revoke_time = other.revoke_time;
361 cert_status = other.cert_status;
362 reason = other.reason;
363 cert_check_time = other.cert_check_time;
364 exist_signature_vri_creation_time = other.exist_signature_vri_creation_time;
365 signature_vri_creation_time = other.signature_vri_creation_time;
366 exist_response_signature_vri_creation_time = other.exist_response_signature_vri_creation_time;
367 response_signature_vri_creation_time = other.response_signature_vri_creation_time;
368 response_info_location = other.response_info_location;
369 }
370
378 CertVerifyResult& operator = (const CertVerifyResult& other) {
379 cert = other.cert;
380 is_ca = other.is_ca;
381 is_trusted = other.is_trusted;
382 response = other.response;
383 response_effect_time_range = other.response_effect_time_range;
384 revoke_time = other.revoke_time;
385 cert_status = other.cert_status;
386 reason = other.reason;
387 cert_check_time = other.cert_check_time;
388 exist_signature_vri_creation_time = other.exist_signature_vri_creation_time;
389 signature_vri_creation_time = other.signature_vri_creation_time;
390 exist_response_signature_vri_creation_time = other.exist_response_signature_vri_creation_time;
391 response_signature_vri_creation_time = other.response_signature_vri_creation_time;
392 response_info_location = other.response_info_location;
393 return *this;
394 }
395
403 bool operator == (const CertVerifyResult& other) const {
404 return (cert == other.cert && is_ca == other.is_ca && is_trusted == other.is_trusted &&
405 response == other.response &&
406 response_effect_time_range == other.response_effect_time_range &&
407 revoke_time == other.revoke_time &&
408 cert_status == other.cert_status && reason == other.reason &&
409 cert_check_time == other.cert_check_time &&
410 exist_signature_vri_creation_time == other.exist_signature_vri_creation_time&&
411 signature_vri_creation_time == other.signature_vri_creation_time &&
412 exist_response_signature_vri_creation_time == other.exist_response_signature_vri_creation_time &&
413 response_signature_vri_creation_time == other.response_signature_vri_creation_time &&
414 response_info_location == other.response_info_location);
415 }
416
424 bool operator != (const CertVerifyResult& other) const {
425 return!(*this == other);
426 }
427
457 void Set(const String& cert, bool is_ca, bool is_trusted, const Response& response,
458 const TimeRange& response_effect_time_range, const DateTime& revoke_time,
459 CertStatus cert_status, RevocationReason reason,
460 const DateTime& cert_check_time,
461 bool exist_signature_vri_creation_time, const DateTime& signature_vri_creation_time,
462 bool exist_response_signature_vri_creation_time, const DateTime& response_signature_vri_creation_time,
463 ResponseInfoLocation response_info_location) {
464 this->cert = cert;
465 this->is_ca = is_ca;
466 this->is_trusted = is_trusted;
467 this->response = response;
468 this->response_effect_time_range = response_effect_time_range;
469 this->revoke_time = revoke_time;
470 this->cert_status = cert_status;
471 this->reason = reason;
472 this->cert_check_time = cert_check_time;
473 this->exist_signature_vri_creation_time = exist_signature_vri_creation_time;
474 this->signature_vri_creation_time = signature_vri_creation_time;
475 this->exist_response_signature_vri_creation_time = exist_response_signature_vri_creation_time;
476 this->response_signature_vri_creation_time = response_signature_vri_creation_time;
477 this->response_info_location = response_info_location;
478 }
479
481 String cert;
482
484 bool is_ca;
486 bool is_trusted;
488 Response response;
490 TimeRange response_effect_time_range;
492 DateTime revoke_time;
498 CertStatus cert_status;
504 RevocationReason reason;
509 DateTime cert_check_time;
511 bool exist_signature_vri_creation_time;
516 DateTime signature_vri_creation_time;
518 bool exist_response_signature_vri_creation_time;
523 DateTime response_signature_vri_creation_time;
528 ResponseInfoLocation response_info_location;
529 };
530
532 FSDK_DEFINE_ARRAY(CertVerifyResultArray, CertVerifyResult);
533
535 class CertIssuerPair FS_FINAL : public Object{
536 public:
543 CertIssuerPair(const String& cert, const String& issuer) {
544 this->cert = cert;
545 this->issuer = issuer;
546 }
547
549 CertIssuerPair() {}
550
552 ~CertIssuerPair() {}
553
559 CertIssuerPair(const CertIssuerPair& other) {
560 cert = other.cert;
561 issuer = other.issuer;
562 }
563
571 CertIssuerPair& operator = (const CertIssuerPair& other) {
572 cert = other.cert;
573 issuer = other.issuer;
574 return *this;
575 }
576
584 bool operator == (const CertIssuerPair& other) const {
585 return (cert == other.cert && issuer == other.issuer);
586 }
587
595 bool operator != (const CertIssuerPair& other) const {
596 return!(*this == other);
597 }
598
607 void Set(const String& cert, const String& issuer) {
608 this->cert = cert;
609 this->issuer = issuer;
610 }
611
613 String cert;
615 String issuer;
616 };
617
619 class RevocationArrayInfo FS_FINAL : public Object{
620 public:
627 RevocationArrayInfo(const StringArray& ocsp_array, const StringArray& crl_array) {
628 this->ocsp_array = ocsp_array;
629 this->crl_array = crl_array;
630 }
631
633 RevocationArrayInfo() {}
634
636 ~RevocationArrayInfo() {}
637
643 RevocationArrayInfo(const RevocationArrayInfo& other) {
644 ocsp_array = other.ocsp_array;
645 crl_array = other.crl_array;
646 }
647
655 RevocationArrayInfo& operator = (const RevocationArrayInfo& other) {
656 ocsp_array = other.ocsp_array;
657 crl_array = other.crl_array;
658 return *this;
659 }
660
668 bool operator == (const RevocationArrayInfo& other) const {
669 size_t ocsp_count = ocsp_array.GetSize();
670 size_t crl_count = crl_array.GetSize();
671 if (ocsp_count != other.ocsp_array.GetSize() || crl_count != crl_array.GetSize())
672 return false;
673 for (size_t i = 0; i < ocsp_count; i++) {
674 if (ocsp_array.GetAt(i) != other.ocsp_array.GetAt(i))
675 return false;
676 }
677 for (size_t i = 0; i < ocsp_count; i++) {
678 if (crl_array.GetAt(i) != other.crl_array.GetAt(i))
679 return false;
680 }
681 return true;
682 }
683
691 bool operator != (const RevocationArrayInfo& other) const {
692 return!(*this == other);
693 }
694
703 void Set(const StringArray& ocsp_array, const StringArray& crl_array) {
704 this->ocsp_array = ocsp_array;
705 this->crl_array = crl_array;
706 }
707
709 StringArray ocsp_array;
711 StringArray crl_array;
712 };
713
720 class RevocationCallback {
721 public:
727 virtual void Release() = 0;
728
739 virtual StringArray GetCertChainFromSignature(const String& signature_content) = 0;
740
751 virtual Response GetResponseOnLineForSingleCert(const CertIssuerPair& cert_issuer_pair) = 0;
752
765 virtual CertVerifyResult VerifyOCSP(const CertIssuerPair& cert_issuer_pair, const String& ocsp_data) = 0;
766
779 virtual CertVerifyResult VerifyCRL(const CertIssuerPair& cert_issuer_pair, const String& crl_data) = 0;
780
788 virtual bool IsCA(const String& cert) = 0;
789
800 virtual DateTime GetDTSTime(const String& signature_content) = 0;
801
812 virtual String GetTSTSignature(const String& signature_content) = 0;
813
825 virtual DateTime GetTSTTime(const String& signature_content) = 0;
826
838 virtual CertIssuerPair GetOCSPCertAndIssuer(const String& ocsp_data, const StringArray& trust_cert_chain) = 0;
839
851 virtual DateTime GetOCSPProducedAtTime(const String& ocsp_data) = 0;
852
860 virtual bool IsOCSPNeedCheck(const String& ocsp_data) = 0;
861
872 virtual TimeRange GetCertValidTimeRange(const String& cert) = 0;
873
884 virtual String GetOCSPSignature(const String& ocsp_data) = 0;
885
896 virtual String GetCRLSignature(const String& crl_data) = 0;
897
908 virtual RevocationArrayInfo GetRevocationInfoFromSignatureData(const String& signature_content) = 0;
909
918 virtual bool IsIssuerMatchCert(const CertIssuerPair& cert_issuer_pair) = 0;
919
920 protected:
921 ~RevocationCallback() {}
922 };
923
932 class TrustedCertStoreCallback {
933 public:
941 virtual bool IsCertTrusted(const String& cert) = 0;
942
950 virtual bool IsCertTrustedRoot(const String& cert) = 0;
951
952 };
953
963 class CertChainResolverCallback {
964 public:
974 virtual StringArray GetCertificates() = 0;
975 };
976
977 class SignatureVerifyResult;
979 FSDK_DEFINE_ARRAY(SignatureVerifyResultArray, SignatureVerifyResult)
980
981
989 class LTVVerifier FS_FINAL : public Base{
990 public:
996 typedef enum _TimeType {
998 e_SignatureCreationTime = 0,
1000 e_SignatureTSTTime = 1,
1002 e_CurrentTime = 2,
1007 e_VRICreationTime = 3
1008 } TimeType;
1009
1015 typedef enum _VerifyMode {
1017 e_VerifyModeAcrobat = 1
1018 } VerifyMode;
1019
1020
1036 explicit LTVVerifier(const PDFDoc& document, bool is_verify_signature, bool use_expired_tst,
1037 bool ignore_doc_info, TimeType time_type);
1038
1044 LTVVerifier(const LTVVerifier& other);
1052 LTVVerifier& operator = (const LTVVerifier& other);
1053
1061 bool operator == (const LTVVerifier& other) const;
1069 bool operator != (const LTVVerifier& other) const;
1070
1072 ~LTVVerifier();
1073
1081 bool IsEmpty() const;
1082
1093 void SetRevocationCallback(RevocationCallback* callback);
1094
1105 void SetVerifyMode(VerifyMode mode);
1106
1116 void SetTrustedCertStoreCallback(TrustedCertStoreCallback* callback);
1117
1129 SignatureVerifyResultArray Verify();
1130
1142 SignatureVerifyResultArray VerifySignature(const Signature& signature);
1143
1151 void AddDSS(const SignatureVerifyResult& signature_verify_result);
1152
1164 void SetCertChainResolverCallback(CertChainResolverCallback* callback);
1165
1166 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1167 explicit LTVVerifier(FS_HANDLE handle = NULL);
1168 };
1169
1171 class SignatureVerifyResult FS_FINAL : public Base{
1172 public:
1178 typedef enum _LTVState {
1180 e_LTVStateInactive = 0,
1182 e_LTVStateEnable = 1,
1184 e_LTVStateNotEnable = 2
1185 } LTVState;
1186
1187
1193 SignatureVerifyResult(const SignatureVerifyResult& other);
1201 SignatureVerifyResult& operator = (const SignatureVerifyResult& other);
1202
1210 bool operator == (const SignatureVerifyResult& other) const;
1218 bool operator != (const SignatureVerifyResult& other) const;
1219
1227 bool IsEmpty() const;
1228
1230 ~SignatureVerifyResult();
1231
1237 String GetSignatureName();
1243 String GetSignatureHashValue();
1250 uint32 GetSignatureState();
1257 DateTime GetSignatureCheckTime();
1265 LTVVerifier::TimeType GetSignatureCheckTimeType();
1271 LTVState GetLTVState();
1272
1278 CertVerifyResultArray GetCertificateVerifyResults();
1279
1285 SignatureVerifyResultArray GetOCSPSigantureVerifyResults();
1286
1293 SignatureVerifyResult GetTSTSignatureVerifyResult();
1294
1295 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1296 explicit SignatureVerifyResult(FS_HANDLE handle = NULL);
1297
1298 };
1299
1300 } // namespace pdf
1301 } // namespace foxit
1302 #endif // FS_LTVVERIFIER_H_
1303
foxit::pdf::CertIssuerPair::Set
void Set(const String &cert, const String &issuer)
Set value.
Definition: fs_ltvverifier.h:607
foxit::pdf::RevocationCallback::Release
virtual void Release()=0
A callback function used to release current callback object itself.
foxit::pdf::RevocationCallback::GetRevocationInfoFromSignatureData
virtual RevocationArrayInfo GetRevocationInfoFromSignatureData(const String &signature_content)=0
A callback function used to get the revocation information (in array type) from a signature.
foxit::pdf::CertVerifyResult::operator==
bool operator==(const CertVerifyResult &other) const
Equal operator.
Definition: fs_ltvverifier.h:403
foxit::pdf::CertVerifyResult::response_effect_time_range
TimeRange response_effect_time_range
The time range when the response takes effect.
Definition: fs_ltvverifier.h:490
foxit::pdf::RevocationCallback::GetOCSPCertAndIssuer
virtual CertIssuerPair GetOCSPCertAndIssuer(const String &ocsp_data, const StringArray &trust_cert_chain)=0
A callback function used to get the cert-issuer pair of OCSP response.
foxit::pdf::CertIssuerPair::operator==
bool operator==(const CertIssuerPair &other) const
Equal operator.
Definition: fs_ltvverifier.h:584
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::CertVerifyResult::e_CertStatusUnknown
This means certificate status is unknown.
Definition: fs_ltvverifier.h:236
foxit::pdf::SignatureVerifyResult::LTVState
LTVState
Enumeration for LTV state that indicates if a signature is a LTV signature.
Definition: fs_ltvverifier.h:1178
foxit::pdf::TimeRange::TimeRange
TimeRange()
Constructor.
Definition: fs_ltvverifier.h:151
foxit::pdf::SignatureVerifyResult::GetSignatureCheckTime
DateTime GetSignatureCheckTime()
Get the time that is actually used to check signature.
foxit::DateTime
Definition: fs_basictypes.h:484
foxit::StringArray
Definition: fs_basictypes.h:229
foxit::pdf::SignatureVerifyResult::e_LTVStateInactive
This means LTV is inactive.
Definition: fs_ltvverifier.h:1180
foxit::StringArray::GetSize
size_t GetSize() const
Get the size of elements in current array.
foxit::pdf::RevocationCallback::GetCertChainFromSignature
virtual StringArray GetCertChainFromSignature(const String &signature_content)=0
A callback function used to get the cert chain from the signature content.
foxit::pdf::SignatureVerifyResult::GetSignatureHashValue
String GetSignatureHashValue()
Get signature hash value.
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::pdf::CertVerifyResult::e_ReasonKeyCompromise
Revocatoin reason: key compromise.
Definition: fs_ltvverifier.h:250
foxit::pdf::RevocationCallback::IsCA
virtual bool IsCA(const String &cert)=0
A callback function used to judge whether a certificate is a CA certificate.
foxit::pdf::CertVerifyResult::e_LocationOnline
Response information is got by online request.
Definition: fs_ltvverifier.h:282
foxit::pdf::RevocationArrayInfo::crl_array
StringArray crl_array
An array of CRL response content.
Definition: fs_ltvverifier.h:711
foxit::pdf::TrustedCertStoreCallback::IsCertTrusted
virtual bool IsCertTrusted(const String &cert)=0
A callback function used to check if input certificate is trusted.
foxit::pdf::TimeRange::TimeRange
TimeRange(const DateTime &start_time, const DateTime &end_time)
Constructor, with parameters.
Definition: fs_ltvverifier.h:145
foxit::pdf::CertVerifyResult::cert
String cert
A certificate contnet.
Definition: fs_ltvverifier.h:481
foxit::pdf::CertVerifyResult::e_CertStatusExpired
This means certificate is expired.
Definition: fs_ltvverifier.h:234
foxit::pdf::CertIssuerPair::cert
String cert
Certificate content.
Definition: fs_ltvverifier.h:613
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)
Set value.
Definition: fs_ltvverifier.h:457
foxit::pdf::RevocationCallback::IsOCSPNeedCheck
virtual bool IsOCSPNeedCheck(const String &ocsp_data)=0
A callback function used to get flag which decides if need to check OCSP response.
foxit::pdf::RevocationArrayInfo::~RevocationArrayInfo
~RevocationArrayInfo()
Destructor.
Definition: fs_ltvverifier.h:636
foxit::pdf::CertVerifyResult::e_ReasonCertificateHold
Revocatoin reason: certificate hold.
Definition: fs_ltvverifier.h:260
foxit::pdf::Response::type
ResponseType type
Response type. Please refer to values starting from Response::e_TypeNone and this should be one of th...
Definition: fs_ltvverifier.h:130
fs_common.h
Header file for common definitions and classes.
foxit::pdf::RevocationCallback::GetResponseOnLineForSingleCert
virtual Response GetResponseOnLineForSingleCert(const CertIssuerPair &cert_issuer_pair)=0
A callback function used to get response online for a certificate.
foxit::pdf::Response::operator=
Response & operator=(const Response &other)
Assign operator.
Definition: fs_ltvverifier.h:84
foxit::pdf::SignatureVerifyResult::SignatureVerifyResult
SignatureVerifyResult(const SignatureVerifyResult &other)
Constructor, with another signature veirfy result object.
foxit::pdf::TimeRange::operator!=
bool operator!=(const TimeRange &other) const
Not equal operator.
Definition: fs_ltvverifier.h:197
foxit::pdf::CertVerifyResult::e_ReasonRemoveFromCRL
Revocatoin reason: remove from CRL.
Definition: fs_ltvverifier.h:262
foxit::pdf::SignatureVerifyResult::GetCertificateVerifyResults
CertVerifyResultArray GetCertificateVerifyResults()
Get certificate verify results.
foxit::pdf::CertVerifyResult::e_LocationDSS
Response information is found in DSS dictionary.
Definition: fs_ltvverifier.h:278
foxit::pdf::Response::e_TypeNone
No response.
Definition: fs_ltvverifier.h:41
foxit::pdf::CertVerifyResult::e_ReasonCACompromise
Revocatoin reason: CA compromise.
Definition: fs_ltvverifier.h:252
foxit::pdf::TimeRange::TimeRange
TimeRange(const TimeRange &other)
Constructor, with another time range object.
Definition: fs_ltvverifier.h:161
foxit::pdf::RevocationCallback::GetOCSPSignature
virtual String GetOCSPSignature(const String &ocsp_data)=0
A callback function used to get the signature content from a OCSP response.
foxit::pdf::RevocationCallback::GetCRLSignature
virtual String GetCRLSignature(const String &crl_data)=0
A callback function used to get the signature content from a CRL response.
foxit::pdf::CertVerifyResultArray
Definition: fs_ltvverifier.h:532
foxit::pdf::RevocationCallback::GetOCSPProducedAtTime
virtual DateTime GetOCSPProducedAtTime(const String &ocsp_data)=0
A callback function used to get the produce time of the OCSP response.
foxit::pdf::SignatureVerifyResult::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::SignatureVerifyResultArray
Definition: fs_ltvverifier.h:979
foxit::pdf::SignatureVerifyResult::~SignatureVerifyResult
~SignatureVerifyResult()
Destructor.
foxit::pdf::TimeRange::Set
void Set(const DateTime &start_time, const DateTime &end_time)
Set value.
Definition: fs_ltvverifier.h:209
foxit::pdf::CertVerifyResult::exist_signature_vri_creation_time
bool exist_signature_vri_creation_time
Indicate if creation time of siganture's VRI exists.
Definition: fs_ltvverifier.h:511
foxit::pdf::CertVerifyResult::cert_status
CertStatus cert_status
Certificate status. Please refer to values starting from CertVerifyResult::e_CertStatusValid and this...
Definition: fs_ltvverifier.h:498
foxit::pdf::CertVerifyResult::e_ReasonAffiliationChanged
Revocatoin reason: affiliation changed.
Definition: fs_ltvverifier.h:254
foxit::pdf::SignatureVerifyResult::operator=
SignatureVerifyResult & operator=(const SignatureVerifyResult &other)
Assign operator.
foxit::pdf::CertChainResolverCallback
Definition: fs_ltvverifier.h:963
foxit::pdf::TimeRange::~TimeRange
~TimeRange()
Destructor.
Definition: fs_ltvverifier.h:154
foxit::pdf::TrustedCertStoreCallback::IsCertTrustedRoot
virtual bool IsCertTrustedRoot(const String &cert)=0
A callback function used to check if input certificate is used as a trusted root.
foxit::pdf::Response::Response
Response(const Response &other)
Constructor, with another response object.
Definition: fs_ltvverifier.h:72
foxit::pdf::CertChainResolverCallback::GetCertificates
virtual StringArray GetCertificates()=0
Retrieve the array of certificates available for completing the certificate chain.
foxit::pdf::RevocationCallback::GetCertValidTimeRange
virtual TimeRange GetCertValidTimeRange(const String &cert)=0
A callback function used to get the time range that represents validity period of a certificate.
foxit::pdf::TrustedCertStoreCallback
Definition: fs_ltvverifier.h:932
foxit::pdf::SignatureVerifyResult
Definition: fs_ltvverifier.h:1171
foxit::pdf::CertVerifyResult::RevocationReason
RevocationReason
Enumeration for revocation reason for a certificate.
Definition: fs_ltvverifier.h:244
foxit::pdf::CertVerifyResult::e_CertStatusValid
This means certificate is valid.
Definition: fs_ltvverifier.h:230
foxit::pdf::CertVerifyResult::signature_vri_creation_time
DateTime signature_vri_creation_time
Creation time of a signature's VRI. utc_hour_offset and utc_minite_offset of this time object are ign...
Definition: fs_ltvverifier.h:516
foxit::pdf::CertVerifyResult::e_CertStatusRevoked
This means certificate is revoked.
Definition: fs_ltvverifier.h:232
foxit::pdf::Response::operator==
bool operator==(const Response &other) const
Equal operator.
Definition: fs_ltvverifier.h:97
foxit::pdf::TimeRange
Definition: fs_ltvverifier.h:137
foxit::pdf::RevocationArrayInfo::operator=
RevocationArrayInfo & operator=(const RevocationArrayInfo &other)
Assign operator.
Definition: fs_ltvverifier.h:655
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::TimeRange::start_time
DateTime start_time
Start time of current time range.
Definition: fs_ltvverifier.h:215
foxit::pdf::CertVerifyResult::~CertVerifyResult
~CertVerifyResult()
Destructor.
Definition: fs_ltvverifier.h:347
foxit::pdf::CertVerifyResult::response_signature_vri_creation_time
DateTime response_signature_vri_creation_time
Creation time of response signature's VRI. utc_hour_offset and utc_minite_offset of this time object ...
Definition: fs_ltvverifier.h:523
foxit::pdf::Response::e_TypeCRL
CRL response.
Definition: fs_ltvverifier.h:43
foxit::pdf::CertVerifyResult::cert_check_time
DateTime cert_check_time
The actual time when this certificate is checked validity. utc_hour_offset and utc_minite_offset of t...
Definition: fs_ltvverifier.h:509
foxit::pdf::SignatureVerifyResult::GetLTVState
LTVState GetLTVState()
Get LTV state that indicates if a signature is a LTV signature.
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair()
Constructor.
Definition: fs_ltvverifier.h:549
foxit::pdf::Signature
Definition: fs_signature.h:99
foxit::pdf::Response::Response
Response()
Constructor.
Definition: fs_ltvverifier.h:62
foxit::pdf::CertVerifyResult::is_trusted
bool is_trusted
Indicate if the certificate is truscted by user.
Definition: fs_ltvverifier.h:486
foxit::pdf::RevocationCallback::VerifyCRL
virtual CertVerifyResult VerifyCRL(const CertIssuerPair &cert_issuer_pair, const String &crl_data)=0
A callback function used to verify whether the CRL response matches the certificate and get the verif...
foxit::pdf::SignatureVerifyResult::GetSignatureCheckTimeType
LTVVerifier::TimeType GetSignatureCheckTimeType()
Get the type of the time that is actually used to check siganture.
foxit::pdf::Response::response_data
String response_data
Response content.
Definition: fs_ltvverifier.h:133
foxit::pdf::CertVerifyResult::is_ca
bool is_ca
Indicate if the certificate is a CA certificate.
Definition: fs_ltvverifier.h:484
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair(const String &cert, const String &issuer)
Constructor, with parameters.
Definition: fs_ltvverifier.h:543
operator==
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
foxit::pdf::Response::Set
void Set(ResponseType type, const String &response_data)
Set value.
Definition: fs_ltvverifier.h:121
foxit::pdf::CertIssuerPair::CertIssuerPair
CertIssuerPair(const CertIssuerPair &other)
Constructor, with another cert-issuer pair object.
Definition: fs_ltvverifier.h:559
foxit::pdf::CertVerifyResult::operator=
CertVerifyResult & operator=(const CertVerifyResult &other)
Assign operator.
Definition: fs_ltvverifier.h:378
foxit::pdf::SignatureVerifyResult::GetOCSPSigantureVerifyResults
SignatureVerifyResultArray GetOCSPSigantureVerifyResults()
Get signature verify results for OCSP signature of each certificate.
foxit::pdf::SignatureVerifyResult::GetTSTSignatureVerifyResult
SignatureVerifyResult GetTSTSignatureVerifyResult()
Get the verify result of time stamp token of this signature.
foxit::pdf::SignatureVerifyResult::operator==
bool operator==(const SignatureVerifyResult &other) const
Equal operator.
foxit::pdf::CertVerifyResult::CertVerifyResult
CertVerifyResult()
Constructor.
Definition: fs_ltvverifier.h:337
foxit::StringArray::GetAt
String GetAt(size_t index) const
Retrieve a copy of the element at position specified by index in current array.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::CertVerifyResult::CertVerifyResult
CertVerifyResult(const CertVerifyResult &other)
Constructor, with another certificate verify result object.
Definition: fs_ltvverifier.h:354
foxit::pdf::RevocationCallback::GetTSTTime
virtual DateTime GetTSTTime(const String &signature_content)=0
A callback function used to get the time stamp token time from signature content.
foxit::pdf::CertVerifyResult::CertStatus
CertStatus
Enumeration for certificate status.
Definition: fs_ltvverifier.h:228
foxit::pdf::RevocationCallback
Definition: fs_ltvverifier.h:720
foxit::pdf::CertVerifyResult::e_ReasonNoStatus
Revocatoin reason: ceritifcate has no status.
Definition: fs_ltvverifier.h:246
foxit::pdf::RevocationArrayInfo::Set
void Set(const StringArray &ocsp_array, const StringArray &crl_array)
Set value.
Definition: fs_ltvverifier.h:703
foxit::pdf::RevocationCallback::IsIssuerMatchCert
virtual bool IsIssuerMatchCert(const CertIssuerPair &cert_issuer_pair)=0
A callback function used to check if an issuer matches a certificate.
operator!=
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
foxit::pdf::Response
Definition: fs_ltvverifier.h:32
foxit::pdf::RevocationArrayInfo
Definition: fs_ltvverifier.h:619
fs_pdfdoc.h
Header file for PDF document related definitions and classes.
foxit::pdf::CertVerifyResult::reason
RevocationReason reason
Revocation reason of the certificate. Please refer to values starting from CertVerifyResult::e_Reason...
Definition: fs_ltvverifier.h:504
foxit::pdf::CertIssuerPair
Definition: fs_ltvverifier.h:535
foxit::pdf::Response::Response
Response(ResponseType type, const String &response_data)
Constructor, with parameters.
Definition: fs_ltvverifier.h:56
foxit::pdf::TimeRange::operator=
TimeRange & operator=(const TimeRange &other)
Assign operator.
Definition: fs_ltvverifier.h:173
foxit::pdf::CertIssuerPair::~CertIssuerPair
~CertIssuerPair()
Destructor.
Definition: fs_ltvverifier.h:552
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::CertVerifyResult::e_ReasonPrivilegeWithDrawn
Revocatoin reason: privilege with drawn.
Definition: fs_ltvverifier.h:264
foxit::pdf::TimeRange::end_time
DateTime end_time
End time of current time range.
Definition: fs_ltvverifier.h:217
foxit::pdf::CertVerifyResult::response
Response response
A response for the certificate.
Definition: fs_ltvverifier.h:488
foxit::pdf::SignatureVerifyResult::e_LTVStateEnable
This means LTV is enabled.
Definition: fs_ltvverifier.h:1182
foxit::pdf::CertVerifyResult::e_LocationSignature
Response information is found in signature content.
Definition: fs_ltvverifier.h:280
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo()
Constructor.
Definition: fs_ltvverifier.h:633
foxit::pdf::SignatureVerifyResult::GetSignatureName
String GetSignatureName()
Get signature name.
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::CertVerifyResult::revoke_time
DateTime revoke_time
Revoked time got from the response.
Definition: fs_ltvverifier.h:492
foxit::pdf::Response::~Response
~Response()
Destructor.
Definition: fs_ltvverifier.h:65
foxit::pdf::RevocationArrayInfo::ocsp_array
StringArray ocsp_array
An array of OCSP response content.
Definition: fs_ltvverifier.h:709
foxit::pdf::CertVerifyResult::e_ReasonUnspecified
Revocatoin reason: unspecified reason.
Definition: fs_ltvverifier.h:248
foxit::pdf::Response::operator!=
bool operator!=(const Response &other) const
Not equal operator.
Definition: fs_ltvverifier.h:108
foxit::pdf::CertVerifyResult::operator!=
bool operator!=(const CertVerifyResult &other) const
Not equal operator.
Definition: fs_ltvverifier.h:424
foxit::pdf::RevocationCallback::VerifyOCSP
virtual CertVerifyResult VerifyOCSP(const CertIssuerPair &cert_issuer_pair, const String &ocsp_data)=0
A callback function used to verify whether the OCSP response matches the certificate and get the veri...
foxit::pdf::CertVerifyResult::exist_response_signature_vri_creation_time
bool exist_response_signature_vri_creation_time
Indicate if creation time of response signature's VRI exists.
Definition: fs_ltvverifier.h:518
foxit::pdf::SignatureVerifyResult::GetSignatureState
uint32 GetSignatureState()
Get signature state.
foxit::pdf::CertIssuerPair::operator=
CertIssuerPair & operator=(const CertIssuerPair &other)
Assign operator.
Definition: fs_ltvverifier.h:571
foxit::pdf::LTVVerifier::TimeType
TimeType
Enumeration for time type.
Definition: fs_ltvverifier.h:996
foxit::pdf::CertVerifyResult::e_ReasonSuperseded
Revocatoin reason: superseded.
Definition: fs_ltvverifier.h:256
foxit::pdf::CertVerifyResult::response_info_location
ResponseInfoLocation response_info_location
Response information (as revocation information) location where certificate response can be found....
Definition: fs_ltvverifier.h:528
foxit::pdf::CertIssuerPair::issuer
String issuer
An issuer of the certificate.
Definition: fs_ltvverifier.h:615
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)
Constructor, with parameters.
Definition: fs_ltvverifier.h:313
foxit::pdf::RevocationCallback::GetDTSTime
virtual DateTime GetDTSTime(const String &signature_content)=0
A callback function used to get the DTS (document time stamp signature) time from signature content.
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo(const StringArray &ocsp_array, const StringArray &crl_array)
Constructor, with parameters.
Definition: fs_ltvverifier.h:627
foxit::pdf::CertVerifyResult::e_ReasonCessationOfOperation
Revocatoin reason: cessation of operation.
Definition: fs_ltvverifier.h:258
foxit::pdf::RevocationArrayInfo::RevocationArrayInfo
RevocationArrayInfo(const RevocationArrayInfo &other)
Constructor, with another revocation array information object.
Definition: fs_ltvverifier.h:643
foxit::pdf::CertVerifyResult::ResponseInfoLocation
ResponseInfoLocation
Enumeration for response information location.
Definition: fs_ltvverifier.h:274
foxit::pdf::TimeRange::operator==
bool operator==(const TimeRange &other) const
Equal operator.
Definition: fs_ltvverifier.h:186
foxit::pdf::LTVVerifier
Definition: fs_ltvverifier.h:989
foxit::pdf::SignatureVerifyResult::e_LTVStateNotEnable
This means LTV is not enabled.
Definition: fs_ltvverifier.h:1184
foxit::pdf::RevocationArrayInfo::operator==
bool operator==(const RevocationArrayInfo &other) const
Equal operator.
Definition: fs_ltvverifier.h:668
foxit::pdf::CertVerifyResult::e_LocationNotSet
Location is not set.
Definition: fs_ltvverifier.h:276
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::pdf::RevocationArrayInfo::operator!=
bool operator!=(const RevocationArrayInfo &other) const
Not equal operator.
Definition: fs_ltvverifier.h:691
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::CertVerifyResult::e_ReasonAACompromise
Revocatoin reason: AA compromise.
Definition: fs_ltvverifier.h:266
foxit::pdf::CertIssuerPair::operator!=
bool operator!=(const CertIssuerPair &other) const
Not equal operator.
Definition: fs_ltvverifier.h:595
foxit::pdf::RevocationCallback::GetTSTSignature
virtual String GetTSTSignature(const String &signature_content)=0
A callback function used to get the time stamp token content from a signature content.
foxit::pdf::SignatureVerifyResult::operator!=
bool operator!=(const SignatureVerifyResult &other) const
Not equal operator.
foxit::pdf::Response::ResponseType
ResponseType
Enumeration for response type.
Definition: fs_ltvverifier.h:39
foxit::pdf::CertVerifyResult
Definition: fs_ltvverifier.h:221
foxit::pdf::Response::e_TypeOCSP
OCSP response.
Definition: fs_ltvverifier.h:45