Foxit PDF SDK
foxit::pdf::RevocationCallback Class Referenceabstract

Public Member Functions

virtual StringArray GetCertChainFromSignature (const String &signature_content)=0
 A callback function used to get the cert chain from the signature content. More...
 
virtual TimeRange GetCertValidTimeRange (const String &cert)=0
 A callback function used to get the time range that represents validity period of a certificate. More...
 
virtual String GetCRLSignature (const String &crl_data)=0
 A callback function used to get the signature content from a CRL response. More...
 
virtual DateTime GetDTSTime (const String &signature_content)=0
 A callback function used to get the DTS (document time stamp signature) time from signature content. More...
 
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. More...
 
virtual DateTime GetOCSPProducedAtTime (const String &ocsp_data)=0
 A callback function used to get the produce time of the OCSP response. More...
 
virtual String GetOCSPSignature (const String &ocsp_data)=0
 A callback function used to get the signature content from a OCSP response. More...
 
virtual Response GetResponseOnLineForSingleCert (const CertIssuerPair &cert_issuer_pair)=0
 A callback function used to get response online for a certificate. More...
 
virtual RevocationArrayInfo GetRevocationInfoFromSignatureData (const String &signature_content)=0
 A callback function used to get the revocation information (in array type) from a signature. More...
 
virtual String GetTSTSignature (const String &signature_content)=0
 A callback function used to get the time stamp token content from a signature content. More...
 
virtual DateTime GetTSTTime (const String &signature_content)=0
 A callback function used to get the time stamp token time from signature content. More...
 
virtual bool IsCA (const String &cert)=0
 A callback function used to judge whether a certificate is a CA certificate. More...
 
virtual bool IsIssuerMatchCert (const CertIssuerPair &cert_issuer_pair)=0
 A callback function used to check if an issuer matches a certificate. More...
 
virtual bool IsOCSPNeedCheck (const String &ocsp_data)=0
 A callback function used to get flag which decides if need to check OCSP response. More...
 
virtual void Release ()=0
 A callback function used to release current callback object itself. More...
 
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 verify result for the certificate. More...
 
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 verify result for the certificate. More...
 

Detailed Description

This class represent a revocation callback object which is used for class LTVVerifier. All the pure virtual functions in this class are used as callback functions and should be implemented by user.

See also
LTVVerifier

Member Function Documentation

◆ GetCertChainFromSignature()

virtual StringArray foxit::pdf::RevocationCallback::GetCertChainFromSignature ( const String signature_content)
pure virtual

A callback function used to get the cert chain from the signature content.

Parameters
[in]signature_contentSignature content.
Returns
An array that represents the cert chain.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetCertValidTimeRange()

virtual TimeRange foxit::pdf::RevocationCallback::GetCertValidTimeRange ( const String cert)
pure virtual

A callback function used to get the time range that represents validity period of a certificate.

Parameters
[in]certCertificate content.
Returns
Time range that represents validity period of the certificate.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetCRLSignature()

virtual String foxit::pdf::RevocationCallback::GetCRLSignature ( const String crl_data)
pure virtual

A callback function used to get the signature content from a CRL response.

Parameters
[in]crl_dataCRL response content.
Returns
Signature content .
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetDTSTime()

virtual DateTime foxit::pdf::RevocationCallback::GetDTSTime ( const String signature_content)
pure virtual

A callback function used to get the DTS (document time stamp signature) time from signature content.

Parameters
[in]signature_contentSignature content.
Returns
DTS time. utc_hour_offset and utc_minite_offset of this time would be ignored.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetOCSPCertAndIssuer()

virtual CertIssuerPair foxit::pdf::RevocationCallback::GetOCSPCertAndIssuer ( const String ocsp_data,
const StringArray trust_cert_chain 
)
pure virtual

A callback function used to get the cert-issuer pair of OCSP response.

Parameters
[in]ocsp_dataOCSP response data.
[in]trust_cert_chainThe trust cert chain used to find the issuer of the OCSP cert.
Returns
A cert-issuer pair that obtained from OCSP.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetOCSPProducedAtTime()

virtual DateTime foxit::pdf::RevocationCallback::GetOCSPProducedAtTime ( const String ocsp_data)
pure virtual

A callback function used to get the produce time of the OCSP response.

Parameters
[in]ocsp_dataOCSP response content.
Returns
Produce time of the OCSP response. utc_hour_offset and utc_minite_offset of this time would be ignored.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetOCSPSignature()

virtual String foxit::pdf::RevocationCallback::GetOCSPSignature ( const String ocsp_data)
pure virtual

A callback function used to get the signature content from a OCSP response.

Parameters
[in]ocsp_dataOCSP response content.
Returns
Signature content .
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetResponseOnLineForSingleCert()

virtual Response foxit::pdf::RevocationCallback::GetResponseOnLineForSingleCert ( const CertIssuerPair cert_issuer_pair)
pure virtual

A callback function used to get response online for a certificate.

Parameters
[in]cert_issuer_pairA cert-issuer pair which represents a certificate and an issuer for the certificate.
Returns
Response for the certificate.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetRevocationInfoFromSignatureData()

virtual RevocationArrayInfo foxit::pdf::RevocationCallback::GetRevocationInfoFromSignatureData ( const String signature_content)
pure virtual

A callback function used to get the revocation information (in array type) from a signature.

Parameters
[in]signature_contentSignature content.
Returns
Information in array type of revocation information.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetTSTSignature()

virtual String foxit::pdf::RevocationCallback::GetTSTSignature ( const String signature_content)
pure virtual

A callback function used to get the time stamp token content from a signature content.

Parameters
[in]signature_contentSignature content.
Returns
Time stamp token content.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ GetTSTTime()

virtual DateTime foxit::pdf::RevocationCallback::GetTSTTime ( const String signature_content)
pure virtual

A callback function used to get the time stamp token time from signature content.

Parameters
[in]signature_contentSignature content.
Returns
Time of time stamp token of a signature. utc_hour_offset and utc_minite_offset of this time would be ignored.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ IsCA()

virtual bool foxit::pdf::RevocationCallback::IsCA ( const String cert)
pure virtual

A callback function used to judge whether a certificate is a CA certificate.

Parameters
[in]certCertificate content.
Returns
true means the certificate is a CA certificate, while false means not.

◆ IsIssuerMatchCert()

virtual bool foxit::pdf::RevocationCallback::IsIssuerMatchCert ( const CertIssuerPair cert_issuer_pair)
pure virtual

A callback function used to check if an issuer matches a certificate.

Parameters
[in]cert_issuer_pairA cert-issuer pair. Issuer in this pair is to be checked if it matches the ceritificate in this pair.
Returns
true means issuer matches the certificate, while false means not.

◆ IsOCSPNeedCheck()

virtual bool foxit::pdf::RevocationCallback::IsOCSPNeedCheck ( const String ocsp_data)
pure virtual

A callback function used to get flag which decides if need to check OCSP response.

Parameters
[in]ocsp_dataOCSP response content.
Returns
true means need to check OCSP response, while false means no need.

◆ Release()

virtual void foxit::pdf::RevocationCallback::Release ( )
pure virtual

A callback function used to release current callback object itself.

Returns
None.

◆ VerifyCRL()

virtual CertVerifyResult foxit::pdf::RevocationCallback::VerifyCRL ( const CertIssuerPair cert_issuer_pair,
const String crl_data 
)
pure virtual

A callback function used to verify whether the CRL response matches the certificate and get the verify result for the certificate.

Parameters
[in]cert_issuer_pairA cert-issuer pair which represents a certificate and an issuer for the certificate.
[in]crl_dataCRL content.
Returns
Certificate verify result that obtained from CRL.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.

◆ VerifyOCSP()

virtual CertVerifyResult foxit::pdf::RevocationCallback::VerifyOCSP ( const CertIssuerPair cert_issuer_pair,
const String ocsp_data 
)
pure virtual

A callback function used to verify whether the OCSP response matches the certificate and get the verify result for the certificate.

Parameters
[in]cert_issuer_pairA cert-issuer pair which represents a certificate and an issuer for the certificate.
[in]ocsp_dataOCSP content.
Returns
Certificate verify result that obtained from CRL.
Note
User can throw exception for errors. Please refere to class foxit::Exception and values starting from foxit::e_ErrFile.