Package com.itextpdf.signatures
Class LtvVerifier
- java.lang.Object
-
- com.itextpdf.signatures.CertificateVerifier
-
- com.itextpdf.signatures.RootStoreVerifier
-
- com.itextpdf.signatures.LtvVerifier
-
@Deprecated public class LtvVerifier extends RootStoreVerifier
Deprecated.starting from 8.0.5.SignatureValidator
should be used instead.Verifies the signatures in an LTV document.
-
-
Field Summary
Fields Modifier and Type Field Description protected PdfAcroForm
acroForm
Deprecated.The fields in the revision that is being verified.private static IBouncyCastleFactory
BOUNCY_CASTLE_FACTORY
Deprecated.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 verifiedprotected boolean
latestRevision
Deprecated.Indicates if we're working with the latest revision.protected static org.slf4j.Logger
LOGGER
Deprecated.The Logger instanceprotected IMetaInfo
metaInfo
Deprecated.The meta infoprotected 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 java.lang.String
securityProviderCode
Deprecated.Security provider to use, use null for defaultprivate SignatureUtil
sgnUtil
Deprecated.protected java.lang.String
signatureName
Deprecated.The signature that covers the revision.protected java.util.Date
signDate
Deprecated.The date the revision was signed, ornull
for the highest revision.protected boolean
verifyRootCertificate
Deprecated.Verify root.-
Fields inherited from class com.itextpdf.signatures.RootStoreVerifier
rootStore
-
Fields inherited from class com.itextpdf.signatures.CertificateVerifier
onlineCheckingAllowed, verifier
-
-
Constructor Summary
Constructors Constructor Description LtvVerifier(PdfDocument document)
Deprecated.Creates a VerificationData object for a PdfReaderLtvVerifier(PdfDocument document, java.lang.String securityProviderCode)
Deprecated.CreateLtvVerifier
class instance from thePdfDocument
and security provider code.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected PdfPKCS7
coversWholeDocument()
Deprecated.Checks if the signature covers the whole document and throws an exception if the document was alteredjava.util.List<java.security.cert.X509CRL>
getCRLsFromDSS()
Deprecated.Gets a list of X509CRL objects from a Document Security Store.java.util.List<IBasicOCSPResp>
getOCSPResponsesFromDSS()
Deprecated.Gets OCSP responses from the Document Security Store.protected void
initLtvVerifier(PdfDocument document)
Deprecated.InitializeLtvVerifier
object by using provided document.void
setCertificateOption(LtvVerification.CertificateOption option)
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
switchToPreviousRevision()
Deprecated.Switches to the previous revision.java.util.List<VerificationOK>
verify(java.security.cert.X509Certificate signCert, java.security.cert.X509Certificate issuerCert, java.util.Date signDate)
Deprecated.Verifies certificates against a list of CRLs and OCSP responses.java.util.List<VerificationOK>
verify(java.util.List<VerificationOK> result)
Deprecated.Verifies all the document-level timestamps and all the signatures in the document.void
verifyChain(java.security.cert.Certificate[] chain)
Deprecated.Checks the certificates in a certificate chain: are they valid on a specific date, and do they chain up correctly?java.util.List<VerificationOK>
verifySignature()
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 Detail
-
BOUNCY_CASTLE_FACTORY
private static final IBouncyCastleFactory BOUNCY_CASTLE_FACTORY
Deprecated.
-
LOGGER
protected static final org.slf4j.Logger LOGGER
Deprecated.The Logger instance
-
option
protected LtvVerification.CertificateOption option
Deprecated.Option to specify level of verification; signing certificate only or the entire chain.
-
verifyRootCertificate
protected boolean verifyRootCertificate
Deprecated.Verify root.
-
document
protected PdfDocument document
Deprecated.A document object for the revision that is being verified.
-
acroForm
protected PdfAcroForm acroForm
Deprecated.The fields in the revision that is being verified.
-
signDate
protected java.util.Date signDate
Deprecated.The date the revision was signed, ornull
for the highest revision.
-
signatureName
protected java.lang.String signatureName
Deprecated.The signature that covers the revision.
-
pkcs7
protected PdfPKCS7 pkcs7
Deprecated.The PdfPKCS7 object for the signature.
-
latestRevision
protected boolean latestRevision
Deprecated.Indicates if we're working with the latest revision.
-
dss
protected PdfDictionary dss
Deprecated.The document security store for the revision that is being verified
-
securityProviderCode
protected java.lang.String securityProviderCode
Deprecated.Security provider to use, use null for default
-
metaInfo
protected IMetaInfo metaInfo
Deprecated.The meta info
-
sgnUtil
private SignatureUtil sgnUtil
Deprecated.
-
-
Constructor Detail
-
LtvVerifier
public LtvVerifier(PdfDocument document) throws java.security.GeneralSecurityException
Deprecated.Creates a VerificationData object for a PdfReader- Parameters:
document
- The document we want to verify.- Throws:
java.security.GeneralSecurityException
- if some problem with signature or security are occurred
-
LtvVerifier
public LtvVerifier(PdfDocument document, java.lang.String securityProviderCode) throws java.security.GeneralSecurityException
Deprecated.CreateLtvVerifier
class instance from thePdfDocument
and security provider code.- Parameters:
document
-PdfDocument
which will be verifiedsecurityProviderCode
- security provider code to read signatures- Throws:
java.security.GeneralSecurityException
- if some problem with signature or security are occurred
-
-
Method Detail
-
setVerifier
public void setVerifier(CertificateVerifier verifier)
Deprecated.Sets an extra verifier.- Parameters:
verifier
- the verifier to set
-
setCertificateOption
public void setCertificateOption(LtvVerification.CertificateOption option)
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
public void setEventCountingMetaInfo(IMetaInfo metaInfo)
Deprecated.Sets theIMetaInfo
that will be used duringPdfDocument
creation.- Parameters:
metaInfo
- meta info to set
-
verify
public java.util.List<VerificationOK> verify(java.util.List<VerificationOK> result) throws java.io.IOException, java.security.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:
java.io.IOException
- signals that an I/O exception has occurredjava.security.GeneralSecurityException
- if some problems with signature or security occurred
-
verifySignature
public java.util.List<VerificationOK> verifySignature() throws java.security.GeneralSecurityException, java.io.IOException
Deprecated.Verifies a document level timestamp.- Returns:
- a list of
VerificationOK
objects - Throws:
java.security.GeneralSecurityException
- if some problems with signature or security occurredjava.io.IOException
- signals that an I/O exception has occurred
-
verifyChain
public void verifyChain(java.security.cert.Certificate[] chain) throws java.security.GeneralSecurityException
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:
java.security.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 java.util.List<VerificationOK> verify(java.security.cert.X509Certificate signCert, java.security.cert.X509Certificate issuerCert, java.util.Date signDate) throws java.security.GeneralSecurityException
Deprecated.Verifies certificates against a list of CRLs and OCSP responses.- Overrides:
verify
in classRootStoreVerifier
- Parameters:
signCert
- the signing certificateissuerCert
- the issuer's certificatesignDate
- 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:
java.security.GeneralSecurityException
- if some problems with signature or security occurred- See Also:
RootStoreVerifier.verify(java.security.cert.X509Certificate, java.security.cert.X509Certificate, java.util.Date)
-
switchToPreviousRevision
public void switchToPreviousRevision() throws java.io.IOException, java.security.GeneralSecurityException
Deprecated.Switches to the previous revision.- Throws:
java.io.IOException
- signals that an I/O exception has occurredjava.security.GeneralSecurityException
- if some problems with signature or security occurred
-
getCRLsFromDSS
public java.util.List<java.security.cert.X509CRL> getCRLsFromDSS() throws java.security.GeneralSecurityException
Deprecated.Gets a list of X509CRL objects from a Document Security Store.- Returns:
- a list of CRLs
- Throws:
java.security.GeneralSecurityException
- when requested cryptographic algorithm or security provider is not available
-
getOCSPResponsesFromDSS
public java.util.List<IBasicOCSPResp> getOCSPResponsesFromDSS() throws java.security.GeneralSecurityException
Deprecated.Gets OCSP responses from the Document Security Store.- Returns:
- a list of IBasicOCSPResp objects
- Throws:
java.security.GeneralSecurityException
- if OCSP response failed
-
initLtvVerifier
protected void initLtvVerifier(PdfDocument document) throws java.security.GeneralSecurityException
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:
java.security.GeneralSecurityException
- if some problems with signature or security are occurred
-
coversWholeDocument
protected PdfPKCS7 coversWholeDocument() throws java.security.GeneralSecurityException
Deprecated.Checks if the signature covers the whole document and throws an exception if the document was altered- Returns:
- a PdfPKCS7 object
- Throws:
java.security.GeneralSecurityException
- if some problems with signature or security occurred
-
-