public class TrustAnchor extends Object
Constructor and Description |
---|
TrustAnchor(String caName,
PublicKey caKey,
byte[] nameConstraints)
Create a new trust anchor from a certificate authority's
distinguished name, public key, and (optional) name constraints.
|
TrustAnchor(X509Certificate trustedCert,
byte[] nameConstraints)
Create a new trust anchor from a certificate and (optional) name
constraints.
|
Modifier and Type | Method and Description |
---|---|
String |
getCAName()
Return the certificate authority's distinguished name, or null if
none was specified.
|
PublicKey |
getCAPublicKey()
Return the certificate authority's public key, or null if none was
specified.
|
byte[] |
getNameConstraints()
Return the encoded name constraints, or null if none was specified.
|
X509Certificate |
getTrustedCert()
Return the trusted certificate, or null if none was specified.
|
String |
toString()
Return a printable representation of this trust anchor.
|
public TrustAnchor(X509Certificate trustedCert, byte[] nameConstraints)
If the nameConstraints argument in non-null, it will be copied to prevent modification.
trustedCert
- The trusted certificate.nameConstraints
- The encoded nameConstraints.public TrustAnchor(String caName, PublicKey caKey, byte[] nameConstraints)
If the nameConstraints argument in non-null, it will be copied to prevent modification.
public final X509Certificate getTrustedCert()
public final String getCAName()
public final PublicKey getCAPublicKey()
public final byte[] getNameConstraints()
The name constraints byte array is copied when this method is called to prevent modification.
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)