Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.LTVVerifier Class Reference
Inheritance diagram for com.foxit.sdk.pdf.LTVVerifier:

## Public Member Functions
| LTVVerifier (LTVVerifier other)
| Constructor, with another LTV verifier object. More...
| LTVVerifier (PDFDoc document, boolean is_verify_signature, boolean use_expired_tst, boolean ignore_doc_info, int time_type) throws com.foxit.sdk.PDFException
| Constructor, with parameters. More...
void | addDSS (SignatureVerifyResult signature_verify_result) throws com.foxit.sdk.PDFException
| Add the verify result (as VRI information) of a signature to the DSS. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
void | setCertChainResolverCallback (CertChainResolverCallback callback) throws com.foxit.sdk.PDFException
| Set a customized com.foxit.sdk.pdf.CertChainResolverCallback object if user wants to supply extra certificates to complete the certificate chain. More...
void | setRevocationCallback (RevocationCallback callback) throws com.foxit.sdk.PDFException
| Set a customized com.foxit.sdk.pdf.RevocationCallback object. More...
void | setTrustedCertStoreCallback (TrustedCertStoreCallback callback) throws com.foxit.sdk.PDFException
| Set a customized com.foxit.sdk.pdf.TrustedCertStoreCallback object if user wants to trust some certificates. More...
void | setVerifyMode (int mode) throws com.foxit.sdk.PDFException
| Set the verifying mode to specify which validation process is to be used. More...
SignatureVerifyResultArray | verify () throws com.foxit.sdk.PDFException
| Verify all the signatures in the PDF document which is used to constructed current object. More...
SignatureVerifyResultArray | verifySignature (Signature signature) throws com.foxit.sdk.PDFException
| Verify the target signature in the PDF document which is used to constructed current object. More...

## Static Public Attributes
static final int | e_CurrentTime = 2
| Use current time.
static final int | e_SignatureCreationTime = 0
| Use signature creation time.
static final int | e_SignatureTSTTime = 1
| Use the time of signature time stamp token.
static final int | e_VerifyModeAcrobat = 1
| Use Acrobat validation process.
static final int | e_VRICreationTime = 3
| Use the creation time of VRI dictionary of a signature. More...

## Detailed Description

LTV verifier is used to verify signature in LTV work flow. Before use this class to verify signature(s), please ensure verify mode has been set by function LTVVerifier.setVerifyMode .
Foxit PDF SDK has a default revocation callback for LTV verifier. If user wants to use customized revocation callback, please refer to function LTVVerifier.setRevocationCallback .
If user wants to trust some certificates, please refer to function LTVVerifier.setTrustedCertStoreCallback .

## Constructor & Destructor Documentation

## ◆ LTVVerifier() [1/2]

com.foxit.sdk.pdf.LTVVerifier.LTVVerifier | ( | PDFDoc | document,
|  | boolean | is_verify_signature,
|  | boolean | use_expired_tst,
|  | boolean | ignore_doc_info,
|  | int | time_type
| ) |  | throws com.foxit.sdk.PDFException

Constructor, with parameters.

Parameters

  [in] | document | A valid PDF document object.
  [in] | is_verify_signature | (Only available for com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat ) Use to decide whether to verify signature validity when verifying signature or not.
  [in] | use_expired_tst | (Only available for com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat ) Use to decide whether to use expired TST to verify signature or not.
  [in] | ignore_doc_info | (Only available for com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat ) Use to decide whether to ignore the revocation information in DSS and signature or not.
  [in] | time_type | (Only available for com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat ) Use to speicify the time type which is expected to be used for verifying. Please refer to values starting from com.foxit.sdk.pdf.LTVVerifier.e_SignatureCreationTime and this should be one of these values except com.foxit.sdk.pdf.LTVVerifier.e_VRICreationTime .

## ◆ LTVVerifier() [2/2]

com.foxit.sdk.pdf.LTVVerifier.LTVVerifier | ( | LTVVerifier | other | ) |

Constructor, with another LTV verifier object.

Parameters

  [in] | other | Another LTV verifier object.

## Member Function Documentation

## ◆ addDSS()

void com.foxit.sdk.pdf.LTVVerifier.addDSS | ( | SignatureVerifyResult | signature_verify_result | ) | throws com.foxit.sdk.PDFException

Add the verify result (as VRI information) of a signature to the DSS.

Parameters

  [in] | signature_verify_result | A signature verify result to be added to DSS.

Returns
  None.

## ◆ delete()

synchronized void com.foxit.sdk.pdf.LTVVerifier.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

## ◆ isEmpty()

boolean com.foxit.sdk.pdf.LTVVerifier.isEmpty | ( |  | ) |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ setCertChainResolverCallback()

void com.foxit.sdk.pdf.LTVVerifier.setCertChainResolverCallback | ( | CertChainResolverCallback | callback | ) | throws com.foxit.sdk.PDFException

Set a customized com.foxit.sdk.pdf.CertChainResolverCallback object if user wants to supply extra certificates to complete the certificate chain.

Parameters

  [in] | callback | A customized cert chain resolver callback object, which is implemented based on callback class com.foxit.sdk.pdf.CertChainResolverCallback . This can be set to null which means not to use it.

Returns
  None.

Note
  Only available when using the default internal revocation callback of Foxit PDF SDK.

## ◆ setRevocationCallback()

void com.foxit.sdk.pdf.LTVVerifier.setRevocationCallback | ( | RevocationCallback | callback | ) | throws com.foxit.sdk.PDFException

Set a customized com.foxit.sdk.pdf.RevocationCallback object.

If no customized revocation callback is set by this function, Foxit PDF SDK will use a default one.

Parameters

  [in] | callback | A customized revocation callback object, which is implemented based on callback class com.foxit.sdk.pdf.RevocationCallback . This should not be null.

Returns
  None.

## ◆ setTrustedCertStoreCallback()

void com.foxit.sdk.pdf.LTVVerifier.setTrustedCertStoreCallback | ( | TrustedCertStoreCallback | callback | ) | throws com.foxit.sdk.PDFException

Set a customized com.foxit.sdk.pdf.TrustedCertStoreCallback object if user wants to trust some certificates.

If no trusted cert store callback object is set by this function, no certificate will be trusted during verifying process.

Parameters

  [in] | callback | A customized trusted cert store callback object, which is implemented based on callback class com.foxit.sdk.pdf.TrustedCertStoreCallback . This can be set to null which means not to use it.

## ◆ setVerifyMode()

void com.foxit.sdk.pdf.LTVVerifier.setVerifyMode | ( | int | mode | ) | throws com.foxit.sdk.PDFException

Set the verifying mode to specify which validation process is to be used.

Please ensure to set the verify mode before doing verifying.

Parameters

  [in] | mode | The verify mode used for express verify process. Please refer to values starting from com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat and this should be one of these values.

Returns
  None.

## ◆ verify()

SignatureVerifyResultArray com.foxit.sdk.pdf.LTVVerifier.verify | ( |  | ) | throws com.foxit.sdk.PDFException

Verify all the signatures in the PDF document which is used to constructed current object.

If verify mode is not com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat , the verifying process will stop immediately when fail to verify any signature and return verify results for successfully verified signatures only. If verify mode is com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat , all the signatures will be verified and return verify results for all the signatures.

Returns
  An array of signature verify results.

## ◆ verifySignature()

SignatureVerifyResultArray com.foxit.sdk.pdf.LTVVerifier.verifySignature | ( | Signature | signature | ) | throws com.foxit.sdk.PDFException

Verify the target signature in the PDF document which is used to constructed current object.

Parameters

  [in] | signature | Target signature to be verified. If verify mode is com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat , this function will verify signatures until target signature. If verify mode is not com.foxit.sdk.pdf.LTVVerifier.e_VerifyModeAcrobat , this function will only verify target signature.

Returns
  An array of signature verify result.

## Member Data Documentation

## ◆ e_VRICreationTime

final int com.foxit.sdk.pdf.LTVVerifier.e_VRICreationTime = 3
| static

Use the creation time of VRI dictionary of a signature.

Note
  VRI means "validation-related information".