public class CertPathBuilder extends Object
Modifier | Constructor and Description |
---|---|
protected |
CertPathBuilder(CertPathBuilderSpi builderSpi,
Provider provider,
String algorithm)
Creates a new
CertPathBuilder . |
Modifier and Type | Method and Description |
---|---|
CertPathBuilderResult |
build(CertPathParameters params)
Builds a certification path with the specified algorithm parameters.
|
String |
getAlgorithm()
Returns the algorithm name of this instance.
|
static String |
getDefaultType()
Returns the default
CertPathBuilder type from the Security
Properties. |
static CertPathBuilder |
getInstance(String algorithm)
Creates a new
CertPathBuilder instance with 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,
String provider)
Creates a new
CertPathBuilder instance from the specified
provider providing the specified algorithm. |
Provider |
getProvider()
Returns the provider of this instance.
|
protected CertPathBuilder(CertPathBuilderSpi builderSpi, Provider provider, String algorithm)
CertPathBuilder
.builderSpi
- the implementation delegate.provider
- the provider.algorithm
- the desired algorithm available at the provider.public final String getAlgorithm()
public final Provider getProvider()
public static CertPathBuilder getInstance(String algorithm) throws NoSuchAlgorithmException
CertPathBuilder
instance with the specified
algorithm.algorithm
- the name of the algorithm.NullPointerException
- if the algorithm is null
.NoSuchAlgorithmException
- if no installed provider can provide the algorithm.public static CertPathBuilder getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
CertPathBuilder
instance from the specified
provider providing the specified algorithm.algorithm
- the name of the algorithm.provider
- the name of the provider.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) throws NoSuchAlgorithmException
CertPathBuilder
instance from the specified
provider providing the specified algorithm.algorithm
- the name of the algorithm.provider
- the provider.NoSuchAlgorithmException
- if the specified provider cannot provide the algorithm.IllegalArgumentException
- if provider is null
.NullPointerException
- if algorithm is null
.public final CertPathBuilderResult build(CertPathParameters params) throws CertPathBuilderException, InvalidAlgorithmParameterException
params
- the algorithm parameters.CertPathBuilderException
- if the build fails.InvalidAlgorithmParameterException
- if the specified parameters cannot be used to build with this
builder.CertPathBuilderResult
public static final String getDefaultType()
CertPathBuilder
type from the Security
Properties.CertPathBuilder
type from the Security
Properties, or the string "PKIX
" if it cannot be
determined.