Package com.itextpdf.signatures
Class LtvVerifier
java.lang.Object
com.itextpdf.signatures.CertificateVerifier
com.itextpdf.signatures.RootStoreVerifier
com.itextpdf.signatures.LtvVerifier
Deprecated.
Verifies the signatures in an LTV document.
-
Field Summary
Modifier and TypeFieldDescriptionprotected PdfAcroForm
Deprecated.The fields in the revision that is being verified.protected PdfDocument
Deprecated.A document object for the revision that is being verified.protected PdfDictionary
Deprecated.The document security store for the revision that is being verifiedprotected boolean
Deprecated.Indicates if we're working with the latest revision.protected static final org.slf4j.Logger
Deprecated.The Logger instanceprotected IMetaInfo
Deprecated.The meta infoprotected LtvVerification.CertificateOption
Deprecated.Option to specify level of verification; signing certificate only or the entire chain.protected PdfPKCS7
Deprecated.The PdfPKCS7 object for the signature.protected String
Deprecated.Security provider to use, use null for defaultprotected String
Deprecated.The signature that covers the revision.protected Date
Deprecated.The date the revision was signed, ornull
for the highest revision.protected boolean
Deprecated.Verify root.Fields inherited from class com.itextpdf.signatures.RootStoreVerifier
rootStore
Fields inherited from class com.itextpdf.signatures.CertificateVerifier
onlineCheckingAllowed, verifier
-
Constructor Summary
ConstructorDescriptionLtvVerifier
(PdfDocument document) Deprecated.Creates a VerificationData object for a PdfReaderLtvVerifier
(PdfDocument document, String securityProviderCode) Deprecated.CreateLtvVerifier
class instance from thePdfDocument
and security provider code. -
Method Summary
Modifier and TypeMethodDescriptionprotected PdfPKCS7
Deprecated.Checks if the signature covers the whole document and throws an exception if the document was alteredDeprecated.Gets a list of X509CRL objects from a Document Security Store.Deprecated.Gets OCSP responses from the Document Security Store.protected void
initLtvVerifier
(PdfDocument document) Deprecated.InitializeLtvVerifier
object by using provided document.void
Deprecated.Sets the certificate option.void
setEventCountingMetaInfo
(IMetaInfo metaInfo) Deprecated.Sets theIMetaInfo
that will be used duringPdfDocument
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
Deprecated.Switches to the previous revision.verify
(X509Certificate signCert, X509Certificate issuerCert, Date signDate) Deprecated.Verifies certificates against a list of CRLs and OCSP responses.verify
(List<VerificationOK> result) Deprecated.Verifies all the document-level timestamps and all the signatures in the document.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?Deprecated.Verifies a document level timestamp.Methods inherited from class com.itextpdf.signatures.RootStoreVerifier
setRootStore
Methods inherited from class com.itextpdf.signatures.CertificateVerifier
setOnlineCheckingAllowed
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGERDeprecated.The Logger instance -
option
Deprecated.Option to specify level of verification; signing certificate only or the entire chain. -
verifyRootCertificate
protected boolean verifyRootCertificateDeprecated.Verify root. -
document
Deprecated.A document object for the revision that is being verified. -
acroForm
Deprecated.The fields in the revision that is being verified. -
signDate
Deprecated.The date the revision was signed, ornull
for the highest revision. -
signatureName
Deprecated.The signature that covers the revision. -
pkcs7
Deprecated.The PdfPKCS7 object for the signature. -
latestRevision
protected boolean latestRevisionDeprecated.Indicates if we're working with the latest revision. -
dss
Deprecated.The document security store for the revision that is being verified -
securityProviderCode
Deprecated.Security provider to use, use null for default -
metaInfo
Deprecated.The meta info
-
-
Constructor Details
-
LtvVerifier
Deprecated.Creates a VerificationData object for a PdfReader- Parameters:
-
document
- The document we want to verify. - Throws:
-
GeneralSecurityException
- if some problem with signature or security are occurred
-
LtvVerifier
public LtvVerifier(PdfDocument document, String securityProviderCode) throws GeneralSecurityException Deprecated.CreateLtvVerifier
class instance from thePdfDocument
and security provider code.- Parameters:
-
document
-PdfDocument
which will be verified -
securityProviderCode
- security provider code to read signatures - Throws:
-
GeneralSecurityException
- if some problem with signature or security are occurred
-
-
Method Details
-
setVerifier
Deprecated.Sets an extra verifier.- Parameters:
-
verifier
- the verifier to set
-
setCertificateOption
Deprecated.Sets the certificate option.- Parameters:
-
option
- Either CertificateOption.SIGNING_CERTIFICATE (default) or CertificateOption.WHOLE_CHAIN
-
setVerifyRootCertificate
public void setVerifyRootCertificate(boolean verifyRootCertificate) Deprecated.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
-
setEventCountingMetaInfo
Deprecated.Sets theIMetaInfo
that will be used duringPdfDocument
creation.- Parameters:
-
metaInfo
- meta info to set
-
verify
public List<VerificationOK> verify(List<VerificationOK> result) throws IOException, GeneralSecurityException Deprecated.Verifies all the document-level timestamps and all the signatures in the document.- Parameters:
-
result
- a list ofVerificationOK
objects - Returns:
-
a list of all
VerificationOK
objects after verification - Throws:
-
IOException
- signals that an I/O exception has occurred -
GeneralSecurityException
- if some problems with signature or security occurred
-
verifySignature
Deprecated.Verifies a document level timestamp.- Returns:
-
a list of
VerificationOK
objects - Throws:
-
GeneralSecurityException
- if some problems with signature or security occurred -
IOException
- signals that an I/O exception has occurred
-
verifyChain
Deprecated.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 - Throws:
-
GeneralSecurityException
- 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 incorrectly
-
verify
public List<VerificationOK> verify(X509Certificate signCert, X509Certificate issuerCert, Date signDate) throws GeneralSecurityException Deprecated.Verifies certificates against a list of CRLs and OCSP responses.- Overrides:
-
verify
in classRootStoreVerifier
- Parameters:
-
signCert
- the signing certificate -
issuerCert
- the issuer's certificate -
signDate
- the date the certificate needs to be valid - Returns:
-
a list of
VerificationOK
objects. The list will be empty if the certificate couldn't be verified. - Throws:
-
GeneralSecurityException
- if some problems with signature or security occurred - See Also:
-
switchToPreviousRevision
Deprecated.Switches to the previous revision.- Throws:
-
IOException
- signals that an I/O exception has occurred -
GeneralSecurityException
- if some problems with signature or security occurred
-
getCRLsFromDSS
Deprecated.Gets a list of X509CRL objects from a Document Security Store.- Returns:
- a list of CRLs
- Throws:
-
GeneralSecurityException
- when requested cryptographic algorithm or security provider is not available
-
getOCSPResponsesFromDSS
Deprecated.Gets OCSP responses from the Document Security Store.- Returns:
- a list of IBasicOCSPResp objects
- Throws:
-
GeneralSecurityException
- if OCSP response failed
-
initLtvVerifier
Deprecated.InitializeLtvVerifier
object by using provided document. This method reads all the existing signatures and mathematically validates the last one.- Parameters:
-
document
-PdfDocument
instance to be verified - Throws:
-
GeneralSecurityException
- if some problems with signature or security are occurred
-
coversWholeDocument
Deprecated.Checks if the signature covers the whole document and throws an exception if the document was altered- Returns:
- a PdfPKCS7 object
- Throws:
-
GeneralSecurityException
- if some problems with signature or security occurred
-
SignatureValidator
should be used instead.