public final class CRLVerifier extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkRevocation(X509CRL crl,
X509Certificate cert,
Date signDate,
String crlDistributionPointsURL)
Check whether the certificate was revoked at signing time.
|
static X509CRL |
downloadCRLFromWeb(String crlURL)
Downloads a CRL from given HTTP/HTTPS/FTP URL, e.g.
|
static List<String> |
getCrlDistributionPoints(X509Certificate cert)
Extracts all CRL distribution point URLs from the "CRL Distribution
Point" extension in a X.509 certificate.
|
static void |
verifyCertificateCRLs(X509Certificate cert,
Date signDate,
Set<X509Certificate> additionalCerts)
Extracts the CRL distribution points from the certificate (if available)
and checks the certificate revocation status against the CRLs coming from
the distribution points.
|
public static void verifyCertificateCRLs(X509Certificate cert, Date signDate, Set<X509Certificate> additionalCerts) throws CertificateVerificationException, RevokedCertificateException
cert
- the certificate to be checked for revocationsignDate
- the date when the signing took placeadditionalCerts
- set of trusted root CA certificates that will be
used as "trust anchors" and intermediate CA certificates that will be
used as part of the certification chain.CertificateVerificationException
- if the certificate could not be verifiedRevokedCertificateException
- if the certificate is revokedpublic static void checkRevocation(X509CRL crl, X509Certificate cert, Date signDate, String crlDistributionPointsURL) throws RevokedCertificateException
crl
- certificate revocation listcert
- certificate to be checkedsignDate
- date the certificate was used for signingcrlDistributionPointsURL
- URL for log message or exception textRevokedCertificateException
- if the certificate was revoked at signing timepublic static X509CRL downloadCRLFromWeb(String crlURL) throws IOException, CertificateException, CRLException
public static List<String> getCrlDistributionPoints(X509Certificate cert) throws IOException
cert
- IOException
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.