Package com.itextpdf.text.pdf.security
Class CrlClientOnline
- java.lang.Object
-
- com.itextpdf.text.pdf.security.CrlClientOnline
-
-
Constructor Summary
Constructors Constructor Description CrlClientOnline()
Creates a CrlClientOnline instance that will try to find a single CRL by walking through the certificate chain.CrlClientOnline(java.lang.String... crls)
Creates a CrlClientOnline instance using one or more URLs.CrlClientOnline(java.net.URL... crls)
Creates a CrlClientOnline instance using one or more URLs.CrlClientOnline(java.security.cert.Certificate[] chain)
Creates a CrlClientOnline instance using a certificate chain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUrl(java.lang.String url)
Adds an URL to the list of CRL URLsprotected void
addUrl(java.net.URL url)
Adds an URL to the list of CRL URLsjava.util.Collection<byte[]>
getEncoded(java.security.cert.X509Certificate checkCert, java.lang.String url)
Fetches the CRL bytes from an URL.
-
-
-
Field Detail
-
LOGGER
private static final Logger LOGGER
The Logger instance.
-
urls
protected java.util.List<java.net.URL> urls
The URLs of the CRLs.
-
-
Constructor Detail
-
CrlClientOnline
public CrlClientOnline()
Creates a CrlClientOnline instance that will try to find a single CRL by walking through the certificate chain.
-
CrlClientOnline
public CrlClientOnline(java.lang.String... crls)
Creates a CrlClientOnline instance using one or more URLs.
-
CrlClientOnline
public CrlClientOnline(java.net.URL... crls)
Creates a CrlClientOnline instance using one or more URLs.
-
CrlClientOnline
public CrlClientOnline(java.security.cert.Certificate[] chain)
Creates a CrlClientOnline instance using a certificate chain.
-
-
Method Detail
-
addUrl
protected void addUrl(java.lang.String url)
Adds an URL to the list of CRL URLs- Parameters:
url
- an URL in the form of a String
-
addUrl
protected void addUrl(java.net.URL url)
Adds an URL to the list of CRL URLs- Parameters:
url
- an URL object
-
getEncoded
public java.util.Collection<byte[]> getEncoded(java.security.cert.X509Certificate checkCert, java.lang.String url)
Fetches the CRL bytes from an URL. If no url is passed as parameter, the url will be obtained from the certificate. If you want to load a CRL from a local file, subclass this method and pass an URL with the path to the local file to this method. An other option is to use the CrlClientOffline class.- Specified by:
getEncoded
in interfaceCrlClient
- Parameters:
checkCert
- the certificate from which a CRL URL can be obtainedurl
- a CRL url if you don't want to obtain it from the certificate- Returns:
- a collection of byte array each representing a crl. It may return null or an empty collection
- See Also:
CrlClient.getEncoded(java.security.cert.X509Certificate, java.lang.String)
-
-