public class

SunCertPathBuilderParameters

extends PKIXBuilderParameters
java.lang.Object
   ↳ java.security.cert.PKIXParameters
     ↳ java.security.cert.PKIXBuilderParameters
       ↳ sun.security.provider.certpath.SunCertPathBuilderParameters

Class Overview

This class specifies the set of parameters used as input for the Sun certification path build algorithm. It is identical to PKIXBuilderParameters with the addition of a buildForward parameter which allows the caller to specify whether or not the path should be constructed in the forward direction. The default for the buildForward parameter is true, which means that the build algorithm should construct paths from the target subject back to the trusted anchor.

Summary

Public Constructors
SunCertPathBuilderParameters(Set<TrustAnchor> trustAnchors, CertSelector targetConstraints)
Creates an instance of SunCertPathBuilderParameters with the specified parameter values.
SunCertPathBuilderParameters(KeyStore keystore, CertSelector targetConstraints)
Creates an instance of SunCertPathBuilderParameters that uses the specified KeyStore to populate the set of most-trusted CA certificates.
Public Methods
boolean getBuildForward()
Returns the value of the buildForward flag.
void setBuildForward(boolean buildForward)
Sets the value of the buildForward flag.
String toString()
Returns a formatted string describing the parameters.
[Expand]
Inherited Methods
From class java.security.cert.PKIXBuilderParameters
From class java.security.cert.PKIXParameters
From class java.lang.Object
From interface java.security.cert.CertPathParameters

Public Constructors

public SunCertPathBuilderParameters (Set<TrustAnchor> trustAnchors, CertSelector targetConstraints)

Creates an instance of SunCertPathBuilderParameters with the specified parameter values.

Parameters
trustAnchors a Set of TrustAnchors
targetConstraints a CertSelector specifying the constraints on the target certificate
Throws
InvalidAlgorithmParameterException if the specified Set is empty (trustAnchors.isEmpty() == true)
NullPointerException if the specified Set is null
ClassCastException if any of the elements in the Set are not of type java.security.cert.TrustAnchor

public SunCertPathBuilderParameters (KeyStore keystore, CertSelector targetConstraints)

Creates an instance of SunCertPathBuilderParameters that uses the specified KeyStore to populate the set of most-trusted CA certificates.

Parameters
keystore A keystore from which the set of most-trusted CA certificates will be populated.
targetConstraints a CertSelector specifying the constraints on the target certificate
Throws
KeyStoreException if the keystore has not been initialized.
InvalidAlgorithmParameterException if the keystore does not contain at least one trusted certificate entry
NullPointerException if the keystore is null

Public Methods

public boolean getBuildForward ()

Returns the value of the buildForward flag.

Returns
  • the value of the buildForward flag

public void setBuildForward (boolean buildForward)

Sets the value of the buildForward flag. If true, paths are built from the target subject to the trusted anchor. If false, paths are built from the trusted anchor to the target subject. The default value if not specified is true.

Parameters
buildForward the value of the buildForward flag

public String toString ()

Returns a formatted string describing the parameters.

Returns
  • a formatted string describing the parameters.