public class CertificateVerification
extends java.lang.Object
Constructor | Description |
---|---|
CertificateVerification() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
verifyCertificate(java.security.cert.X509Certificate cert,
java.util.Collection<java.security.cert.CRL> crls,
java.util.Calendar calendar) |
Verifies a single certificate.
|
static java.util.List<VerificationException> |
verifyCertificates(java.security.cert.Certificate[] certs,
java.security.KeyStore keystore,
java.util.Calendar calendar) |
Verifies a certificate chain against a KeyStore.
|
static java.util.List<VerificationException> |
verifyCertificates(java.security.cert.Certificate[] certs,
java.security.KeyStore keystore,
java.util.Collection<java.security.cert.CRL> crls,
java.util.Calendar calendar) |
Verifies a certificate chain against a KeyStore.
|
static boolean |
verifyOcspCertificates(org.bouncycastle.cert.ocsp.BasicOCSPResp ocsp,
java.security.KeyStore keystore,
java.lang.String provider) |
Verifies an OCSP response against a KeyStore.
|
static boolean |
verifyTimestampCertificates(org.bouncycastle.tsp.TimeStampToken ts,
java.security.KeyStore keystore,
java.lang.String provider) |
Verifies a time stamp against a KeyStore.
|
public static java.lang.String verifyCertificate(java.security.cert.X509Certificate cert, java.util.Collection<java.security.cert.CRL> crls, java.util.Calendar calendar)
cert
- the certificate to verifycrls
- the certificate revocation list or null
calendar
- the date or null
for the current dateString
with the error description or null
if no errorpublic static java.util.List<VerificationException> verifyCertificates(java.security.cert.Certificate[] certs, java.security.KeyStore keystore, java.util.Collection<java.security.cert.CRL> crls, java.util.Calendar calendar)
certs
- the certificate chainkeystore
- the KeyStore
crls
- the certificate revocation list or null
calendar
- the date or null
for the current datenull
if the certificate chain could be validated or a
Object[]{cert,error}
where cert
is the
failed certificate and error
is the error messagepublic static java.util.List<VerificationException> verifyCertificates(java.security.cert.Certificate[] certs, java.security.KeyStore keystore, java.util.Calendar calendar)
certs
- the certificate chainkeystore
- the KeyStore
calendar
- the date or null
for the current datenull
if the certificate chain could be validated or a
Object[]{cert,error}
where cert
is the
failed certificate and error
is the error messagepublic static boolean verifyOcspCertificates(org.bouncycastle.cert.ocsp.BasicOCSPResp ocsp, java.security.KeyStore keystore, java.lang.String provider)
ocsp
- the OCSP responsekeystore
- the KeyStore
provider
- the provider or null
to use the BouncyCastle providertrue
is a certificate was foundpublic static boolean verifyTimestampCertificates(org.bouncycastle.tsp.TimeStampToken ts, java.security.KeyStore keystore, java.lang.String provider)
ts
- the time stampkeystore
- the KeyStore
provider
- the provider or null
to use the BouncyCastle providertrue
is a certificate was foundCopyright © 1998–2018. All rights reserved.