Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 593
نمايش فراداده

PKIXBuilderParametersjava.security.cert

Java 1.4cloneable

Instances of this class are used to specify parameters to the build( ) method of a CertPathBuilder object. These parameters must include the two mandatory ones passed to the constructors. The first is a source of trust anchors, which may be supplied as a Set of trustAnchor objects or as a java.security.KeyStore object. The second required parameter is a CertSelector object (typically an X509CertSelector) that specifies the selection criteria for the certificate that is to have the certification path built. In addition to these parameters that are passed to the constructor, this class also inherits a number of methods for setting other parameters, and defines setMaxPathLength( ) for specifying the maximum length of the certificate chain that is built.

Figure 14-66. java.security.cert.PKIXBuilderParameters

public class

PKIXBuilderParameters extends PKIXParameters { // Public Constructors public

PKIXBuilderParameters (java.security.KeyStore

keystore , CertSelector

targetConstraints ) throws java.security.KeyStoreException, java.security.InvalidAlgorithmParameterException; public

PKIXBuilderParameters (java.util.Set<TrustAnchor>

trustAnchors , CertSelector

targetConstraints ) throws java.security.InvalidAlgorithmParameterException; // Public Instance Methods public int

getMaxPathLength ( ); public void

setMaxPathLength (int

maxPathLength ); // Public Methods Overriding PKIXParameters public String

toString ( ); }