SignatureValidator should be used instead.@Deprecated public class LtvVerifier extends RootStoreVerifier
| Modifier and Type | Field and Description |
|---|---|
protected PdfAcroForm |
acroForm
Deprecated.
The fields in the revision that is being verified.
|
protected PdfDocument |
document
Deprecated.
A document object for the revision that is being verified.
|
protected PdfDictionary |
dss
Deprecated.
The document security store for the revision that is being verified
|
protected boolean |
latestRevision
Deprecated.
Indicates if we're working with the latest revision.
|
protected static org.slf4j.Logger |
LOGGER
Deprecated.
The Logger instance
|
protected com.itextpdf.commons.actions.contexts.IMetaInfo |
metaInfo
Deprecated.
The meta info
|
protected LtvVerification.CertificateOption |
option
Deprecated.
Option to specify level of verification; signing certificate only or the entire chain.
|
protected PdfPKCS7 |
pkcs7
Deprecated.
The PdfPKCS7 object for the signature.
|
protected String |
securityProviderCode
Deprecated.
Security provider to use, use null for default
|
protected String |
signatureName
Deprecated.
The signature that covers the revision.
|
protected Date |
signDate
Deprecated.
The date the revision was signed, or
null for the highest revision. |
protected boolean |
verifyRootCertificate
Deprecated.
Verify root.
|
rootStoreonlineCheckingAllowed, verifier| Constructor and Description |
|---|
LtvVerifier(PdfDocument document)
Deprecated.
Creates a VerificationData object for a PdfReader
|
LtvVerifier(PdfDocument document,
String securityProviderCode)
Deprecated.
Create
LtvVerifier class instance from the PdfDocument and security provider code. |
| Modifier and Type | Method and Description |
|---|---|
protected PdfPKCS7 |
coversWholeDocument()
Deprecated.
Checks if the signature covers the whole document
and throws an exception if the document was altered
|
List<X509CRL> |
getCRLsFromDSS()
Deprecated.
Gets a list of X509CRL objects from a Document Security Store.
|
List<com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp> |
getOCSPResponsesFromDSS()
Deprecated.
Gets OCSP responses from the Document Security Store.
|
protected void |
initLtvVerifier(PdfDocument document)
Deprecated.
Initialize
LtvVerifier object by using provided document. |
void |
setCertificateOption(LtvVerification.CertificateOption option)
Deprecated.
Sets the certificate option.
|
void |
setEventCountingMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
Deprecated.
Sets the
IMetaInfo that will be used during PdfDocument creation. |
void |
setVerifier(CertificateVerifier verifier)
Deprecated.
Sets an extra verifier.
|
void |
setVerifyRootCertificate(boolean verifyRootCertificate)
Deprecated.
Set the verifyRootCertificate to false if you can't verify the root certificate.
|
void |
switchToPreviousRevision()
Deprecated.
Switches to the previous revision.
|
List<VerificationOK> |
verify(List<VerificationOK> result)
Deprecated.
Verifies all the document-level timestamps and all the signatures in the document.
|
List<VerificationOK> |
verify(X509Certificate signCert,
X509Certificate issuerCert,
Date signDate)
Deprecated.
Verifies certificates against a list of CRLs and OCSP responses.
|
void |
verifyChain(Certificate[] chain)
Deprecated.
Checks the certificates in a certificate chain:
are they valid on a specific date, and
do they chain up correctly?
|
List<VerificationOK> |
verifySignature()
Deprecated.
Verifies a document level timestamp.
|
setRootStoresetOnlineCheckingAllowedprotected static final org.slf4j.Logger LOGGER
protected LtvVerification.CertificateOption option
protected boolean verifyRootCertificate
protected PdfDocument document
protected PdfAcroForm acroForm
protected Date signDate
null for the highest revision.protected String signatureName
protected PdfPKCS7 pkcs7
protected boolean latestRevision
protected PdfDictionary dss
protected String securityProviderCode
protected com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo
public LtvVerifier(PdfDocument document) throws GeneralSecurityException
document - The document we want to verify.GeneralSecurityException - if some problem with signature or security are occurredpublic LtvVerifier(PdfDocument document, String securityProviderCode) throws GeneralSecurityException
LtvVerifier class instance from the PdfDocument and security provider code.document - PdfDocument which will be verifiedsecurityProviderCode - security provider code to read signaturesGeneralSecurityException - if some problem with signature or security are occurredpublic void setVerifier(CertificateVerifier verifier)
verifier - the verifier to setpublic void setCertificateOption(LtvVerification.CertificateOption option)
option - Either CertificateOption.SIGNING_CERTIFICATE (default) or CertificateOption.WHOLE_CHAINpublic void setVerifyRootCertificate(boolean verifyRootCertificate)
verifyRootCertificate - false if you can't verify the root certificate, otherwise truepublic void setEventCountingMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
IMetaInfo that will be used during PdfDocument creation.metaInfo - meta info to setpublic List<VerificationOK> verify(List<VerificationOK> result) throws IOException, GeneralSecurityException
result - a list of VerificationOK objectsVerificationOK objects after verificationIOException - signals that an I/O exception has occurredGeneralSecurityException - if some problems with signature or security occurredpublic List<VerificationOK> verifySignature() throws GeneralSecurityException, IOException
VerificationOK objectsGeneralSecurityException - if some problems with signature or security occurredIOException - signals that an I/O exception has occurredpublic void verifyChain(Certificate[] chain) throws GeneralSecurityException
chain - the certificate chainGeneralSecurityException - when requested cryptographic algorithm or security provider
is not available, if the certificate is invalid on a specific date and if the
certificates chained up incorrectlypublic List<VerificationOK> verify(X509Certificate signCert, X509Certificate issuerCert, Date signDate) throws GeneralSecurityException
verify in class RootStoreVerifiersignCert - the signing certificateissuerCert - the issuer's certificatesignDate - the date the certificate needs to be validVerificationOK objects.
The list will be empty if the certificate couldn't be verified.GeneralSecurityException - if some problems with signature or security occurredRootStoreVerifier.verify(java.security.cert.X509Certificate,
java.security.cert.X509Certificate, java.util.Date)public void switchToPreviousRevision()
throws IOException,
GeneralSecurityException
IOException - signals that an I/O exception has occurredGeneralSecurityException - if some problems with signature or security occurredpublic List<X509CRL> getCRLsFromDSS() throws GeneralSecurityException
GeneralSecurityException - when requested cryptographic algorithm or security provider
is not availablepublic List<com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp> getOCSPResponsesFromDSS() throws GeneralSecurityException
GeneralSecurityException - if OCSP response failedprotected void initLtvVerifier(PdfDocument document) throws GeneralSecurityException
LtvVerifier object by using provided document.
This method reads all the existing signatures and mathematically validates the last one.document - PdfDocument instance to be verifiedGeneralSecurityException - if some problems with signature or security are occurredprotected PdfPKCS7 coversWholeDocument() throws GeneralSecurityException
GeneralSecurityException - if some problems with signature or security occurredCopyright © 1998–2025 Apryse Group NV. All rights reserved.