Class CertificateFactory
- java.lang.Object
-
- java.security.cert.CertificateFactorySpi
-
- org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory
-
public class CertificateFactory extends CertificateFactorySpi
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
Constructors Constructor Description CertificateFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
CertPath
engineGenerateCertPath(InputStream inStream, String encoding)
CertPath
engineGenerateCertPath(List certificates)
CRL
engineGenerateCRL(InputStream in)
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()
-
-
-
Method Detail
-
createCRL
protected CRL createCRL(CertificateList c) throws CRLException
- Throws:
CRLException
-
engineGenerateCertificate
public Certificate engineGenerateCertificate(InputStream in) throws CertificateException
Generates a certificate object and initializes it with the data read from the input stream inStream.- Specified by:
engineGenerateCertificate
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertificates
public Collection engineGenerateCertificates(InputStream inStream) throws CertificateException
Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.- Specified by:
engineGenerateCertificates
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCRL
public CRL engineGenerateCRL(InputStream in) throws CRLException
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
public Collection engineGenerateCRLs(InputStream inStream) throws CRLException
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
public Iterator engineGetCertPathEncodings()
- Overrides:
engineGetCertPathEncodings
in classCertificateFactorySpi
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(InputStream inStream) throws CertificateException
- Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateException
- Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(List certificates) throws CertificateException
- Overrides:
engineGenerateCertPath
in classCertificateFactorySpi
- Throws:
CertificateException
-
-