Package com.itextpdf.text.pdf.security
Class LtvVerification
- java.lang.Object
-
- com.itextpdf.text.pdf.security.LtvVerification
-
public class LtvVerification extends java.lang.ObjectAdd verification according to PAdES-LTV (part 4)- Author:
- Paulo Soares
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLtvVerification.CertificateInclusionCertificate inclusion in the DSS and VRI dictionaries in the CERT and CERTS keysstatic classLtvVerification.CertificateOptionOptions for how many certificates to includestatic classLtvVerification.LevelWhat type of verification to include
-
Constructor Summary
Constructors Constructor Description LtvVerification(PdfStamper stp)The verification constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddVerification(java.lang.String signatureName, OcspClient ocsp, CrlClient crl, LtvVerification.CertificateOption certOption, LtvVerification.Level level, LtvVerification.CertificateInclusion certInclude)Add verification for a particular signaturebooleanaddVerification(java.lang.String signatureName, java.util.Collection<byte[]> ocsps, java.util.Collection<byte[]> crls, java.util.Collection<byte[]> certs)Alternative addVerification.voidmerge()Merges the validation with any validation already in the document or creates a new one.
-
-
-
Constructor Detail
-
LtvVerification
public LtvVerification(PdfStamper stp)
The verification constructor. This class should only be created with PdfStamper.getLtvVerification() otherwise the information will not be added to the Pdf.- Parameters:
stp- the PdfStamper to apply the validation to
-
-
Method Detail
-
addVerification
public boolean addVerification(java.lang.String signatureName, OcspClient ocsp, CrlClient crl, LtvVerification.CertificateOption certOption, LtvVerification.Level level, LtvVerification.CertificateInclusion certInclude) throws java.io.IOException, java.security.GeneralSecurityExceptionAdd verification for a particular signature- Parameters:
signatureName- the signature to validate (it may be a timestamp)ocsp- the interface to get the OCSPcrl- the interface to get the CRLcertOption-level- the validation options to includecertInclude-- Returns:
- true if a validation was generated, false otherwise
- Throws:
java.security.GeneralSecurityExceptionjava.io.IOException
-
addVerification
public boolean addVerification(java.lang.String signatureName, java.util.Collection<byte[]> ocsps, java.util.Collection<byte[]> crls, java.util.Collection<byte[]> certs) throws java.io.IOException, java.security.GeneralSecurityExceptionAlternative addVerification. I assume that inputs are deduplicated.- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
merge
public void merge() throws java.io.IOExceptionMerges the validation with any validation already in the document or creates a new one.- Throws:
java.io.IOException
-
-