Top Description Fields Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.x509

public Class PKIXCertPath

extends CertPath
Class Inheritance
Imports
java.io.BufferedInputStream, .ByteArrayInputStream, .ByteArrayOutputStream, .IOException, .InputStream, .OutputStreamWriter, java.security.NoSuchProviderException, java.security.cert.CertPath, .Certificate, .CertificateEncodingException, .CertificateException, .CertificateFactory, .X509Certificate, java.util.ArrayList, .Collections, .Enumeration, .Iterator, .List, .ListIterator, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1Encoding, .ASN1InputStream, .ASN1Integer, .ASN1Primitive, .ASN1Sequence, .DERSequence, .DERSet, org.bouncycastle.asn1.pkcs.ContentInfo, .PKCSObjectIdentifiers, .SignedData, org.bouncycastle.jcajce.util.BCJcaJceHelper, .JcaJceHelper, org.bouncycastle.util.io.pem.PemObject, .PemWriter

CertPath implementation for X.509 certificates.

Field Summary

Modifier and TypeField and Description
private List<E>
pack-priv static final List<E>
private final JcaJceHelper

Constructor Summary

AccessConstructor and Description
pack-priv
PKIXCertPath(List<E> certificates)

pack-priv
PKIXCertPath(InputStream inStream, String encoding)

Creates a CertPath of the specified type.

Method Summary

Modifier and TypeMethod and Description
public List<E>

Returns:

an immutable List of Certificates (may be empty, but not null)
getCertificates
()

Implements abstract java.security.cert.CertPath.getCertificates.

Returns the list of certificates in this certification path.

public byte[]

Returns:

the encoded bytes
getEncoded
()

Implements abstract java.security.cert.CertPath.getEncoded.

Returns the encoded form of this certification path, using the default encoding.

public byte[]

Returns:

the encoded bytes
getEncoded
(String
the name of the encoding to use
encoding
)

Implements abstract java.security.cert.CertPath.getEncoded.

Returns the encoded form of this certification path, using the specified encoding.

public Iterator<E>

Returns:

an Iterator over the names of the supported encodings (as Strings)
getEncodings
()

Implements abstract java.security.cert.CertPath.getEncodings.

Returns an iteration of the encodings supported by this certification path, with the default encoding first.

private List<E>
sortCerts(List<E> certs)

private ASN1Primitive

Returns:

the DERObject
toASN1Object
(X509Certificate
the X509Certificate object to be encoded
cert
)

Return a DERObject containing the encoded certificate.

private byte[]
Inherited from java.security.cert.CertPath:
equalsgetTypehashCodetoStringwriteReplace

Field Detail

certificatesback to summary
private List<E> certificates
certPathEncodingsback to summary
pack-priv static final List<E> certPathEncodings
helperback to summary
private final JcaJceHelper helper

Constructor Detail

PKIXCertPathback to summary
pack-priv PKIXCertPath(List<E> certificates)
PKIXCertPathback to summary
pack-priv PKIXCertPath(InputStream inStream, String encoding) throws CertificateException

Creates a CertPath of the specified type. This constructor is protected because most users should use a CertificateFactory to create CertPaths.

Method Detail

getCertificatesback to summary
public List<E> getCertificates()

Implements abstract java.security.cert.CertPath.getCertificates.

Returns the list of certificates in this certification path. The List returned must be immutable and thread-safe.

Returns:List<E>

an immutable List of Certificates (may be empty, but not null)

getEncodedback to summary
public byte[] getEncoded() throws CertificateEncodingException

Implements abstract java.security.cert.CertPath.getEncoded.

Returns the encoded form of this certification path, using the default encoding.

Returns:byte[]

the encoded bytes

Exceptions
CertificateEncodingException:
if an encoding error occurs
getEncodedback to summary
public byte[] getEncoded(String encoding) throws CertificateEncodingException

Implements abstract java.security.cert.CertPath.getEncoded.

Returns the encoded form of this certification path, using the specified encoding.

Parameters
encoding:String

the name of the encoding to use

Returns:byte[]

the encoded bytes

Exceptions
CertificateEncodingException:
if an encoding error occurs or the encoding requested is not supported
getEncodingsback to summary
public Iterator<E> getEncodings()

Implements abstract java.security.cert.CertPath.getEncodings.

Returns an iteration of the encodings supported by this certification path, with the default encoding first. Attempts to modify the returned Iterator via its remove method result in an UnsupportedOperationException.

Returns:Iterator<E>

an Iterator over the names of the supported encodings (as Strings)

sortCertsback to summary
private List<E> sortCerts(List<E> certs)
toASN1Objectback to summary
private ASN1Primitive toASN1Object(X509Certificate cert) throws CertificateEncodingException

Return a DERObject containing the encoded certificate.

Parameters
cert:X509Certificate

the X509Certificate object to be encoded

Returns:ASN1Primitive

the DERObject

toDEREncodedback to summary
private byte[] toDEREncoded(ASN1Encodable obj) throws CertificateEncodingException