public final class

SunCertPathBuilder

extends CertPathBuilderSpi
java.lang.Object
   ↳ java.security.cert.CertPathBuilderSpi
     ↳ sun.security.provider.certpath.SunCertPathBuilder

Class Overview

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.

Summary

Public Constructors
SunCertPathBuilder()
Create an instance of SunCertPathBuilder.
Public Methods
CertPathBuilderResult engineBuild(CertPathParameters params)
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.
[Expand]
Inherited Methods
From class java.security.cert.CertPathBuilderSpi
From class java.lang.Object

Public Constructors

public SunCertPathBuilder ()

Create an instance of SunCertPathBuilder.

Throws
CertPathBuilderException if an error occurs

Public Methods

public CertPathBuilderResult engineBuild (CertPathParameters params)

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.

Parameters
params the parameter set for building a path. Must be an instance of PKIXBuilderParameters.
Returns
  • a certification path builder result.
Throws
CertPathBuilderException Exception thrown if builder is unable to build a complete certification path from the trusted anchor(s) to the target subject.
InvalidAlgorithmParameterException if the given parameters are inappropriate for this certification path builder.