java.security.cert
Class PKIXCertPathBuilderResult

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

public class PKIXCertPathBuilderResult
extends PKIXCertPathValidatorResult
implements CertPathBuilderResult

This class represents the successful result of the PKIX certification path builder algorithm. All certification paths that are built and returned using this algorithm are also validated according to the PKIX certification path validation algorithm.

Instances of PKIXCertPathBuilderResult are returned by the build method of CertPathBuilder objects implementing the PKIX algorithm.

All PKIXCertPathBuilderResult objects contain the certification path constructed by the build algorithm, the valid policy tree and subject public key resulting from the build algorithm, and the certificate containing the public key of the "most-trusted CA" that was used as a trust anchor by the build 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:
CertPathBuilderResult

Constructor Summary
PKIXCertPathBuilderResult(CertPath certPath, Certificate trustedCert, PolicyNode policyTree, PublicKey subjectPublicKey)
          Creates an instance of PKIXCertPathBuilderResult 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.
 CertPath getCertPath()
          Returns the built and validated certification path.
 int hashCode()
          Returns a hash code value for this object.
 String toString()
          Return a printable representation of this PKIXCertPathBuilderResult.
 
Methods inherited from class java.security.cert.PKIXCertPathValidatorResult
getPolicyTree, getPublicKey, getTrustedCert
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PKIXCertPathBuilderResult

public PKIXCertPathBuilderResult(CertPath certPath,
                                 Certificate trustedCert,
                                 PolicyNode policyTree,
                                 PublicKey subjectPublicKey)
Creates an instance of PKIXCertPathBuilderResult containing the specified parameters.
Parameters:
certPath - the validated CertPath
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 certPath or subjectPublicKey are null
Method Detail

getCertPath

public CertPath getCertPath()
Returns the built and validated certification path. The CertPath object does not include the certificate containing the most-trusted CA's public key. Instead, use the getTrustedCert() method to obtain the most-trusted CA certificate.
Specified by:
getCertPath in interface CertPathBuilderResult
Returns:
the built and validated CertPath (never null)

hashCode

public int hashCode()
Returns a hash code value for this object.
Overrides:
hashCode in class PKIXCertPathValidatorResult
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 PKIXCertPathBuilderResult, return false. Otherwise, return true if the parameters of the objects are equal.
Overrides:
equals in class PKIXCertPathValidatorResult
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 CertPathBuilderResult
Overrides:
clone in class PKIXCertPathValidatorResult
Returns:
the copy

toString

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


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.