Save This Page
Home » openjdk-7 » sun.security » provider » certpath » [javadoc | source]
sun.security.provider.certpath
public final class: SunCertPathBuilder [javadoc | source]
java.lang.Object
   java.security.cert.CertPathBuilderSpi
      sun.security.provider.certpath.SunCertPathBuilder
This class is able to build certification paths in either the forward or reverse directions.

If successful, it returns a certification path which has succesfully satisfied all the constraints and requirements specified in the PKIXBuilderParameters object and has been validated according to the PKIX path validation algorithm defined in RFC 3280.

This implementation uses a depth-first search approach to finding certification paths. If it comes to a point in which it cannot find any more certificates leading to the target OR the path length is too long it backtracks to previous paths until the target has been found or all possible paths have been exhausted.

This implementation is not thread-safe.

Constructor:
 public SunCertPathBuilder() throws CertPathBuilderException 
    Create an instance of SunCertPathBuilder.
    Throws:
    CertPathBuilderException - if an error occurs
Method from sun.security.provider.certpath.SunCertPathBuilder Summary:
depthFirstSearchForward,   depthFirstSearchReverse,   engineBuild
Methods from java.security.cert.CertPathBuilderSpi:
engineBuild
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.security.provider.certpath.SunCertPathBuilder Detail:
  void depthFirstSearchForward(X500Principal dN,
    ForwardState currentState,
    ForwardBuilder builder,
    List adjList,
    LinkedList certPathList) throws IOException, GeneralSecurityException 
  void depthFirstSearchReverse(X500Principal dN,
    ReverseState currentState,
    ReverseBuilder builder,
    List adjList,
    LinkedList certPathList) throws IOException, GeneralSecurityException 
 public CertPathBuilderResult engineBuild(CertPathParameters params) throws CertPathBuilderException, InvalidAlgorithmParameterException 
    Attempts to build a certification path using the Sun build algorithm from a trusted anchor(s) to a target subject, which must both be specified in the input parameter set. By default, this method will attempt to build in the forward direction. In order to build in the reverse direction, the caller needs to pass in an instance of SunCertPathBuilderParameters with the buildForward flag set to false.

    The certification path that is constructed is validated according to the PKIX specification.