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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an instance of
SunCertPathBuilder . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Create an instance of SunCertPathBuilder
.
CertPathBuilderException | if an error occurs |
---|
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.
params | the parameter set for building a path. Must be an instance
of PKIXBuilderParameters . |
---|
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. |