Class X509CertPathImpl
java.lang.Object
java.security.cert.CertPath
org.apache.harmony.security.provider.cert.X509CertPathImpl
- All Implemented Interfaces:
Serializable
public class X509CertPathImpl extends CertPath
This class is an implementation of X.509 CertPath. This implementation
provides ability to create the instance of X.509 Certification Path
by several means:
1. It can be created over the list of X.509 certificates (implementations of X509Certificate class) provided in constructor.
2. It can be created by means of
- PkiPath as defined in ITU-T Recommendation X.509(2000) Corrigendum 1(2001) (can be seen at ftp://ftp.bull.com/pub/OSIdirectory/DefectResolution/TechnicalCorrigenda/ApprovedTechnicalCorrigendaToX.509/8%7CX.509-TC1(4th).pdf)
- PKCS #7 SignedData object provided in the form of ContentInfo structure. CertPath object is generated on the base of certificates presented in
1. It can be created over the list of X.509 certificates (implementations of X509Certificate class) provided in constructor.
2. It can be created by means of
getInstance methods
on the base of the following ASN.1 DER encoded forms:- PkiPath as defined in ITU-T Recommendation X.509(2000) Corrigendum 1(2001) (can be seen at ftp://ftp.bull.com/pub/OSIdirectory/DefectResolution/TechnicalCorrigenda/ApprovedTechnicalCorrigendaToX.509/8%7CX.509-TC1(4th).pdf)
- PKCS #7 SignedData object provided in the form of ContentInfo structure. CertPath object is generated on the base of certificates presented in
certificates field of the SignedData
object which in its turn is retrieved from ContentInfo structure.
(see http://www.ietf.org/rfc/rfc2315.txt
for more info on PKCS #7)
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.security.cert.CertPath
CertPath.CertPathRep -
Field Summary
Fields Modifier and Type Field Description static ASN1SequenceOfASN1ASN.1 DER Encoder/Decoder for PkiPath structure. -
Constructor Summary
Constructors Constructor Description X509CertPathImpl(List<? extends Certificate> certs)Creates an instance of X.509 CertPath over the specified list of certificates. -
Method Summary
Modifier and Type Method Description List<X509Certificate>getCertificates()Returns an immutable List of theCertificates contained in theCertPath.byte[]getEncoded()Returns in PkiPath format which is our default encoding.byte[]getEncoded(String encoding)Iterator<String>getEncodings()Returns anIteratorover the supported encodings for a representation of the certificate path.static X509CertPathImplgetInstance(byte[] in)Generates certification path object on the base of PkiPath encoded form provided via array of bytes.static X509CertPathImplgetInstance(byte[] in, String encoding)Generates certification path object on the base of encoding provided via array of bytes.static X509CertPathImplgetInstance(InputStream in)Generates certification path object on the base of PkiPath encoded form provided via input stream.static X509CertPathImplgetInstance(InputStream in, String encoding)Generates certification path object on the basis of encoding provided via input stream.
-
Field Details
-
ASN1
ASN.1 DER Encoder/Decoder for PkiPath structure.
-
-
Constructor Details
-
X509CertPathImpl
Creates an instance of X.509 CertPath over the specified list of certificates.- Throws:
CertificateException- if some of the object in the list is not an instance of subclass of X509Certificate.
-
-
Method Details
-
getInstance
Generates certification path object on the base of PkiPath encoded form provided via input stream.- Throws:
CertificateException- if some problems occurred during the decoding.
-
getInstance
public static X509CertPathImpl getInstance(InputStream in, String encoding) throws CertificateExceptionGenerates certification path object on the basis of encoding provided via input stream. The format of provided encoded form is specified by parameterencoding.- Throws:
CertificateException- if specified encoding form is not supported, or some problems occurred during the decoding.
-
getInstance
Generates certification path object on the base of PkiPath encoded form provided via array of bytes.- Throws:
CertificateException- if some problems occurred during the decoding.
-
getInstance
Generates certification path object on the base of encoding provided via array of bytes. The format of provided encoded form is specified by parameterencoding.- Throws:
CertificateException- if specified encoding form is not supported, or some problems occurred during the decoding.
-
getCertificates
Description copied from class:CertPathReturns an immutable List of theCertificates contained in theCertPath.- Specified by:
getCertificatesin classCertPath- Returns:
- a list of
Certificates in theCertPath. - See Also:
method documentation for more info
-
getEncoded
Returns in PkiPath format which is our default encoding.- Specified by:
getEncodedin classCertPath- Returns:
- default encoding of the
CertPath. - Throws:
CertificateEncodingException- if the encoding fails.- See Also:
CertPath.getEncoded()
-
getEncoded
Description copied from class:CertPath- Specified by:
getEncodedin classCertPath- Throws:
CertificateEncodingException- if the encoding fails.- See Also:
CertPath.getEncoded(String)
-
getEncodings
Description copied from class:CertPathReturns anIteratorover the supported encodings for a representation of the certificate path.- Specified by:
getEncodingsin classCertPath- Returns:
Iteratorover supported encodings (asStrings).- See Also:
method documentation for more info
-