public class CertificateVerification extends Object
Constructor and Description |
---|
CertificateVerification() |
Modifier and Type | Method and Description |
---|---|
static String |
verifyCertificate(X509Certificate cert, Collection<CRL> crls)
Verifies a single certificate for the current date.
|
static String |
verifyCertificate(X509Certificate cert, Collection<CRL> crls, Calendar calendar)
Verifies a single certificate.
|
static List<VerificationException> |
verifyCertificates(Certificate[] certs, KeyStore keystore)
Verifies a certificate chain against a KeyStore for the current date.
|
static List<VerificationException> |
verifyCertificates(Certificate[] certs, KeyStore keystore, Calendar calendar)
Verifies a certificate chain against a KeyStore.
|
static List<VerificationException> |
verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls)
Verifies a certificate chain against a KeyStore for the current date.
|
static List<VerificationException> |
verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls, Calendar calendar)
Verifies a certificate chain against a KeyStore.
|
static boolean |
verifyOcspCertificates(org.bouncycastle.cert.ocsp.BasicOCSPResp ocsp, KeyStore keystore, String provider)
Verifies an OCSP response against a KeyStore.
|
static boolean |
verifyTimestampCertificates(org.bouncycastle.tsp.TimeStampToken ts, KeyStore keystore, String provider)
Verifies a time stamp against a KeyStore.
|
public static String verifyCertificate(X509Certificate cert, Collection<CRL> crls)
cert
- the certificate to verify
crls
- the certificate revocation list or null
String
with the error description or null
if no error
public static String verifyCertificate(X509Certificate cert, Collection<CRL> crls, Calendar calendar)
cert
- the certificate to verify
crls
- the certificate revocation list or null
calendar
- the date, shall not be null
String
with the error description or null
if no error
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls)
certs
- the certificate chain
keystore
- the KeyStore
crls
- the certificate revocation list or null
null
if the certificate chain could be validated or a Object[]{cert,error}
where cert
is the failed certificate and error
is the error message
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Collection<CRL> crls, Calendar calendar)
certs
- the certificate chain
keystore
- the KeyStore
crls
- the certificate revocation list or null
calendar
- the date, shall not be null
null
if the certificate chain could be validated or a Object[]{cert,error}
where cert
is the failed certificate and error
is the error message
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore)
certs
- the certificate chain
keystore
- the KeyStore
null
if the certificate chain could be validated or a Object[]{cert,error}
where cert
is the failed certificate and error
is the error message
public static List<VerificationException> verifyCertificates(Certificate[] certs, KeyStore keystore, Calendar calendar)
certs
- the certificate chain
keystore
- the KeyStore
calendar
- the date, shall not be null
null
if the certificate chain could be validated or a Object[]{cert,error}
where cert
is the failed certificate and error
is the error message
public static boolean verifyOcspCertificates(org.bouncycastle.cert.ocsp.BasicOCSPResp ocsp, KeyStore keystore, String provider)
ocsp
- the OCSP response
keystore
- the KeyStore
provider
- the provider or null
to use the BouncyCastle provider
true
is a certificate was found
public static boolean verifyTimestampCertificates(org.bouncycastle.tsp.TimeStampToken ts, KeyStore keystore, String provider)
ts
- the time stamp
keystore
- the KeyStore
provider
- the provider or null
to use the BouncyCastle provider
true
is a certificate was found
Copyright © 1998–2016 iText Group NV. All rights reserved.