iaik.x509
Class CertificateFactory
java.lang.Object
|
+--java.security.cert.CertificateFactorySpi
|
+--iaik.x509.CertificateFactory
- public class CertificateFactory
- extends CertificateFactorySpi
This class implements a CertificateFactory for X.509.
Certificate Factories are used for reading encoded certificates and
Certificate Recovation 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);
- See Also:
X509Certificate,
X509CRL
|
Method Summary |
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. |
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. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CertificateFactory
public CertificateFactory()
engineGenerateCertificate
public Certificate engineGenerateCertificate(java.io.InputStream is)
throws CertificateException
- Parses a X.509 certificate from the supplied input stream.
- Overrides:
- engineGenerateCertificate in class CertificateFactorySpi
- Parameters:
is - the input stream supplying the encoded certificate- Returns:
- the X509Certificate parsed from the stream
- Throws:
- CertificateException - if an decoding/parsing error occurs
engineGenerateCertificates
public java.util.Collection engineGenerateCertificates(java.io.InputStream is)
throws CertificateException
- Parses a collection of X.509 certificates from the supplied input stream.
- Overrides:
- engineGenerateCertificates in class CertificateFactorySpi
- Parameters:
is - the input stream supplying the encoded certificates- Returns:
- the collection of X509Certificates parsed from the stream
- Throws:
- CertificateException - if an decoding/parsing error occurs
engineGenerateCRL
public CRL engineGenerateCRL(java.io.InputStream is)
throws CRLException
- Parses a X.509 CRL from the supplied input stream.
- Overrides:
- engineGenerateCRL in class CertificateFactorySpi
- Parameters:
is - the input stream supplying the encoded CRL- Returns:
- the X509CRL parsed from the stream
- Throws:
- CRLException - if an decoding/parsing error occurs
engineGenerateCRLs
public java.util.Collection engineGenerateCRLs(java.io.InputStream is)
throws CRLException
- Parses a collection of X.509 CRLs from the supplied input stream.
- Overrides:
- engineGenerateCRLs in class CertificateFactorySpi
- Parameters:
is - the input stream supplying the encoded CRLs- Returns:
- the collection of X509CRLs parsed from the stream
- Throws:
- CRLException - if an decoding/parsing error occurs