Table of Contents

Class LtvVerification

Namespace
iText.Signatures
Assembly
itext.sign.dll

Add verification according to PAdES-LTV (part 4).

public class LtvVerification
Inheritance
LtvVerification
Inherited Members

Constructors

LtvVerification(PdfDocument)

The verification constructor.

public LtvVerification(PdfDocument document)

Parameters

document PdfDocument

The PdfDocument to apply the validation to.

Remarks

The verification constructor. This class should only be created with PdfStamper.getLtvVerification() otherwise the information will not be added to the Pdf.

Methods

AddVerification(string, ICollection<byte[]>, ICollection<byte[]>, ICollection<byte[]>)

Adds verification to the signature.

public virtual bool AddVerification(string signatureName, ICollection<byte[]> ocsps, ICollection<byte[]> crls, ICollection<byte[]> certs)

Parameters

signatureName string

name of the signature

ocsps ICollection<byte[]>

collection of DER-encoded BasicOCSPResponses

crls ICollection<byte[]>

collection of DER-encoded CRLs

certs ICollection<byte[]>

collection of DER-encoded certificates

Returns

bool

boolean

AddVerification(string, IOcspClient, ICrlClient, CertificateOption, Level, CertificateInclusion)

Add verification for a particular signature.

public virtual bool AddVerification(string signatureName, IOcspClient ocsp, ICrlClient crl, LtvVerification.CertificateOption certOption, LtvVerification.Level level, LtvVerification.CertificateInclusion certInclude)

Parameters

signatureName string

the signature to validate (it may be a timestamp)

ocsp IOcspClient

the interface to get the OCSP

crl ICrlClient

the interface to get the CRL

certOption LtvVerification.CertificateOption

options as to how many certificates to include

level LtvVerification.Level

the validation options to include

certInclude LtvVerification.CertificateInclusion

certificate inclusion options

Returns

bool

true if a validation was generated, false otherwise

ConvertToHex(byte[])

Converts an array of bytes to a String of hexadecimal values

public static string ConvertToHex(byte[] bytes)

Parameters

bytes byte[]

a byte array

Returns

string

the same bytes expressed as hexadecimal values

Merge()

Merges the validation with any validation already in the document or creates a new one.

public virtual void Merge()

SetIssuingCertificateRetriever(IIssuingCertificateRetriever)

Sets IIssuingCertificateRetriever instance needed to get CRL issuer certificates (using AIA extension).

public virtual LtvVerification SetIssuingCertificateRetriever(IIssuingCertificateRetriever issuingCertificateRetriever)

Parameters

issuingCertificateRetriever IIssuingCertificateRetriever

IIssuingCertificateRetriever instance to set

Returns

LtvVerification

this LtvVerification instance.

Remarks

Sets IIssuingCertificateRetriever instance needed to get CRL issuer certificates (using AIA extension).

Default value is DefaultIssuingCertificateRetriever.

SetRevocationDataNecessity(RevocationDataNecessity)

Sets LtvVerification.RevocationDataNecessity option to specify the necessity of revocation data.

public virtual LtvVerification SetRevocationDataNecessity(LtvVerification.RevocationDataNecessity revocationDataNecessity)

Parameters

revocationDataNecessity LtvVerification.RevocationDataNecessity

LtvVerification.RevocationDataNecessity value to set

Returns

LtvVerification

this LtvVerification instance.

Remarks

Sets LtvVerification.RevocationDataNecessity option to specify the necessity of revocation data.

Default value is OPTIONAL.