java.security.cert
Class PKIXCertPathValidatorResult

java.lang.Object
  |
  +--java.security.cert.PKIXCertPathValidatorResult
All Implemented Interfaces:
CertPathValidatorResult, Cloneable
Direct Known Subclasses:
PKIXCertPathBuilderResult

public class PKIXCertPathValidatorResult
extends Object
implements CertPathValidatorResult

This class represents the successful result of the PKIX certification path validation algorithm.

Instances of PKIXCertPathValidatorResult are returned by the validate method of CertPathValidator objects implementing the PKIX algorithm.

All PKIXCertPathValidatorResult objects contain the valid policy tree and subject public key resulting from the validation algorithm, as well as the certificate containing the public key of the "most-trusted CA" that was used as a trust anchor by the validation algorithm.

Concurrent Access

Unless otherwise specified, the methods defined in this class are not thread-safe. Multiple threads that need to access a single object concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating separate objects need not synchronize.

Since:
1.4
See Also:
CertPathValidatorResult

Constructor Summary
PKIXCertPathValidatorResult(Certificate trustedCert, PolicyNode policyTree, PublicKey subjectPublicKey)
          Creates an instance of PKIXCertPathValidatorResult containing the specified parameters.
 
Method Summary
 Object clone()
          Returns a copy of this object.
 boolean equals(Object other)
          Compares this object for equality with the specified object.
 PolicyNode getPolicyTree()
          Returns the valid policy tree resulting from the PKIX certification path validation algorithm.
 PublicKey getPublicKey()
          Returns the public key of the subject (target) of the certification path, including any inherited public key parameters if applicable.
 Certificate getTrustedCert()
          Returns the certificate containing the public key of the most-trusted CA.
 int hashCode()
          Returns a hash code value for this object.
 String toString()
          Return a printable representation of this PKIXCertPathValidatorResult.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PKIXCertPathValidatorResult

public PKIXCertPathValidatorResult(Certificate trustedCert,
                                   PolicyNode policyTree,
                                   PublicKey subjectPublicKey)
Creates an instance of PKIXCertPathValidatorResult containing the specified parameters.
Parameters:
trustedCert - - the Certificate containing the public key of the most-trusted CA. Specify null when the public key is not supplied in the form of a certificate.
policyTree - the valid policy tree, or null if there are no valid policies
subjectPublicKey - the public key of the subject
Throws:
NullPointerException - if subjectPublicKey is null
Method Detail

getTrustedCert

public Certificate getTrustedCert()
Returns the certificate containing the public key of the most-trusted CA. Returns null when the trusted public key is not supplied in the form of a certificate.
Returns:
a Certificate containing the public key of the most-trusted CA (or null)

getPolicyTree

public PolicyNode getPolicyTree()
Returns the valid policy tree resulting from the PKIX certification path validation algorithm. The PolicyNode object that is returned and any field that it returns through public methods is immutable.
Returns:
the root node of the valid policy tree, or null if there are no valid policies

getPublicKey

public PublicKey getPublicKey()
Returns the public key of the subject (target) of the certification path, including any inherited public key parameters if applicable.
Returns:
the public key of the subject (never null)

hashCode

public int hashCode()
Returns a hash code value for this object.
Overrides:
hashCode in class Object
Returns:
a hash code value

equals

public boolean equals(Object other)
Compares this object for equality with the specified object. If the other object is not an instance of PKIXCertPathValidatorResult, return false. Otherwise, return true if the parameters of the objects are equal.
Overrides:
equals in class Object
Parameters:
other - the object to test for equality
Returns:
true if the objects are equal, false otherwise

clone

public Object clone()
Returns a copy of this object.
Specified by:
clone in interface CertPathValidatorResult
Overrides:
clone in class Object
Returns:
the copy

toString

public String toString()
Return a printable representation of this PKIXCertPathValidatorResult.
Overrides:
toString in class Object
Returns:
a String describing the contents of this PKIXCertPathValidatorResult


Submit comments/suggestions about this API.
Copyright 1998-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.