public class CertificateUtil extends Object
Constructor and Description |
---|
CertificateUtil() |
Modifier and Type | Method and Description |
---|---|
static CRL |
getCRL(String url)
Gets the CRL object using a CRL URL.
|
static CRL |
getCRL(X509Certificate certificate)
Gets a CRL from an X509 certificate.
|
static String |
getCRLURL(X509Certificate certificate)
Gets the URL of the Certificate Revocation List for a Certificate
|
static String |
getOCSPURL(X509Certificate certificate)
Retrieves the OCSP URL from the given certificate.
|
static String |
getTSAURL(X509Certificate certificate)
Gets the URL of the TSA if it's available on the certificate
|
public static CRL getCRL(X509Certificate certificate) throws CertificateException, CRLException, IOException
certificate
- the X509Certificate to extract the CRL from
IOException
- thrown when the URL couldn't be opened properly.
CertificateException
- thrown if there's no X509 implementation in the provider.
CRLException
- thrown when encountering errors when parsing the CRL.
public static String getCRLURL(X509Certificate certificate) throws CertificateParsingException
certificate
- the Certificate
CertificateParsingException
- throws if invalid DER-encoded certificate is parsed or unsupported DER features are found in the certificate
public static CRL getCRL(String url) throws IOException, CertificateException, CRLException
url
- the URL where the CRL is located
IOException
- thrown when the URL couldn't be opened properly.
CertificateException
- thrown if there's no X509 implementation in the provider.
CRLException
- thrown when encountering errors when parsing the CRL.
public static String getOCSPURL(X509Certificate certificate)
certificate
- the certificate
public static String getTSAURL(X509Certificate certificate)
certificate
- a certificate
Copyright © 1998–2021 iText Group NV. All rights reserved.