Class JDKX509CertificateFactory
java.lang.Object
java.security.cert.CertificateFactorySpi
org.gudy.bouncycastle.jce.provider.JDKX509CertificateFactory
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerates 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) engineGenerateCRL(InputStream inStream) 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.private Certificateprivate CRLprivate StringreadLine(InputStream in) private Certificateprivate CRLprivate Certificateread in a BER encoded PKCS7 certificate.
-
Field Details
-
sData
-
sDataObjectCount
private int sDataObjectCount
-
-
Constructor Details
-
JDKX509CertificateFactory
public JDKX509CertificateFactory()
-
-
Method Details
-
readLine
- Throws:
IOException
-
readDERCertificate
- Throws:
IOException
-
readPKCS7Certificate
read in a BER encoded PKCS7 certificate.- Throws:
IOException
-
readPEMCertificate
- Throws:
IOException
-
readDERCRL
- Throws:
IOException
-
readPEMCRL
- Throws:
IOException
-
engineGenerateCertificate
Generates a certificate object and initializes it with the data read from the input stream inStream.- 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.- 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
-