Class PKIXCertPath
java.lang.Object
java.security.cert.CertPath
org.gudy.bouncycastle.jce.provider.PKIXCertPath
- All Implemented Interfaces:
Serializable
CertPath implementation for X.509 certificates.
TODO: add PKCS #7 encoding support
TODO: add PKCS #7 encoding support
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.security.cert.CertPath
CertPath.CertPathRep
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPKIXCertPath
(InputStream inStream, String encoding) Creates a CertPath of the specified type.PKIXCertPath
(List certificates) Creates a CertPath of the specified type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of certificates in this certification path.byte[]
Returns the encoded form of this certification path, using the default encoding.byte[]
getEncoded
(String encoding) Returns the encoded form of this certification path, using the specified encoding.private DERObject
Return a DERObject containing the encoded certificate.Returns an iteration of the encodings supported by this certification path, with the default encoding first.
-
Field Details
-
certPathEncodings
-
certificates
-
-
Constructor Details
-
PKIXCertPath
PKIXCertPath(List certificates) Creates a CertPath of the specified type. This constructor is protected because most users should use a CertificateFactory to create CertPaths.- Parameters:
type
- the standard name of the type of Certificatesin this path
-
PKIXCertPath
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. TODO: implement PKCS7 decoding- Parameters:
type
- the standard name of the type of Certificatesin this path- Throws:
CertificateException
-
-
Method Details
-
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.- Specified by:
getEncodings
in classCertPath
- Returns:
- an Iterator over the names of the supported encodings (as Strings)
-
getEncoded
Returns the encoded form of this certification path, using the default encoding.- Specified by:
getEncoded
in classCertPath
- Returns:
- the encoded bytes
- Throws:
CertificateEncodingException
- if an encoding error occurs
-
getEncoded
Returns the encoded form of this certification path, using the specified encoding. TODO: implement PKCS7 decoding- Specified by:
getEncoded
in classCertPath
- Parameters:
encoding
- the name of the encoding to use- Returns:
- the encoded bytes
- Throws:
CertificateEncodingException
- if an encoding error occurs or the encoding requested is not supported
-
getCertificates
Returns the list of certificates in this certification path. The List returned must be immutable and thread-safe. TODO: return immutable List- Specified by:
getCertificates
in classCertPath
- Returns:
- an immutable List of Certificates (may be empty, but not null)
-
getEncodedX509Certificate
private DERObject getEncodedX509Certificate(X509Certificate cert) throws CertificateEncodingException Return a DERObject containing the encoded certificate.- Parameters:
cert
- the X509Certificate object to be encoded- Returns:
- the DERObject
- Throws:
CertificateEncodingException
-