Table of Contents

Class LtvVerifier

Namespace
iText.Signatures
Assembly
itext.sign.dll

Verifies the signatures in an LTV document.

[Obsolete("starting from 8.0.5.iText.Signatures.Validation.V1.SignatureValidator should be used instead.")]
public class LtvVerifier : RootStoreVerifier
Inheritance
LtvVerifier
Inherited Members

Constructors

LtvVerifier(PdfDocument)

Creates a VerificationData object for a PdfReader

public LtvVerifier(PdfDocument document)

Parameters

document PdfDocument

The document we want to verify.

Fields

LOGGER

The Logger instance

protected static readonly ILogger LOGGER

Field Value

ILogger

acroForm

The fields in the revision that is being verified.

protected PdfAcroForm acroForm

Field Value

PdfAcroForm

document

A document object for the revision that is being verified.

protected PdfDocument document

Field Value

PdfDocument

dss

The document security store for the revision that is being verified

protected PdfDictionary dss

Field Value

PdfDictionary

latestRevision

Indicates if we're working with the latest revision.

protected bool latestRevision

Field Value

bool

metaInfo

The meta info

protected IMetaInfo metaInfo

Field Value

IMetaInfo

option

Option to specify level of verification; signing certificate only or the entire chain.

protected LtvVerification.CertificateOption option

Field Value

LtvVerification.CertificateOption

pkcs7

The PdfPKCS7 object for the signature.

protected PdfPKCS7 pkcs7

Field Value

PdfPKCS7

signDate

The date the revision was signed, or null for the highest revision.

protected DateTime signDate

Field Value

DateTime

signatureName

The signature that covers the revision.

protected string signatureName

Field Value

string

verifyRootCertificate

Verify root.

protected bool verifyRootCertificate

Field Value

bool

Methods

CoversWholeDocument()

Checks if the signature covers the whole document and throws an exception if the document was altered

protected virtual PdfPKCS7 CoversWholeDocument()

Returns

PdfPKCS7

a PdfPKCS7 object

GetCRLsFromDSS()

Gets a list of X509CRL objects from a Document Security Store.

public virtual IList<IX509Crl> GetCRLsFromDSS()

Returns

IList<IX509Crl>

a list of CRLs

GetOCSPResponsesFromDSS()

Gets OCSP responses from the Document Security Store.

public virtual IList<IBasicOcspResponse> GetOCSPResponsesFromDSS()

Returns

IList<IBasicOcspResponse>

a list of IBasicOCSPResp objects

InitLtvVerifier(PdfDocument)

Initialize LtvVerifier object by using provided document.

protected virtual void InitLtvVerifier(PdfDocument document)

Parameters

document PdfDocument

PdfDocument instance to be verified

Remarks

Initialize LtvVerifier object by using provided document. This method reads all the existing signatures and mathematically validates the last one.

SetCertificateOption(CertificateOption)

Sets the certificate option.

public virtual void SetCertificateOption(LtvVerification.CertificateOption option)

Parameters

option LtvVerification.CertificateOption

Either CertificateOption.SIGNING_CERTIFICATE (default) or CertificateOption.WHOLE_CHAIN

SetEventCountingMetaInfo(IMetaInfo)

Sets the iText.Commons.Actions.Contexts.IMetaInfo that will be used during PdfDocument creation.

public virtual void SetEventCountingMetaInfo(IMetaInfo metaInfo)

Parameters

metaInfo IMetaInfo

meta info to set

SetVerifier(CertificateVerifier)

Sets an extra verifier.

public virtual void SetVerifier(CertificateVerifier verifier)

Parameters

verifier CertificateVerifier

the verifier to set

SetVerifyRootCertificate(bool)

Set the verifyRootCertificate to false if you can't verify the root certificate.

public virtual void SetVerifyRootCertificate(bool verifyRootCertificate)

Parameters

verifyRootCertificate bool

false if you can't verify the root certificate, otherwise true

SwitchToPreviousRevision()

Switches to the previous revision.

public virtual void SwitchToPreviousRevision()

Verify(IList<VerificationOK>)

Verifies all the document-level timestamps and all the signatures in the document.

public virtual IList<VerificationOK> Verify(IList<VerificationOK> result)

Parameters

result IList<VerificationOK>

a list of VerificationOK objects

Returns

IList<VerificationOK>

a list of all VerificationOK objects after verification

Verify(IX509Certificate, IX509Certificate, DateTime)

Verifies certificates against a list of CRLs and OCSP responses.

public override IList<VerificationOK> Verify(IX509Certificate signCert, IX509Certificate issuerCert, DateTime signDate)

Parameters

signCert IX509Certificate

the signing certificate

issuerCert IX509Certificate

the issuer's certificate

signDate DateTime

Returns

IList<VerificationOK>

a list of VerificationOK objects. The list will be empty if the certificate couldn't be verified.

See Also
Verify(IX509Certificate, IX509Certificate, DateTime)

VerifyChain(IX509Certificate[])

Checks the certificates in a certificate chain: are they valid on a specific date, and do they chain up correctly?

public virtual void VerifyChain(IX509Certificate[] chain)

Parameters

chain IX509Certificate[]

the certificate chain

VerifySignature()

Verifies a document level timestamp.

public virtual IList<VerificationOK> VerifySignature()

Returns

IList<VerificationOK>

a list of VerificationOK objects