public final class

DigitalSignatureValidationResult

extends Object
implements Parcelable
java.lang.Object
   ↳ com.pspdfkit.signatures.DigitalSignatureValidationResult

Class Overview

Detailed status about validity of a DigitalSignatureInfo. For overall status of the validity of the signature, see return status of getValidationStatus() method.

Summary

Nested Classes
enum DigitalSignatureValidationResult.CertificateStatus Status of the certificate that was used for signing the document. 
enum DigitalSignatureValidationResult.DocumentIntegrityStatus Status of the signed document. 
enum DigitalSignatureValidationResult.ValidationProblem Problems that prevented proper validation of a signature. 
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<DigitalSignatureValidationResult> CREATOR
Protected Constructors
DigitalSignatureValidationResult(Parcel in)
Public Methods
int describeContents()
String getCertificateChainValidationErrorMessage()
Returns an English string describing the reason for certificate validation failure.
DigitalSignatureValidationResult.CertificateStatus getCertificateChainValidationStatus()
Returns status of certificate verification.
DigitalSignatureValidationResult.DocumentIntegrityStatus getDocumentIntegrityStatus()
Returns status of document integrity.
List<DigitalSignatureValidationResult.ValidationProblem> getProblems()
Returns of list of problems when validation status is either WARNING or ERROR.
ValidationStatus getValidationStatus()
Returns overall validity status of the digital signature.
String toString()
boolean wasDocumentModified()
Returns if there was any appending done to the document after this signature.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<DigitalSignatureValidationResult> CREATOR

Protected Constructors

protected DigitalSignatureValidationResult (Parcel in)

Public Methods

public int describeContents ()

public String getCertificateChainValidationErrorMessage ()

Returns an English string describing the reason for certificate validation failure.

Returns
  • string describing certificate validation error or null if it fails.

public DigitalSignatureValidationResult.CertificateStatus getCertificateChainValidationStatus ()

Returns status of certificate verification. If this is not OK or OK_BUT_SELF_SIGNED, more information can be retrieved with getCertificateChainValidationErrorMessage().

Returns

public DigitalSignatureValidationResult.DocumentIntegrityStatus getDocumentIntegrityStatus ()

Returns status of document integrity. If the document content has been changed or tampered with, this will return an error status. Note that this does not check if there was any content or annotations added to the document - use wasDocumentModified() check for that.

Returns

public List<DigitalSignatureValidationResult.ValidationProblem> getProblems ()

Returns of list of problems when validation status is either WARNING or ERROR. If the list contains CERTIFICATE_CHAIN_FAILURE, more information can be retrieved with getCertificateChainValidationStatus() and getCertificateChainValidationErrorMessage(). If the list contains DOCUMENT_INTEGRITY_FAILURE, more information can be retrieved with getDocumentIntegrityStatus().

Returns
  • List of problems if validation failed or empty list if the signature is valid.

public ValidationStatus getValidationStatus ()

Returns overall validity status of the digital signature. This reflects state of all other statuses and should be checked first.

Returns

public String toString ()

public boolean wasDocumentModified ()

Returns if there was any appending done to the document after this signature. If the content of signed area has changed, getDocumentIntegrityStatus() will report an integrity failure. If there was any addition (new annotation etc.) added to the document, getDocumentIntegrityStatus() will report OK and this will return true.

Returns
  • true if there was anything appended after the document was signed, false otherwise.

public void writeToParcel (Parcel dest, int flags)