Package java.security.cert
Class CertificateFactorySpi
java.lang.Object
java.security.cert.CertificateFactorySpi
- Direct Known Subclasses:
CertificateFactory,OpenSSLX509CertificateFactory,X509CertFactoryImpl
public abstract class CertificateFactorySpi extends Object
This class defines the Service Provider Interface (SPI) for the
CertificateFactory class. This SPI must be implemented for each
certificate type a security provider wishes to support.-
Constructor Summary
Constructors Constructor Description CertificateFactorySpi()Constructs a new instance of this class. -
Method Summary
Modifier and Type Method Description abstract CertificateengineGenerateCertificate(InputStream inStream)Generates and initializes aCertificatefrom the provided input stream.abstract Collection<? extends Certificate>engineGenerateCertificates(InputStream inStream)Generates and initializes a collection of certificates from the provided input stream.CertPathengineGenerateCertPath(InputStream inStream)Generates aCertPathfrom the providedInputStream.CertPathengineGenerateCertPath(InputStream inStream, String encoding)Generates aCertPath(a certificate chain) from the giveninputStream, assuming the givenencodingfromengineGetCertPathEncodings().CertPathengineGenerateCertPath(List<? extends Certificate> certificates)Generates aCertPathfrom the provided list of certificates.abstract CRLengineGenerateCRL(InputStream inStream)Generates and initializes a Certificate Revocation List (CRL) from the provided input stream.abstract Collection<? extends CRL>engineGenerateCRLs(InputStream inStream)Generates and initializes a collection of Certificate Revocation List (CRL) from the provided input stream.Iterator<String>engineGetCertPathEncodings()Returns anIteratorover the supportedCertPathencodings (as Strings).
-
Constructor Details
-
CertificateFactorySpi
public CertificateFactorySpi()Constructs a new instance of this class.
-
-
Method Details
-
engineGenerateCertificate
public abstract Certificate engineGenerateCertificate(InputStream inStream) throws CertificateExceptionGenerates and initializes aCertificatefrom the provided input stream.- Parameters:
inStream- the stream from which the data is read to create the certificate.- Returns:
- an initialized certificate.
- Throws:
CertificateException- if parsing problems are detected.
-
engineGenerateCertificates
public abstract Collection<? extends Certificate> engineGenerateCertificates(InputStream inStream) throws CertificateExceptionGenerates and initializes a collection of certificates from the provided input stream.- Parameters:
inStream- the stream from where data is read to create the certificates.- Returns:
- a collection of certificates.
- Throws:
CertificateException- if parsing problems are detected.
-
engineGenerateCRL
Generates and initializes a Certificate Revocation List (CRL) from the provided input stream.- Parameters:
inStream- the stream from where data is read to create the CRL.- Returns:
- an CRL instance.
- Throws:
CRLException- if parsing problems are detected.
-
engineGenerateCRLs
public abstract Collection<? extends CRL> engineGenerateCRLs(InputStream inStream) throws CRLExceptionGenerates and initializes a collection of Certificate Revocation List (CRL) from the provided input stream.- Parameters:
inStream- the stream from which the data is read to create the CRLs.- Returns:
- a collection of CRLs.
- Throws:
CRLException- if parsing problems are detected.
-
engineGenerateCertPath
Generates aCertPathfrom the providedInputStream. The default encoding scheme is applied.- Parameters:
inStream- an input stream with encoded data.- Returns:
- a
CertPathinitialized from the provided data. - Throws:
CertificateException- if parsing problems are detected.
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(InputStream inStream, String encoding) throws CertificateExceptionGenerates aCertPath(a certificate chain) from the giveninputStream, assuming the givenencodingfromengineGetCertPathEncodings().- Throws:
CertificateException- if parsing problems are detected.UnsupportedOperationException- if the provider does not implement this method.
-
engineGenerateCertPath
public CertPath engineGenerateCertPath(List<? extends Certificate> certificates) throws CertificateExceptionGenerates aCertPathfrom the provided list of certificates. The encoding is the default encoding.- Parameters:
certificates- the list containing certificates in a format supported by theCertificateFactory.- Returns:
- a
CertPathinitialized from the provided data. - Throws:
CertificateException- if parsing problems are detected.UnsupportedOperationException- if the provider does not implement this method.
-
engineGetCertPathEncodings
Returns anIteratorover the supportedCertPathencodings (as Strings). The first element is the default encoding.- Returns:
- an iterator over supported
CertPathencodings (as Strings).
-