Class CertificateFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CRLGenerates a certificate object and initializes it with the data read from the input stream inStream.engineGenerateCertificates(InputStream inStream) Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.engineGenerateCertPath(InputStream inStream) engineGenerateCertPath(InputStream inStream, String encoding) engineGenerateCertPath(List certificates) Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.engineGenerateCRLs(InputStream inStream) Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
-
Constructor Details
-
CertificateFactory
public CertificateFactory()
-
-
Method Details
-
createCRL
- Throws:
CRLException
-
engineGenerateCertificate
Generates a certificate object and initializes it with the data read from the input stream inStream.Per the
CertificateFactorycontract aCertificateExceptionis thrown when no certificate can be parsed from the stream — this includes empty input, a stream that has already been exhausted, and input that is neither valid DER nor valid PEM (github #457). The streamingengineGenerateCertificates(InputStream)path retains its (possibly-empty)Collectionreturn for the same input.- Specified by:
engineGenerateCertificatein classCertificateFactorySpi- Throws:
CertificateException
-
engineGenerateCertificates
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.- Specified by:
engineGenerateCertificatesin classCertificateFactorySpi- Throws:
CertificateException
-
engineGenerateCRL
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.Per the
CertificateFactorycontract aCRLExceptionis thrown when no CRL can be parsed from the stream — this includes empty input, a stream that has already been exhausted, and input that is neither valid DER nor valid PEM (github #457). The streamingengineGenerateCRLs(InputStream)path retains its (possibly-empty)Collectionreturn for the same input.- Specified by:
engineGenerateCRLin classCertificateFactorySpi- Throws:
CRLException
-
engineGenerateCRLs
Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream. The inStream may contain a sequence of DER-encoded CRLs, or a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the only signficant field being crls. In particular the signature and the contents are ignored.- Specified by:
engineGenerateCRLsin classCertificateFactorySpi- Throws:
CRLException
-
engineGetCertPathEncodings
- Overrides:
engineGetCertPathEncodingsin classCertificateFactorySpi
-
engineGenerateCertPath
- Overrides:
engineGenerateCertPathin classCertificateFactorySpi- Throws:
CertificateException
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateException - Overrides:
engineGenerateCertPathin classCertificateFactorySpi- Throws:
CertificateException
-
engineGenerateCertPath
- Overrides:
engineGenerateCertPathin classCertificateFactorySpi- Throws:
CertificateException
-