iText 9.0.0 API
iText.Signatures.LtvVerifier Class Reference

Verifies the signatures in an LTV document. More...

Inheritance diagram for iText.Signatures.LtvVerifier:
iText.Signatures.RootStoreVerifier iText.Signatures.CertificateVerifier

Public Member Functions

  LtvVerifier (PdfDocument document)
  Creates a VerificationData object for a PdfReader More...
 
virtual void  SetVerifier (CertificateVerifier verifier)
  Sets an extra verifier. More...
 
virtual void  SetCertificateOption (LtvVerification.CertificateOption option)
  Sets the certificate option. More...
 
virtual void  SetVerifyRootCertificate (bool verifyRootCertificate)
  Set the verifyRootCertificate to false if you can't verify the root certificate. More...
 
virtual void  SetEventCountingMetaInfo (IMetaInfo metaInfo)
  Sets the iText.Commons.Actions.Contexts.IMetaInfo that will be used during iText.Kernel.Pdf.PdfDocument creation. More...
 
virtual IList< VerificationOK Verify (IList< VerificationOK > result)
  Verifies all the document-level timestamps and all the signatures in the document. More...
 
virtual IList< VerificationOK VerifySignature ()
  Verifies a document level timestamp. More...
 
virtual void  VerifyChain (IX509Certificate[] chain)
  Checks the certificates in a certificate chain: are they valid on a specific date, and do they chain up correctly? More...
 
override IList< VerificationOK Verify (IX509Certificate signCert, IX509Certificate issuerCert, DateTime signDate)
  Verifies certificates against a list of CRLs and OCSP responses. More...
 
virtual void  SwitchToPreviousRevision ()
  Switches to the previous revision. More...
 
virtual IList< IX509Crl GetCRLsFromDSS ()
  Gets a list of X509CRL objects from a Document Security Store. More...
 
virtual IList< IBasicOcspResponse GetOCSPResponsesFromDSS ()
  Gets OCSP responses from the Document Security Store. More...
 
- Public Member Functions inherited from iText.Signatures.RootStoreVerifier
  RootStoreVerifier (CertificateVerifier verifier)
  Creates a RootStoreVerifier in a chain of verifiers. More...
 
virtual void  SetRootStore (List< IX509Certificate > keyStore)
  Sets the Key Store against which a certificate can be checked. More...
 
override IList< VerificationOK Verify (IX509Certificate signCert, IX509Certificate issuerCert, DateTime signDate)
  Verifies a single certificate against a key store (if present). More...
 
- Public Member Functions inherited from iText.Signatures.CertificateVerifier
  CertificateVerifier (iText.Signatures.CertificateVerifier verifier)
  Creates the final CertificateVerifier in a chain of verifiers. More...
 
virtual void  SetOnlineCheckingAllowed (bool onlineCheckingAllowed)
  Decide whether or not online checking is allowed. More...
 

Package Functions

virtual void  InitLtvVerifier (PdfDocument document)
  Initialize LtvVerifier object by using provided document. More...
 
virtual PdfPKCS7  CoversWholeDocument ()
  Checks if the signature covers the whole document and throws an exception if the document was altered More...
 

Package Attributes

LtvVerification.CertificateOption  option = LtvVerification.CertificateOption.SIGNING_CERTIFICATE
  Option to specify level of verification; signing certificate only or the entire chain. More...
 
bool  verifyRootCertificate = true
  Verify root. More...
 
PdfDocument  document
  A document object for the revision that is being verified. More...
 
PdfAcroForm  acroForm
  The fields in the revision that is being verified. More...
 
DateTime  signDate
  The date the revision was signed, or null for the highest revision. More...
 
String  signatureName
  The signature that covers the revision. More...
 
PdfPKCS7  pkcs7
  The PdfPKCS7 object for the signature. More...
 
bool  latestRevision = true
  Indicates if we're working with the latest revision. More...
 
PdfDictionary  dss
  The document security store for the revision that is being verified More...
 
IMetaInfo  metaInfo
  The meta info More...
 
- Package Attributes inherited from iText.Signatures.RootStoreVerifier
List< IX509Certificate rootStore = null
  A key store against which certificates can be verified. More...
 
- Package Attributes inherited from iText.Signatures.CertificateVerifier
iText.Signatures.CertificateVerifier  verifier
  The previous CertificateVerifier in the chain of verifiers. More...
 
bool  onlineCheckingAllowed = true
  Indicates if going online to verify a certificate is allowed. More...
 

Static Package Attributes

static readonly ILogger  LOGGER
  The Logger instance More...
 

Detailed Description

Verifies the signatures in an LTV document.

Constructor & Destructor Documentation

◆ LtvVerifier()

iText.Signatures.LtvVerifier.LtvVerifier ( PdfDocument  document )
inline

Creates a VerificationData object for a PdfReader

Parameters
document The document we want to verify.

Member Function Documentation

◆ CoversWholeDocument()

virtual PdfPKCS7 iText.Signatures.LtvVerifier.CoversWholeDocument ( )
inlinepackagevirtual

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

Returns
a PdfPKCS7 object

◆ GetCRLsFromDSS()

virtual IList<IX509Crl> iText.Signatures.LtvVerifier.GetCRLsFromDSS ( )
inlinevirtual

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

Returns
a list of CRLs

◆ GetOCSPResponsesFromDSS()

virtual IList<IBasicOcspResponse> iText.Signatures.LtvVerifier.GetOCSPResponsesFromDSS ( )
inlinevirtual

Gets OCSP responses from the Document Security Store.

Returns
a list of IBasicOCSPResp objects

◆ InitLtvVerifier()

virtual void iText.Signatures.LtvVerifier.InitLtvVerifier ( PdfDocument  document )
inlinepackagevirtual

Initialize LtvVerifier object by using provided document.

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

Parameters
document

iText.Kernel.Pdf.PdfDocument instance to be verified

◆ SetCertificateOption()

virtual void iText.Signatures.LtvVerifier.SetCertificateOption ( LtvVerification.CertificateOption  option )
inlinevirtual

Sets the certificate option.

Parameters
option Either CertificateOption.SIGNING_CERTIFICATE (default) or CertificateOption.WHOLE_CHAIN

◆ SetEventCountingMetaInfo()

virtual void iText.Signatures.LtvVerifier.SetEventCountingMetaInfo ( IMetaInfo  metaInfo )
inlinevirtual

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

Parameters
metaInfo meta info to set

◆ SetVerifier()

virtual void iText.Signatures.LtvVerifier.SetVerifier ( CertificateVerifier  verifier )
inlinevirtual

Sets an extra verifier.

Parameters
verifier the verifier to set

◆ SetVerifyRootCertificate()

virtual void iText.Signatures.LtvVerifier.SetVerifyRootCertificate ( bool  verifyRootCertificate )
inlinevirtual

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

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

◆ SwitchToPreviousRevision()

virtual void iText.Signatures.LtvVerifier.SwitchToPreviousRevision ( )
inlinevirtual

Switches to the previous revision.

◆ Verify() [1/2]

virtual IList<VerificationOK> iText.Signatures.LtvVerifier.Verify ( IList< VerificationOK result )
inlinevirtual

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

Parameters
result a list of VerificationOK objects
Returns
a list of all VerificationOK objects after verification

◆ Verify() [2/2]

override IList<VerificationOK> iText.Signatures.LtvVerifier.Verify ( IX509Certificate  signCert,
IX509Certificate  issuerCert,
DateTime  signDate 
)
inlinevirtual

Verifies certificates against a list of CRLs and OCSP responses.

Parameters
signCert the signing certificate
issuerCert the issuer's certificate
Returns
a list of VerificationOK objects. The list will be empty if the certificate couldn't be verified.
See also
RootStoreVerifier.Verify(iText.Commons.Bouncycastle.Cert.IX509Certificate, iText.Commons.Bouncycastle.Cert.IX509Certificate, System.DateTime)

Reimplemented from iText.Signatures.CertificateVerifier.

◆ VerifyChain()

virtual void iText.Signatures.LtvVerifier.VerifyChain ( IX509Certificate[]  chain )
inlinevirtual

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

Parameters
chain the certificate chain

◆ VerifySignature()

virtual IList<VerificationOK> iText.Signatures.LtvVerifier.VerifySignature ( )
inlinevirtual

Verifies a document level timestamp.

Returns
a list of VerificationOK objects

Member Data Documentation

◆ acroForm

PdfAcroForm iText.Signatures.LtvVerifier.acroForm
package

The fields in the revision that is being verified.

◆ document

PdfDocument iText.Signatures.LtvVerifier.document
package

A document object for the revision that is being verified.

◆ dss

PdfDictionary iText.Signatures.LtvVerifier.dss
package

The document security store for the revision that is being verified

◆ latestRevision

bool iText.Signatures.LtvVerifier.latestRevision = true
package

Indicates if we're working with the latest revision.

◆ LOGGER

readonly ILogger iText.Signatures.LtvVerifier.LOGGER
staticpackage
Initial value:
= ITextLogManager.GetLogger(typeof(iText.Signatures.LtvVerifier
))

The Logger instance

◆ metaInfo

IMetaInfo iText.Signatures.LtvVerifier.metaInfo
package

The meta info

◆ option

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

◆ pkcs7

PdfPKCS7 iText.Signatures.LtvVerifier.pkcs7
package

The PdfPKCS7 object for the signature.

◆ signatureName

String iText.Signatures.LtvVerifier.signatureName
package

The signature that covers the revision.

◆ signDate

DateTime iText.Signatures.LtvVerifier.signDate
package

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

◆ verifyRootCertificate

bool iText.Signatures.LtvVerifier.verifyRootCertificate = true
package

Verify root.

iText.Signatures.LtvVerifier
Verifies the signatures in an LTV document.
Definition: LtvVerifier.cs:44
iText.Signatures
Definition: AccessPermissions.cs:23
iText
Definition: Barcode128.cs:35