Package com.itextpdf.text.pdf.security
Class CertificateVerifier
- java.lang.Object
-
- com.itextpdf.text.pdf.security.CertificateVerifier
-
- Direct Known Subclasses:
RootStoreVerifier
public class CertificateVerifier extends java.lang.Object
Superclass for a series of certificate verifiers that will typically be used in a chain. It wraps anotherCertificateVerifier
that is the next element in the chain of which theverify()
method will be called.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
onlineCheckingAllowed
Indicates if going online to verify a certificate is allowed.protected CertificateVerifier
verifier
The previous CertificateVerifier in the chain of verifiers.
-
Constructor Summary
Constructors Constructor Description CertificateVerifier(CertificateVerifier verifier)
Creates the final CertificateVerifier in a chain of verifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setOnlineCheckingAllowed(boolean onlineCheckingAllowed)
Decide whether or not online checking is allowed.java.util.List<VerificationOK>
verify(java.security.cert.X509Certificate signCert, java.security.cert.X509Certificate issuerCert, java.util.Date signDate)
Checks the validity of the certificate, and calls the next verifier in the chain, if any.
-
-
-
Field Detail
-
verifier
protected CertificateVerifier verifier
The previous CertificateVerifier in the chain of verifiers.
-
onlineCheckingAllowed
protected boolean onlineCheckingAllowed
Indicates if going online to verify a certificate is allowed.
-
-
Constructor Detail
-
CertificateVerifier
public CertificateVerifier(CertificateVerifier verifier)
Creates the final CertificateVerifier in a chain of verifiers.- Parameters:
verifier
- the previous verifier in the chain
-
-
Method Detail
-
setOnlineCheckingAllowed
public void setOnlineCheckingAllowed(boolean onlineCheckingAllowed)
Decide whether or not online checking is allowed.- Parameters:
onlineCheckingAllowed
-
-
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, java.io.IOException
Checks the validity of the certificate, and calls the next verifier in the chain, if any.- Parameters:
signCert
- the certificate that needs to be checkedissuerCert
- its issuersignDate
- 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
java.io.IOException
-
-