Skip to content

Most visited

Recently visited

navigation
Added in API level 1

CertPathBuilder

public class CertPathBuilder
extends Object

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


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.

Inherited methods

From class java.lang.Object

Protected constructors

CertPathBuilder

Added in API level 1
CertPathBuilder (CertPathBuilderSpi builderSpi, 
                Provider provider, 
                String algorithm)

Creates a new CertPathBuilder.

Parameters
builderSpi CertPathBuilderSpi: the implementation delegate.
provider Provider: the provider.
algorithm String: the desired algorithm available at the provider.

Public methods

build

Added in API level 1
CertPathBuilderResult build (CertPathParameters params)

Builds a certification path with the specified algorithm parameters.

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

See also:

getAlgorithm

Added in API level 1
String getAlgorithm ()

Returns the algorithm name of this instance.

Returns
String the algorithm name of this instance.

getDefaultType

Added in API level 1
String getDefaultType ()

Returns the default CertPathBuilder type from the Security Properties.

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

getInstance

Added in API level 1
CertPathBuilder getInstance (String algorithm, 
                String provider)

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

Parameters
algorithm String: the name of the algorithm.
provider String: the name of the provider.
Returns
CertPathBuilder 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 == null || provider.isEmpty()

getInstance

Added in API level 1
CertPathBuilder getInstance (String algorithm, 
                Provider provider)

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

Parameters
algorithm String: the name of the algorithm.
provider Provider: the provider.
Returns
CertPathBuilder a builder for the requested algorithm
Throws
NoSuchAlgorithmException if the specified provider cannot provide the algorithm.
IllegalArgumentException if provider == null
NullPointerException if algorithm is null.

getInstance

Added in API level 1
CertPathBuilder getInstance (String algorithm)

Creates a new CertPathBuilder instance with the specified algorithm.

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

getProvider

Added in API level 1
Provider getProvider ()

Returns the provider of this instance.

Returns
Provider the provider of this instance.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.