public class X509Factory
extends java.security.cert.CertificateFactorySpi
CertificateFactorySpi,
Certificate,
CertPath,
CRL,
X509Certificate,
X509CRL,
X509CertImpl,
X509CRLImpl| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BEGIN_CERT |
static java.lang.String |
END_CERT |
| Constructor and Description |
|---|
X509Factory() |
| Modifier and Type | Method and Description |
|---|---|
static X509CertImpl |
cachedGetX509Cert(byte[] encoding) |
java.security.cert.Certificate |
engineGenerateCertificate(java.io.InputStream is)
Generates an X.509 certificate object and initializes it with
the data read from the input stream
is. |
java.util.Collection<? extends java.security.cert.Certificate> |
engineGenerateCertificates(java.io.InputStream is)
Returns a (possibly empty) collection view of X.509 certificates read
from the given input stream
is. |
java.security.cert.CertPath |
engineGenerateCertPath(java.io.InputStream inStream)
Generates a
CertPath object and initializes it with
the data read from the InputStream inStream. |
java.security.cert.CertPath |
engineGenerateCertPath(java.io.InputStream inStream,
java.lang.String encoding)
Generates a
CertPath object and initializes it with
the data read from the InputStream inStream. |
java.security.cert.CertPath |
engineGenerateCertPath(java.util.List<? extends java.security.cert.Certificate> certificates)
Generates a
CertPath object and initializes it with
a List of Certificates. |
java.security.cert.CRL |
engineGenerateCRL(java.io.InputStream is)
Generates an X.509 certificate revocation list (CRL) object and
initializes it with the data read from the given input stream
is. |
java.util.Collection<? extends java.security.cert.CRL> |
engineGenerateCRLs(java.io.InputStream is)
Returns a (possibly empty) collection view of X.509 CRLs read
from the given input stream
is. |
java.util.Iterator<java.lang.String> |
engineGetCertPathEncodings()
Returns an iteration of the
CertPath encodings supported
by this certificate factory, with the default encoding first. |
static X509CertImpl |
intern(java.security.cert.X509Certificate c)
Return an interned X509CertImpl for the given certificate.
|
static X509CRLImpl |
intern(java.security.cert.X509CRL c)
Return an interned X509CRLImpl for the given certificate.
|
public static final java.lang.String BEGIN_CERT
public static final java.lang.String END_CERT
public java.security.cert.Certificate engineGenerateCertificate(java.io.InputStream is)
throws java.security.cert.CertificateException
is.engineGenerateCertificate in class java.security.cert.CertificateFactorySpiis - an input stream with the certificate data.java.security.cert.CertificateException - on parsing errors.public static X509CertImpl cachedGetX509Cert(byte[] encoding) throws java.security.cert.CertificateException
java.security.cert.CertificateExceptionpublic static X509CertImpl intern(java.security.cert.X509Certificate c) throws java.security.cert.CertificateException
c - The source X509Certificatejava.security.cert.CertificateException - if failures occur while obtaining the DER
encoding for certificate data.public static X509CRLImpl intern(java.security.cert.X509CRL c) throws java.security.cert.CRLException
c - The source X509CRLjava.security.cert.CRLException - if failures occur while obtaining the DER
encoding for CRL data.public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream inStream)
throws java.security.cert.CertificateException
CertPath object and initializes it with
the data read from the InputStream inStream. The data
is assumed to be in the default encoding.engineGenerateCertPath in class java.security.cert.CertificateFactorySpiinStream - an InputStream containing the dataCertPath initialized with the data from the
InputStreamjava.security.cert.CertificateException - if an exception occurs while decodingpublic java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream inStream,
java.lang.String encoding)
throws java.security.cert.CertificateException
CertPath object and initializes it with
the data read from the InputStream inStream. The data
is assumed to be in the specified encoding.engineGenerateCertPath in class java.security.cert.CertificateFactorySpiinStream - an InputStream containing the dataencoding - the encoding used for the dataCertPath initialized with the data from the
InputStreamjava.security.cert.CertificateException - if an exception occurs while decoding or
the encoding requested is not supportedpublic java.security.cert.CertPath engineGenerateCertPath(java.util.List<? extends java.security.cert.Certificate> certificates)
throws java.security.cert.CertificateException
CertPath object and initializes it with
a List of Certificates.
The certificates supplied must be of a type supported by the
CertificateFactory. They will be copied out of the supplied
List object.
engineGenerateCertPath in class java.security.cert.CertificateFactorySpicertificates - a List of CertificatesCertPath initialized with the supplied list of
certificatesjava.security.cert.CertificateException - if an exception occurspublic java.util.Iterator<java.lang.String> engineGetCertPathEncodings()
CertPath encodings supported
by this certificate factory, with the default encoding first.
Attempts to modify the returned Iterator via its
remove method result in an
UnsupportedOperationException.
engineGetCertPathEncodings in class java.security.cert.CertificateFactorySpiIterator over the names of the supported
CertPath encodings (as Strings)public java.util.Collection<? extends java.security.cert.Certificate> engineGenerateCertificates(java.io.InputStream is)
throws java.security.cert.CertificateException
is.engineGenerateCertificates in class java.security.cert.CertificateFactorySpiis - the input stream with the certificates.java.security.cert.CertificateException - on parsing errors.public java.security.cert.CRL engineGenerateCRL(java.io.InputStream is)
throws java.security.cert.CRLException
is.engineGenerateCRL in class java.security.cert.CertificateFactorySpiis - an input stream with the CRL data.java.security.cert.CRLException - on parsing errors.public java.util.Collection<? extends java.security.cert.CRL> engineGenerateCRLs(java.io.InputStream is)
throws java.security.cert.CRLException
is.engineGenerateCRLs in class java.security.cert.CertificateFactorySpiis - the input stream with the CRLs.java.security.cert.CRLException - on parsing errors.