public class CertificatesHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.security.cert.X509Certificate |
getCertificate(java.lang.String path)
Gets the X.509 certificate from the resource at the given path.
|
static java.security.cert.X509Certificate |
loadCertificate(java.io.InputStream inputStream)
Loads the X.509 certificate from the given input stream.
|
static java.lang.String[] |
loadCertificatesList(java.io.InputStream certificatesList)
Loads a list of certificates by reading an input stream which contains the filename of each certificate.
|
public static java.security.cert.X509Certificate loadCertificate(java.io.InputStream inputStream)
throws java.security.cert.CertificateException
inputStream - the input stream.java.security.cert.CertificateException - if the input stream does not contain a valid certificate.public static java.security.cert.X509Certificate getCertificate(java.lang.String path)
path - the resource path.java.lang.IllegalArgumentException - if the resource does not exist or it does not contain a valid certificate.public static java.lang.String[] loadCertificatesList(java.io.InputStream certificatesList)
throws java.io.IOException
certificatesList - the input stream containing the list of certificates.java.io.IOException - if an exception occurs while loading the certificates list.