Class CertificateFactory
java.lang.Object
java.security.cert.CertificateFactorySpi
org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory
class for dealing with X509 certificates.
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected CRL
Generates 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.- Specified by:
engineGenerateCertificate
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertificates
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.- Specified by:
engineGenerateCertificates
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCRL
Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.- Specified by:
engineGenerateCRL
in 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:
engineGenerateCRLs
in classCertificateFactorySpi
- Throws:
CRLException
-
engineGetCertPathEncodings
- Overrides:
engineGetCertPathEncodings
in classCertificateFactorySpi
-
engineGenerateCertPath
- Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateException - Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertPath
- Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-