Package com.itextpdf.signatures
Class CertificateVerification
java.lang.Object
com.itextpdf.signatures.CertificateVerification
Deprecated.
This class consists of some methods that allow you to verify certificates.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanDeprecated.Check if the provided certificate has a critical extension that iText doesn't support.static StringverifyCertificate(X509Certificate cert, Collection<CRL> crls) Deprecated.Verifies a single certificate for the current date.static StringverifyCertificate(X509Certificate cert, Collection<CRL> crls, Calendar calendar) Deprecated.Verifies a single certificate.static List<VerificationException>verifyCertificates(Certificate[] certs, KeyStore keystore) Deprecated.Verifies a certificate chain against a KeyStore for the current date.static List<VerificationException>verifyCertificates(Certificate[] certs, KeyStore keystore, Calendar calendar) Deprecated.Verifies a certificate chain against a KeyStore.static List<VerificationException>verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls) Deprecated.Verifies a certificate chain against a KeyStore for the current date.static List<VerificationException>verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls, Calendar calendar) Deprecated.Verifies a certificate chain against a KeyStore.static booleanverifyOcspCertificates(IBasicOCSPResp ocsp, KeyStore keystore, String provider) Deprecated.Verifies an OCSP response against a KeyStore.static booleanverifyTimestampCertificates(ITimeStampToken ts, KeyStore keystore, String provider) Deprecated.Verifies a time stamp against a KeyStore.
-
Field Details
-
HAS_UNSUPPORTED_EXTENSIONS
Deprecated.- See Also:
-
CERTIFICATE_REVOKED
Deprecated.- See Also:
-
-
Constructor Details
-
CertificateVerification
public CertificateVerification()Deprecated.
-
-
Method Details
-
verifyCertificate
Deprecated.Verifies a single certificate for the current date.- Parameters:
-
cert- the certificate to verify -
crls- the certificate revocation list ornull - Returns:
-
a
Stringwith the error description ornullif no error
-
verifyCertificate
public static String verifyCertificate(X509Certificate cert, Collection<CRL> crls, Calendar calendar) Deprecated.Verifies a single certificate.- Parameters:
-
cert- the certificate to verify -
crls- the certificate revocation list ornull -
calendar- the date, shall not be null - Returns:
-
a
Stringwith the error description ornullif no error
-
verifyCertificates
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls) throws CertificateEncodingException Deprecated.Verifies a certificate chain against a KeyStore for the current date.- Parameters:
-
certs- the certificate chain -
keystore- theKeyStore -
crls- the certificate revocation list ornull - Returns:
-
empty list if the certificate chain could be validated or a
Object[]{cert,error}wherecertis the failed certificate anderroris the error message - Throws:
-
CertificateEncodingException- if an encoding error occurs inCertificate.
-
verifyCertificates
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls, Calendar calendar) throws CertificateEncodingException Deprecated.Verifies a certificate chain against a KeyStore.- Parameters:
-
certs- the certificate chain -
keystore- theKeyStore -
crls- the certificate revocation list ornull -
calendar- the date, shall not be null - Returns:
-
empty list if the certificate chain could be validated or a
Object[]{cert,error}wherecertis the failed certificate anderroris the error message - Throws:
-
CertificateEncodingException- if an encoding error occurs inCertificate.
-
verifyCertificates
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore) throws CertificateEncodingException Deprecated.Verifies a certificate chain against a KeyStore for the current date.- Parameters:
-
certs- the certificate chain -
keystore- theKeyStore - Returns:
-
nullif the certificate chain could be validated or aObject[]{cert,error}wherecertis the failed certificate anderroris the error message - Throws:
-
CertificateEncodingException- if an encoding error occurs inCertificate.
-
verifyCertificates
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Calendar calendar) throws CertificateEncodingException Deprecated.Verifies a certificate chain against a KeyStore.- Parameters:
-
certs- the certificate chain -
keystore- theKeyStore -
calendar- the date, shall not be null - Returns:
-
nullif the certificate chain could be validated or aObject[]{cert,error}wherecertis the failed certificate anderroris the error message - Throws:
-
CertificateEncodingException- if an encoding error occurs inCertificate.
-
verifyOcspCertificates
public static boolean verifyOcspCertificates(IBasicOCSPResp ocsp, KeyStore keystore, String provider) Deprecated.Verifies an OCSP response against a KeyStore.- Parameters:
-
ocsp- the OCSP response -
keystore- theKeyStore -
provider- the provider ornullto use the BouncyCastle provider - Returns:
-
trueis a certificate was found
-
verifyTimestampCertificates
public static boolean verifyTimestampCertificates(ITimeStampToken ts, KeyStore keystore, String provider) Deprecated.Verifies a time stamp against a KeyStore.- Parameters:
-
ts- the time stamp -
keystore- theKeyStore -
provider- the provider ornullto use the BouncyCastle provider - Returns:
-
trueis a certificate was found
-
hasUnsupportedCriticalExtension
Deprecated.Check if the provided certificate has a critical extension that iText doesn't support.- Parameters:
-
cert- X509Certificate instance to check - Returns:
-
trueif there are unsupported critical extensions, false if there are none
-
CertificateChainValidatorshould be used instead.