Go to the documentation of this file.
15 #ifndef FS_LTVVERIFIER_H_
16 #define FS_LTVVERIFIER_H_
39 typedef enum _ResponseType {
106 return!(*
this == other);
191 return!(*
this == other);
221 typedef enum _CertStatus {
237 typedef enum _RevocationReason {
267 typedef enum _ResponseInfoLocation {
415 return!(*
this == other);
583 return!(*
this == other);
657 for (
size_t i = 0; i < ocsp_count; i++) {
661 for (
size_t i = 0; i < ocsp_count; i++) {
676 return!(*
this == other);
957 typedef enum _TimeType {
959 e_SignatureCreationTime = 0,
961 e_SignatureTSTTime = 1,
968 e_VRICreationTime = 3
976 typedef enum _VerifyMode {
978 e_VerifyModeAcrobat = 1
997 explicit LTVVerifier(
const PDFDoc& document,
bool is_verify_signature,
bool use_expired_tst,
998 bool ignore_doc_info, TimeType time_type);
1042 bool IsEmpty()
const;
1066 void SetVerifyMode(VerifyMode mode);
1126 typedef enum _LTVState {
1250 #endif // FS_LTVVERIFIER_H_
void Set(const String &cert, const String &issuer)
Set value.
Definition: fs_ltvverifier.h:594
virtual void Release()=0
A callback function used to release current callback object itself.
virtual RevocationArrayInfo GetRevocationInfoFromSignatureData(const String &signature_content)=0
A callback function used to get the revocation information (in array type) from a signature.
bool operator==(const CertVerifyResult &other) const
Equal operator.
Definition: fs_ltvverifier.h:393
TimeRange response_effect_time_range
The time range when the response takes effect.
Definition: fs_ltvverifier.h:480
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.
bool operator==(const CertIssuerPair &other) const
Equal operator.
Definition: fs_ltvverifier.h:571
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
This means certificate status is unknown.
Definition: fs_ltvverifier.h:229
LTVState
Enumeration for LTV state that indicates if a signature is a LTV signature.
Definition: fs_ltvverifier.h:1126
TimeRange()
Constructor.
Definition: fs_ltvverifier.h:147
DateTime GetSignatureCheckTime()
Get the time that is actually used to check signature.
Definition: fs_basictypes.h:460
Definition: fs_basictypes.h:230
This means LTV is inactive.
Definition: fs_ltvverifier.h:1128
size_t GetSize() const
Get the size of elements in current array.
virtual StringArray GetCertChainFromSignature(const String &signature_content)=0
A callback function used to get the cert chain from the signature content.
String GetSignatureHashValue()
Get signature hash value.
CFX_Object Object
Object type.
Definition: fs_basictypes.h:221
Revocatoin reason: key compromise.
Definition: fs_ltvverifier.h:243
virtual bool IsCA(const String &cert)=0
A callback function used to judge whether a certificate is a CA certificate.
Response information is got by online request.
Definition: fs_ltvverifier.h:275
StringArray crl_array
An array of CRL response content.
Definition: fs_ltvverifier.h:695
virtual bool IsCertTrusted(const String &cert)=0
A callback function used to check if input certificate is trusted.
TimeRange(const DateTime &start_time, const DateTime &end_time)
Constructor, with parameters.
Definition: fs_ltvverifier.h:141
String cert
A certificate contnet.
Definition: fs_ltvverifier.h:471
This means certificate is expired.
Definition: fs_ltvverifier.h:227
String cert
Certificate content.
Definition: fs_ltvverifier.h:600
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:447
virtual bool IsOCSPNeedCheck(const String &ocsp_data)=0
A callback function used to get flag which decides if need to check OCSP response.
Revocatoin reason: certificate hold.
Definition: fs_ltvverifier.h:253
ResponseType type
Response type. Please refer to values starting from Response::e_TypeNone and this should be one of th...
Definition: fs_ltvverifier.h:127
Header file for common definitions and classes.
virtual Response GetResponseOnLineForSingleCert(const CertIssuerPair &cert_issuer_pair)=0
A callback function used to get response online for a certificate.
Response & operator=(const Response &other)
Assign operator.
Definition: fs_ltvverifier.h:81
SignatureVerifyResult(const SignatureVerifyResult &other)
Constructor, with another signature veirfy result object.
bool operator!=(const TimeRange &other) const
Not equal operator.
Definition: fs_ltvverifier.h:190
Revocatoin reason: remove from CRL.
Definition: fs_ltvverifier.h:255
CertVerifyResultArray GetCertificateVerifyResults()
Get certificate verify results.
Response information is found in DSS dictionary.
Definition: fs_ltvverifier.h:271
No response.
Definition: fs_ltvverifier.h:41
Revocatoin reason: CA compromise.
Definition: fs_ltvverifier.h:245
TimeRange(const TimeRange &other)
Constructor, with another time range object.
Definition: fs_ltvverifier.h:154
virtual String GetOCSPSignature(const String &ocsp_data)=0
A callback function used to get the signature content from a OCSP response.
virtual String GetCRLSignature(const String &crl_data)=0
A callback function used to get the signature content from a CRL response.
Definition: fs_ltvverifier.h:522
virtual DateTime GetOCSPProducedAtTime(const String &ocsp_data)=0
A callback function used to get the produce time of the OCSP response.
bool IsEmpty() const
Check whether current object is empty or not.
Definition: fs_ltvverifier.h:940
~SignatureVerifyResult()
Destructor.
void Set(const DateTime &start_time, const DateTime &end_time)
Set value.
Definition: fs_ltvverifier.h:202
bool exist_signature_vri_creation_time
Indicate if creation time of siganture's VRI exists.
Definition: fs_ltvverifier.h:501
CertStatus cert_status
Certificate status. Please refer to values starting from CertVerifyResult::e_CertStatusValid and this...
Definition: fs_ltvverifier.h:488
Revocatoin reason: affiliation changed.
Definition: fs_ltvverifier.h:247
SignatureVerifyResult & operator=(const SignatureVerifyResult &other)
Assign operator.
virtual bool IsCertTrustedRoot(const String &cert)=0
A callback function used to check if input certificate is used as a trusted root.
Response(const Response &other)
Constructor, with another response object.
Definition: fs_ltvverifier.h:69
virtual TimeRange GetCertValidTimeRange(const String &cert)=0
A callback function used to get the time range that represents validity period of a certificate.
Definition: fs_ltvverifier.h:916
Definition: fs_ltvverifier.h:1119
RevocationReason
Enumeration for revocation reason for a certificate.
Definition: fs_ltvverifier.h:237
This means certificate is valid.
Definition: fs_ltvverifier.h:223
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:506
This means certificate is revoked.
Definition: fs_ltvverifier.h:225
bool operator==(const Response &other) const
Equal operator.
Definition: fs_ltvverifier.h:94
Definition: fs_ltvverifier.h:133
RevocationArrayInfo & operator=(const RevocationArrayInfo &other)
Assign operator.
Definition: fs_ltvverifier.h:639
BYTE STRING CLASS.
Definition: fx_string.h:317
DateTime start_time
Start time of current time range.
Definition: fs_ltvverifier.h:208
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:513
CRL response.
Definition: fs_ltvverifier.h:43
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:499
LTVState GetLTVState()
Get LTV state that indicates if a signature is a LTV signature.
CertIssuerPair()
Constructor.
Definition: fs_ltvverifier.h:539
Definition: fs_signature.h:99
Response()
Constructor.
Definition: fs_ltvverifier.h:62
bool is_trusted
Indicate if the certificate is truscted by user.
Definition: fs_ltvverifier.h:476
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...
LTVVerifier::TimeType GetSignatureCheckTimeType()
Get the type of the time that is actually used to check siganture.
String response_data
Response content.
Definition: fs_ltvverifier.h:129
bool is_ca
Indicate if the certificate is a CA certificate.
Definition: fs_ltvverifier.h:474
CertIssuerPair(const String &cert, const String &issuer)
Constructor, with parameters.
Definition: fs_ltvverifier.h:533
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
void Set(ResponseType type, const String &response_data)
Set value.
Definition: fs_ltvverifier.h:118
CertIssuerPair(const CertIssuerPair &other)
Constructor, with another cert-issuer pair object.
Definition: fs_ltvverifier.h:546
CertVerifyResult & operator=(const CertVerifyResult &other)
Assign operator.
Definition: fs_ltvverifier.h:368
SignatureVerifyResultArray GetOCSPSigantureVerifyResults()
Get signature verify results for OCSP signature of each certificate.
SignatureVerifyResult GetTSTSignatureVerifyResult()
Get the verify result of time stamp token of this signature.
bool operator==(const SignatureVerifyResult &other) const
Equal operator.
CertVerifyResult()
Constructor.
Definition: fs_ltvverifier.h:330
String GetAt(size_t index) const
Retrieve a copy of the element at position specified by index in current array.
Foxit namespace.
Definition: fs_taggedpdf.h:27
CertVerifyResult(const CertVerifyResult &other)
Constructor, with another certificate verify result object.
Definition: fs_ltvverifier.h:344
virtual DateTime GetTSTTime(const String &signature_content)=0
A callback function used to get the time stamp token time from signature content.
CertStatus
Enumeration for certificate status.
Definition: fs_ltvverifier.h:221
Definition: fs_ltvverifier.h:704
Revocatoin reason: ceritifcate has no status.
Definition: fs_ltvverifier.h:239
void Set(const StringArray &ocsp_array, const StringArray &crl_array)
Set value.
Definition: fs_ltvverifier.h:687
virtual bool IsIssuerMatchCert(const CertIssuerPair &cert_issuer_pair)=0
A callback function used to check if an issuer matches a certificate.
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
Definition: fs_ltvverifier.h:32
Definition: fs_ltvverifier.h:606
Header file for PDF document related definitions and classes.
RevocationReason reason
Revocation reason of the certificate. Please refer to values starting from CertVerifyResult::e_Reason...
Definition: fs_ltvverifier.h:494
Definition: fs_ltvverifier.h:525
Response(ResponseType type, const String &response_data)
Constructor, with parameters.
Definition: fs_ltvverifier.h:56
TimeRange & operator=(const TimeRange &other)
Assign operator.
Definition: fs_ltvverifier.h:166
#define NULL
The null-pointer value.
Definition: fx_system.h:780
Revocatoin reason: privilege with drawn.
Definition: fs_ltvverifier.h:257
DateTime end_time
End time of current time range.
Definition: fs_ltvverifier.h:210
Response response
A response for the certificate.
Definition: fs_ltvverifier.h:478
This means LTV is enabled.
Definition: fs_ltvverifier.h:1130
Response information is found in signature content.
Definition: fs_ltvverifier.h:273
RevocationArrayInfo()
Constructor.
Definition: fs_ltvverifier.h:620
String GetSignatureName()
Get signature name.
Definition: fs_pdfdoc.h:610
DateTime revoke_time
Revoked time got from the response.
Definition: fs_ltvverifier.h:482
StringArray ocsp_array
An array of OCSP response content.
Definition: fs_ltvverifier.h:693
Revocatoin reason: unspecified reason.
Definition: fs_ltvverifier.h:241
bool operator!=(const Response &other) const
Not equal operator.
Definition: fs_ltvverifier.h:105
bool operator!=(const CertVerifyResult &other) const
Not equal operator.
Definition: fs_ltvverifier.h:414
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...
bool exist_response_signature_vri_creation_time
Indicate if creation time of response signature's VRI exists.
Definition: fs_ltvverifier.h:508
uint32 GetSignatureState()
Get signature state.
CertIssuerPair & operator=(const CertIssuerPair &other)
Assign operator.
Definition: fs_ltvverifier.h:558
TimeType
Enumeration for time type.
Definition: fs_ltvverifier.h:957
Revocatoin reason: superseded.
Definition: fs_ltvverifier.h:249
ResponseInfoLocation response_info_location
Response information (as revocation information) location where certificate response can be found....
Definition: fs_ltvverifier.h:518
String issuer
An issuer of the certificate.
Definition: fs_ltvverifier.h:602
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:306
virtual DateTime GetDTSTime(const String &signature_content)=0
A callback function used to get the DTS (document time stamp signature) time from signature content.
RevocationArrayInfo(const StringArray &ocsp_array, const StringArray &crl_array)
Constructor, with parameters.
Definition: fs_ltvverifier.h:614
Revocatoin reason: cessation of operation.
Definition: fs_ltvverifier.h:251
RevocationArrayInfo(const RevocationArrayInfo &other)
Constructor, with another revocation array information object.
Definition: fs_ltvverifier.h:627
ResponseInfoLocation
Enumeration for response information location.
Definition: fs_ltvverifier.h:267
bool operator==(const TimeRange &other) const
Equal operator.
Definition: fs_ltvverifier.h:179
Definition: fs_ltvverifier.h:950
This means LTV is not enabled.
Definition: fs_ltvverifier.h:1132
bool operator==(const RevocationArrayInfo &other) const
Equal operator.
Definition: fs_ltvverifier.h:652
Location is not set.
Definition: fs_ltvverifier.h:269
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:196
bool operator!=(const RevocationArrayInfo &other) const
Not equal operator.
Definition: fs_ltvverifier.h:675
Definition: fs_basictypes.h:427
Revocatoin reason: AA compromise.
Definition: fs_ltvverifier.h:259
bool operator!=(const CertIssuerPair &other) const
Not equal operator.
Definition: fs_ltvverifier.h:582
virtual String GetTSTSignature(const String &signature_content)=0
A callback function used to get the time stamp token content from a signature content.
bool operator!=(const SignatureVerifyResult &other) const
Not equal operator.
ResponseType
Enumeration for response type.
Definition: fs_ltvverifier.h:39
Definition: fs_ltvverifier.h:214
OCSP response.
Definition: fs_ltvverifier.h:45
@2024 Foxit Software Incorporated. All rights reserved.