public class CertificateFactory extends CertificateFactorySpi
At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----" base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7 objects.
| Constructor and Description |
|---|
CertificateFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected CRL |
createCRL(CertificateList c) |
Certificate |
engineGenerateCertificate(InputStream in)
Generates a certificate object and initializes it with the data
read from the input stream inStream.
|
Collection |
engineGenerateCertificates(InputStream inStream)
Returns a (possibly empty) collection view of the certificates
read from the given input stream inStream.
|
CertPath |
engineGenerateCertPath(InputStream inStream)
Generates a
CertPath from the provided InputStream. |
CertPath |
engineGenerateCertPath(InputStream inStream,
String encoding)
Generates a
CertPath (a certificate chain) from the given
inputStream, assuming the given encoding from
CertificateFactorySpi.engineGetCertPathEncodings(). |
CertPath |
engineGenerateCertPath(List certificates)
Generates a
CertPath from the provided list of certificates. |
CRL |
engineGenerateCRL(InputStream inStream)
Generates a certificate revocation list (CRL) object and initializes
it with the data read from the input stream inStream.
|
Collection |
engineGenerateCRLs(InputStream inStream)
Returns a (possibly empty) collection view of the CRLs read from
the given input stream inStream.
|
Iterator |
engineGetCertPathEncodings()
Returns an
Iterator over the supported CertPath encodings
(as Strings). |
protected CRL createCRL(CertificateList c) throws CRLException
CRLExceptionpublic Certificate engineGenerateCertificate(InputStream in) throws CertificateException
engineGenerateCertificate in class CertificateFactorySpiin - the stream from which the data is read to create the
certificate.CertificateException - if parsing problems are detected.public Collection engineGenerateCertificates(InputStream inStream) throws CertificateException
engineGenerateCertificates in class CertificateFactorySpiinStream - the stream from where data is read to create the certificates.CertificateException - if parsing problems are detected.public CRL engineGenerateCRL(InputStream inStream) throws CRLException
engineGenerateCRL in class CertificateFactorySpiinStream - the stream from where data is read to create the CRL.CRLException - if parsing problems are detected.public Collection engineGenerateCRLs(InputStream inStream) throws CRLException
engineGenerateCRLs in class CertificateFactorySpiinStream - the stream from which the data is read to create the CRLs.CRLException - if parsing problems are detected.public Iterator engineGetCertPathEncodings()
CertificateFactorySpiIterator over the supported CertPath encodings
(as Strings). The first element is the default encoding.engineGetCertPathEncodings in class CertificateFactorySpiCertPath encodings (as
Strings).public CertPath engineGenerateCertPath(InputStream inStream) throws CertificateException
CertificateFactorySpiCertPath from the provided InputStream. The
default encoding scheme is applied.engineGenerateCertPath in class CertificateFactorySpiinStream - an input stream with encoded data.CertPath initialized from the provided data.CertificateException - if parsing problems are detected.public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateException
CertificateFactorySpiCertPath (a certificate chain) from the given
inputStream, assuming the given encoding from
CertificateFactorySpi.engineGetCertPathEncodings().engineGenerateCertPath in class CertificateFactorySpiCertificateException - if parsing problems are detected.public CertPath engineGenerateCertPath(List certificates) throws CertificateException
CertificateFactorySpiCertPath from the provided list of certificates. The
encoding is the default encoding.engineGenerateCertPath in class CertificateFactorySpicertificates - the list containing certificates in a format supported by the
CertificateFactory.CertPath initialized from the provided data.CertificateException - if parsing problems are detected.