com.itextpdf.text.pdf.security
Class CertificateUtil

java.lang.Object
  extended by com.itextpdf.text.pdf.security.CertificateUtil

public class CertificateUtil
extends Object

This class contains a series of static methods that allow you to retrieve information from a Certificate.


Constructor Summary
CertificateUtil()
           
 
Method Summary
static CRL getCRL(String url)
          Gets the CRL object using a CRL URL.
static CRL getCRL(X509Certificate certificate)
          Gets a CRL from a 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateUtil

public CertificateUtil()
Method Detail

getCRL

public static CRL getCRL(X509Certificate certificate)
                  throws CertificateException,
                         CRLException,
                         IOException
Gets a CRL from a certificate

Parameters:
certificate -
Returns:
the CRL or null if there's no CRL available
Throws:
CertificateException
CRLException
IOException

getCRLURL

public static String getCRLURL(X509Certificate certificate)
                        throws CertificateParsingException
Gets the URL of the Certificate Revocation List for a Certificate

Parameters:
certificate - the Certificate
Returns:
the String where you can check if the certificate was revoked
Throws:
CertificateParsingException
IOException

getCRL

public static CRL getCRL(String url)
                  throws IOException,
                         CertificateException,
                         CRLException
Gets the CRL object using a CRL URL.

Parameters:
url - the URL where to get the CRL
Returns:
a CRL object
Throws:
IOException
CertificateException
CRLException

getOCSPURL

public static String getOCSPURL(X509Certificate certificate)
Retrieves the OCSP URL from the given certificate.

Parameters:
certificate - the certificate
Returns:
the URL or null
Throws:
IOException

getTSAURL

public static String getTSAURL(X509Certificate certificate)
Gets the URL of the TSA if it's available on the certificate

Parameters:
certificate - a certificate
Returns:
a TSA URL
Throws:
IOException


Copyright © 2013. All Rights Reserved.