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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
Deprecated.Check if the provided certificate has a critical extension that iText doesn't support.static String
verifyCertificate
(X509Certificate cert, Collection<CRL> crls) Deprecated.Verifies a single certificate for the current date.static String
verifyCertificate
(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 boolean
verifyOcspCertificates
(IBasicOCSPResp ocsp, KeyStore keystore, String provider) Deprecated.Verifies an OCSP response against a KeyStore.static boolean
verifyTimestampCertificates
(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
String
with the error description ornull
if 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
String
with the error description ornull
if 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}
wherecert
is the failed certificate anderror
is 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}
wherecert
is the failed certificate anderror
is 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:
-
null
if the certificate chain could be validated or aObject[]{cert,error}
wherecert
is the failed certificate anderror
is 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:
-
null
if the certificate chain could be validated or aObject[]{cert,error}
wherecert
is the failed certificate anderror
is 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 ornull
to use the BouncyCastle provider - Returns:
-
true
is 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 ornull
to use the BouncyCastle provider - Returns:
-
true
is 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:
-
true
if there are unsupported critical extensions, false if there are none
-
CertificateChainValidator
should be used instead.