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
FieldsModifier and TypeFieldDescriptionprotected PdfAcroFormDeprecated.The fields in the revision that is being verified.protected PdfDocumentDeprecated.A document object for the revision that is being verified.protected PdfDictionaryDeprecated.The document security store for the revision that is being verifiedprotected booleanDeprecated.Indicates if we're working with the latest revision.protected static final org.slf4j.LoggerDeprecated.The Logger instanceprotected IMetaInfoDeprecated.The meta infoprotected LtvVerification.CertificateOptionDeprecated.Option to specify level of verification; signing certificate only or the entire chain.protected PdfPKCS7Deprecated.The PdfPKCS7 object for the signature.protected StringDeprecated.Security provider to use, use null for defaultprotected StringDeprecated.The signature that covers the revision.protected DateDeprecated.The date the revision was signed, ornullfor the highest revision.protected booleanDeprecated.Verify root.Fields inherited from class com.itextpdf.signatures.RootStoreVerifier
rootStoreFields inherited from class com.itextpdf.signatures.CertificateVerifier
onlineCheckingAllowed, verifier -
Constructor Summary
ConstructorsConstructorDescriptionLtvVerifier(PdfDocument document) Deprecated.Creates a VerificationData object for a PdfReaderLtvVerifier(PdfDocument document, String securityProviderCode) Deprecated.CreateLtvVerifierclass instance from thePdfDocumentand security provider code. -
Method Summary
Modifier and TypeMethodDescriptionprotected PdfPKCS7Deprecated.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 voidinitLtvVerifier(PdfDocument document) Deprecated.InitializeLtvVerifierobject by using provided document.voidDeprecated.Sets the certificate option.voidsetEventCountingMetaInfo(IMetaInfo metaInfo) Deprecated.Sets theIMetaInfothat will be used duringPdfDocumentcreation.voidsetVerifier(CertificateVerifier verifier) Deprecated.Sets an extra verifier.voidsetVerifyRootCertificate(boolean verifyRootCertificate) Deprecated.Set the verifyRootCertificate to false if you can't verify the root certificate.voidDeprecated.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.voidverifyChain(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
setRootStoreMethods 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, ornullfor 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.CreateLtvVerifierclass instance from thePdfDocumentand security provider code.- Parameters:
-
document-PdfDocumentwhich 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 theIMetaInfothat will be used duringPdfDocumentcreation.- 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 ofVerificationOKobjects - Returns:
-
a list of all
VerificationOKobjects 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
VerificationOKobjects - 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:
-
verifyin classRootStoreVerifier - Parameters:
-
signCert- the signing certificate -
issuerCert- the issuer's certificate -
signDate- the date the certificate needs to be valid - Returns:
-
a list of
VerificationOKobjects. 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.InitializeLtvVerifierobject by using provided document. This method reads all the existing signatures and mathematically validates the last one.- Parameters:
-
document-PdfDocumentinstance 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
-
SignatureValidatorshould be used instead.