Package com.itextpdf.signatures
Class RootStoreVerifier
java.lang.Object
com.itextpdf.signatures.CertificateVerifier
com.itextpdf.signatures.RootStoreVerifier
- Direct Known Subclasses:
-
CRLVerifier
,LtvVerifier
,OCSPVerifier
Verifies a certificate against a
KeyStore
containing trusted anchors.
-
Field Summary
Modifier and TypeFieldDescriptionprotected KeyStore
A key store against which certificates can be verified.Fields inherited from class com.itextpdf.signatures.CertificateVerifier
onlineCheckingAllowed, verifier
-
Constructor Summary
ConstructorDescriptionRootStoreVerifier
(CertificateVerifier verifier) Creates a RootStoreVerifier in a chain of verifiers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setRootStore
(KeyStore keyStore) Sets the Key Store against which a certificate can be checked.verify
(X509Certificate signCert, X509Certificate issuerCert, Date signDate) Verifies a single certificate against a key store (if present).Methods inherited from class com.itextpdf.signatures.CertificateVerifier
setOnlineCheckingAllowed
-
Field Details
-
rootStore
A key store against which certificates can be verified.
-
-
Constructor Details
-
RootStoreVerifier
Creates a RootStoreVerifier in a chain of verifiers.- Parameters:
-
verifier
- the next verifier in the chain
-
-
Method Details
-
setRootStore
Sets the Key Store against which a certificate can be checked.- Parameters:
-
keyStore
- a root store
-
verify
public List<VerificationOK> verify(X509Certificate signCert, X509Certificate issuerCert, Date signDate) throws GeneralSecurityException Verifies a single certificate against a key store (if present).- Overrides:
-
verify
in classCertificateVerifier
- Parameters:
-
signCert
- the certificate to verify -
issuerCert
- the issuer 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
- thrown if the certificate has expired, isn't valid yet, or if an exception has been thrown inCertificate#verify
.
-