public class

CertPathBuilder

extends Object
java.lang.Object
   ↳ java.security.cert.CertPathBuilder

Class Overview

This class implements the functionality of a builder for an unverified Certification Paths from a specified certificate to a trust anchor.

Summary

Protected Constructors
CertPathBuilder(CertPathBuilderSpi builderSpi, Provider provider, String algorithm)
Creates a new CertPathBuilder.
Public Methods
final CertPathBuilderResult build(CertPathParameters params)
Builds a certification path with the specified algorithm parameters.
final String getAlgorithm()
Returns the algorithm name of this instance.
final static String getDefaultType()
Returns the default CertPathBuilder type from the Security Properties.
static CertPathBuilder getInstance(String algorithm, String provider)
Creates a new CertPathBuilder instance from the specified provider providing the specified algorithm.
static CertPathBuilder getInstance(String algorithm, Provider provider)
Creates a new CertPathBuilder instance from the specified provider providing the specified algorithm.
static CertPathBuilder getInstance(String algorithm)
Creates a new CertPathBuilder instance with the specified algorithm.
final Provider getProvider()
Returns the provider of this instance.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected CertPathBuilder (CertPathBuilderSpi builderSpi, Provider provider, String algorithm)

Creates a new CertPathBuilder.

Parameters
builderSpi the implementation delegate.
provider the provider.
algorithm the desired algorithm available at the provider.

Public Methods

public final CertPathBuilderResult build (CertPathParameters params)

Builds a certification path with the specified algorithm parameters.

Parameters
params the algorithm parameters.
Returns
  • the built certification path.
Throws
CertPathBuilderException if the build fails.
InvalidAlgorithmParameterException if the specified parameters cannot be used to build with this builder.

public final String getAlgorithm ()

Returns the algorithm name of this instance.

Returns
  • the algorithm name of this instance.

public static final String getDefaultType ()

Returns the default CertPathBuilder type from the Security Properties.

Returns
  • the default CertPathBuilder type from the Security Properties, or the string "PKIX" if it cannot be determined.

public static CertPathBuilder getInstance (String algorithm, String provider)

Creates a new CertPathBuilder instance from the specified provider providing the specified algorithm.

Parameters
algorithm the name of the algorithm.
provider the name of the provider.
Returns
  • a builder for the requested algorithm.
Throws
NoSuchAlgorithmException if the specified provider cannot provide the algorithm.
NoSuchProviderException if no provider with the specified name can be found.
NullPointerException if algorithm is null.
IllegalArgumentException if provider is null or empty.

public static CertPathBuilder getInstance (String algorithm, Provider provider)

Creates a new CertPathBuilder instance from the specified provider providing the specified algorithm.

Parameters
algorithm the name of the algorithm.
provider the provider.
Returns
  • a builder for the requested algorithm
Throws
NoSuchAlgorithmException if the specified provider cannot provide the algorithm.
IllegalArgumentException if provider is null.
NullPointerException if algorithm is null.

public static CertPathBuilder getInstance (String algorithm)

Creates a new CertPathBuilder instance with the specified algorithm.

Parameters
algorithm the name of the algorithm.
Returns
  • a builder for the requested algorithm.
Throws
NullPointerException if the algorithm is null.
NoSuchAlgorithmException if no installed provider can provide the algorithm.

public final Provider getProvider ()

Returns the provider of this instance.

Returns
  • the provider of this instance.