public class CertificateFactory
extends java.security.cert.CertificateFactorySpi
Certificate Factories are used for reading encoded certificates and Certificate Revocation Lists (CRLs) from input streams.
For instantiating the IAIK certificate factory call the
getInstance factory method of the
java.security.cert.CertificateFactory engine class, thereby supplying the
certificate type ("X.509") and the name of the IAIK provider:
CertifiacteFactory certFactory = CertificateFactory
.getInstance("X.509", "IAIK");
Subsequently use the generateCertificate,
generateCertificates, generateCRL, or
generateCRLs method for pasrsing a X.509 certificate, a
collection of X.509 certificates, a X.509 CRL, or a collection of X.509 CRLs,
respectively, e.g.:
Collection c = certFactory.generateCertificates(is);
X509Certificate,
X509CRL| Constructor and Description |
|---|
CertificateFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.security.cert.Certificate |
engineGenerateCertificate(java.io.InputStream is)
Parses a X.509 certificate from the supplied input stream.
|
java.util.Collection |
engineGenerateCertificates(java.io.InputStream is)
Parses a collection of X.509 certificates from the supplied input stream.
|
java.security.cert.CRL |
engineGenerateCRL(java.io.InputStream is)
Parses a X.509 CRL from the supplied input stream.
|
java.util.Collection |
engineGenerateCRLs(java.io.InputStream is)
Parses a collection of X.509 CRLs from the supplied input stream.
|
public java.security.cert.Certificate engineGenerateCertificate(java.io.InputStream is)
throws java.security.cert.CertificateException
engineGenerateCertificate in class java.security.cert.CertificateFactorySpiis - the input stream supplying the encoded certificatejava.security.cert.CertificateException - if an decoding/parsing error occurspublic java.util.Collection engineGenerateCertificates(java.io.InputStream is)
throws java.security.cert.CertificateException
engineGenerateCertificates in class java.security.cert.CertificateFactorySpiis - the input stream supplying the encoded certificatesjava.security.cert.CertificateException - if an decoding/parsing error occurspublic java.security.cert.CRL engineGenerateCRL(java.io.InputStream is)
throws java.security.cert.CRLException
engineGenerateCRL in class java.security.cert.CertificateFactorySpiis - the input stream supplying the encoded CRLjava.security.cert.CRLException - if an decoding/parsing error occurspublic java.util.Collection engineGenerateCRLs(java.io.InputStream is)
throws java.security.cert.CRLException
engineGenerateCRLs in class java.security.cert.CertificateFactorySpiis - the input stream supplying the encoded CRLsjava.security.cert.CRLException - if an decoding/parsing error occurs