java.lang.Object | |
↳ | java.security.cert.TrustAnchor |
This class represents a trust anchor for validation of X.509 certification path.
It is a trusted certificate authority (CA) and includes the public key of the CA, the CA's name and the constraints for the validation of certification paths. The constructor also allows to specify a binary representation of a so called "Name Constraints" extension as a byte array.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Creates a new
TrustAnchor
with the specified certificate and name
constraints.
|
||||||||||
|
Creates a new
TrustAnchor
with the specified certificate
authority name, its public key and the specified name constraints.
|
||||||||||
|
Creates a new
TrustAnchor
with the specified certificate
authority name as principal, its public key and the specified name
constraints.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Returns the name of the certificate authority as
X500Principal
.
|
||||||||||
|
Returns the name of the certificate authority as
String
in RFC
2253 format.
|
||||||||||
|
Returns the public key of the certificate authority.
|
||||||||||
|
Returns a copy of the name constraints in ASN.1 DER encoded form.
|
||||||||||
|
Returns the certificate of this
trusted
certificate authority.
|
||||||||||
|
Returns a string representation of this
TrustAnchor
instance.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a new
TrustAnchor
with the specified certificate and name
constraints.
The name constraints will be used as additional constraints during the validation of certification paths.
trustedCert | the trusted certificate |
---|---|
nameConstraints |
the ASN.1 DER encoded form of the name constraints or
null
if none.
|
IllegalArgumentException | if the decoding of the name constraints fail. |
---|
Creates a new
TrustAnchor
with the specified certificate
authority name, its public key and the specified name constraints.
The name constraints will be used as additional constraints during the validation of certification paths.
caName |
the X.500 name of the certificate authority in RFC 2253
String
format.
|
---|---|
caPublicKey | the public key of the certificate authority |
nameConstraints |
the ASN.1 DER encoded form of the name constraints or
null
if none.
|
IllegalArgumentException |
if the
caName
is empty or if decoding of the name
constraints fail.
|
---|
Creates a new
TrustAnchor
with the specified certificate
authority name as principal, its public key and the specified name
constraints.
The name constraints will be used as additional constraints during the validation of certification paths.
caPrincipal | the name of the certificate authority as X500 principal. |
---|---|
caPublicKey | the public key of the certificate authority. |
nameConstraints |
the ASN.1 DER encoded form of the name constraints or
null
if none.
|
IllegalArgumentException | if decoding of the name constraints fail. |
---|
Returns the name of the certificate authority as
X500Principal
.
null
if the
trust anchor of this instance was not created with a
X500Principal
.
Returns the name of the certificate authority as
String
in RFC
2253 format.
String
in RFC
2253 format or
null
if the trust anchor of this instance
was not created with a CA name.
Returns the public key of the certificate authority.
null
if
the trust anchor if this instance was not created with a public
key.
Returns a copy of the name constraints in ASN.1 DER encoded form.
Returns the certificate of this trusted certificate authority.
null
, if the trust anchor
of this instance was not created with a certificate.
Returns a string representation of this
TrustAnchor
instance.
TrustAnchor
instance.