Foxit PDF SDK
com.foxit.sdk.pdf.RevocationCallback Class Reference

Public Member Functions

java.util.ArrayList< byte[]> getCertChainFromSignature (byte[] signature_content) throws com.foxit.sdk.PDFException
 A callback function used to get the cert chain from the signature content. More...
 
TimeRange getCertValidTimeRange (byte[] cert) throws com.foxit.sdk.PDFException
 A callback function used to get the time range that represents validity period of a certificate. More...
 
byte [] getCRLSignature (byte[] crl_data) throws com.foxit.sdk.PDFException
 A callback function used to get the signature content from a CRL response. More...
 
DateTime getDTSTime (byte[] signature_content) throws com.foxit.sdk.PDFException
 A callback function used to get the DTS (document time stamp signature) time from signature content. More...
 
CertIssuerPair getOCSPCertAndIssuer (byte[] ocsp_data, java.util.ArrayList< byte[]> trust_cert_chain) throws com.foxit.sdk.PDFException
 A callback function used to get the cert-issuer pair of OCSP response. More...
 
DateTime getOCSPProducedAtTime (byte[] ocsp_data) throws com.foxit.sdk.PDFException
 A callback function used to get the produce time of the OCSP response. More...
 
byte [] getOCSPSignature (byte[] ocsp_data) throws com.foxit.sdk.PDFException
 A callback function used to get the signature content from a OCSP response. More...
 
Response getResponseOnLineForSingleCert (CertIssuerPair cert_issuer_pair) throws com.foxit.sdk.PDFException
 A callback function used to get response online for a certificate. More...
 
RevocationArrayInfo getRevocationInfoFromSignatureData (byte[] signature_content) throws com.foxit.sdk.PDFException
 A callback function used to get the revocation information (in array type) from a signature. More...
 
byte [] getTSTSignature (byte[] signature_content) throws com.foxit.sdk.PDFException
 A callback function used to get the time stamp token content from a signature content. More...
 
DateTime getTSTTime (byte[] signature_content) throws com.foxit.sdk.PDFException
 A callback function used to get the time stamp token time from signature content. More...
 
boolean isCA (byte[] cert)
 A callback function used to judge whether a certificate is a CA certificate. More...
 
boolean isIssuerMatchCert (CertIssuerPair cert_issuer_pair)
 A callback function used to check if an issuer matches a certificate. More...
 
boolean isOCSPNeedCheck (byte[] ocsp_data)
 A callback function used to get flag which decides if need to check OCSP response. More...
 
void release ()
 A callback function used to release current callback object itself. More...
 
CertVerifyResult verifyCRL (CertIssuerPair cert_issuer_pair, byte[] crl_data) throws com.foxit.sdk.PDFException
 A callback function used to verify whether the CRL response matches the certificate and get the verify result for the certificate. More...
 
CertVerifyResult verifyOCSP (CertIssuerPair cert_issuer_pair, byte[] ocsp_data) throws com.foxit.sdk.PDFException
 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()

java.util.ArrayList< byte[] > com.foxit.sdk.pdf.RevocationCallback.getCertChainFromSignature ( byte []  signature_content) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getCertValidTimeRange()

TimeRange com.foxit.sdk.pdf.RevocationCallback.getCertValidTimeRange ( byte []  cert) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getCRLSignature()

byte[] com.foxit.sdk.pdf.RevocationCallback.getCRLSignature ( byte []  crl_data) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getDTSTime()

DateTime com.foxit.sdk.pdf.RevocationCallback.getDTSTime ( byte []  signature_content) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getOCSPCertAndIssuer()

CertIssuerPair com.foxit.sdk.pdf.RevocationCallback.getOCSPCertAndIssuer ( byte []  ocsp_data,
java.util.ArrayList< byte[]>  trust_cert_chain 
) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getOCSPProducedAtTime()

DateTime com.foxit.sdk.pdf.RevocationCallback.getOCSPProducedAtTime ( byte []  ocsp_data) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getOCSPSignature()

byte[] com.foxit.sdk.pdf.RevocationCallback.getOCSPSignature ( byte []  ocsp_data) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getResponseOnLineForSingleCert()

Response com.foxit.sdk.pdf.RevocationCallback.getResponseOnLineForSingleCert ( CertIssuerPair  cert_issuer_pair) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getRevocationInfoFromSignatureData()

RevocationArrayInfo com.foxit.sdk.pdf.RevocationCallback.getRevocationInfoFromSignatureData ( byte []  signature_content) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getTSTSignature()

byte[] com.foxit.sdk.pdf.RevocationCallback.getTSTSignature ( byte []  signature_content) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ getTSTTime()

DateTime com.foxit.sdk.pdf.RevocationCallback.getTSTTime ( byte []  signature_content) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ isCA()

boolean com.foxit.sdk.pdf.RevocationCallback.isCA ( byte []  cert)

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()

boolean com.foxit.sdk.pdf.RevocationCallback.isIssuerMatchCert ( CertIssuerPair  cert_issuer_pair)

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()

boolean com.foxit.sdk.pdf.RevocationCallback.isOCSPNeedCheck ( byte []  ocsp_data)

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()

void com.foxit.sdk.pdf.RevocationCallback.release ( )

A callback function used to release current callback object itself.

Returns
None.

◆ verifyCRL()

CertVerifyResult com.foxit.sdk.pdf.RevocationCallback.verifyCRL ( CertIssuerPair  cert_issuer_pair,
byte []  crl_data 
) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .

◆ verifyOCSP()

CertVerifyResult com.foxit.sdk.pdf.RevocationCallback.verifyOCSP ( CertIssuerPair  cert_issuer_pair,
byte []  ocsp_data 
) throws com.foxit.sdk.PDFException

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 refer to class com.foxit.sdk.PDFException and values starting from com.foxit.sdk.common.Constants.e_ErrFile .