TrustAnchor

public class TrustAnchor extends Object

A trust anchor or most-trusted Certification Authority (CA).

This class represents a "most-trusted CA", which is used as a trust anchor for validating X.509 certification paths. A most-trusted CA includes the public key of the CA, the CA's name, and any constraints upon the set of paths which may be validated using this key. These parameters can be specified in the form of a trusted X509Certificate or as individual parameters.

Concurrent Access

All TrustAnchor objects must be immutable and thread-safe. That is, multiple threads may concurrently invoke the methods defined in this class on a single TrustAnchor object (or more than one) with no ill effects. Requiring TrustAnchor objects to be immutable and thread-safe allows them to be passed around to various pieces of code without worrying about coordinating access. This stipulation applies to all public fields and methods of this class and any added or overridden by subclasses.

Public Constructor Summary

TrustAnchor(X509Certificate trustedCert, byte[] nameConstraints)
Creates an instance of TrustAnchor with the specified X509Certificate and optional name constraints, which are intended to be used as additional constraints when validating an X.509 certification path.
TrustAnchor(X500Principal caPrincipal, PublicKey pubKey, byte[] nameConstraints)
Creates an instance of TrustAnchor where the most-trusted CA is specified as an X500Principal and public key.
TrustAnchor(String caName, PublicKey pubKey, byte[] nameConstraints)
Creates an instance of TrustAnchor where the most-trusted CA is specified as a distinguished name and public key.

Public Method Summary

final X500Principal
getCA()
Returns the name of the most-trusted CA as an X500Principal.
final String
getCAName()
Returns the name of the most-trusted CA in RFC 2253 String format.
final PublicKey
getCAPublicKey()
Returns the public key of the most-trusted CA.
final