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
PdfDocumentThe 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
stringname 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
stringthe signature to validate (it may be a timestamp)
ocsp
IOcspClientthe interface to get the OCSP
crl
ICrlClientthe interface to get the CRL
certOption
LtvVerification.CertificateOptionoptions as to how many certificates to include
level
LtvVerification.Levelthe validation options to include
certInclude
LtvVerification.CertificateInclusioncertificate 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
IIssuingCertificateRetrieverIIssuingCertificateRetriever 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.RevocationDataNecessityLtvVerification.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.