public class X509CertPath extends Object implements Principal
The path is an ordered list of X.509 certificates with the target (containing the asserted identity) at first position and the certificate issued by the trust anchor at the end of the list.
| Constructor and Description |
|---|
X509CertPath(CertPath certPath)
Creates a new instance for a certificate chain.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static X509CertPath |
fromBytes(byte[] encodedPath)
Creates a new instance from a PkiPath encoded certificate chain.
|
static X509CertPath |
fromCertificatesChain(Certificate... certificateChain)
Create x509 certificate path from array certificates chain.
|
static X509CertPath |
fromCertificatesChain(List<X509Certificate> certificateChain)
Create x509 certificate path from list of x509 certificates chain.
|
static CertPath |
generateCertPath(boolean includeRoot,
List<X509Certificate> certificateChain)
Create certificate path from x509 certificates chain.
|
String |
getName()
Gets the Subject DN of the asserted identity of this certificate path.
|
CertPath |
getPath()
Gets this certificate path.
|
X509Certificate |
getTarget()
Gets the asserted identity of this certificate path.
|
int |
hashCode() |
byte[] |
toByteArray()
Gets a binary representation of this certificate chain using the
PkiPath encoding.
|
public X509CertPath(CertPath certPath)
certPath - The certificate chain asserting the peer's identity.IllegalArgumentException - if the given certificate chain is empty
or does not contain X.509 certificates only.public static X509CertPath fromBytes(byte[] encodedPath)
encodedPath - The encoded chain.IllegalArgumentException - if the given byte array does cannot be
parsed into an X.509 certificate chain.public static X509CertPath fromCertificatesChain(Certificate... certificateChain)
certificateChain - chain of certificatespublic static X509CertPath fromCertificatesChain(List<X509Certificate> certificateChain)
certificateChain - chain of x509 certificatespublic static CertPath generateCertPath(boolean includeRoot, List<X509Certificate> certificateChain)
includeRoot - true, to include the root certificate in the
path, false otherwise.certificateChain - list with chain of x509 certificatespublic byte[] toByteArray()
public String getName()
public CertPath getPath()
public X509Certificate getTarget()
public boolean equals(Object o)
Copyright © 2019 Eclipse Foundation. All rights reserved.