java.security.cert
public class CertPathValidator extends Object
Using this class is similar to all the provider-based security classes; the method of interest, {@link #validate(java.security.cert.CertPath,java.security.cert.CertPathParameters)}, which takes provider-specific implementations of {@link CertPathParameters}, and return provider-specific implementations of {@link CertPathValidatorResult}.
Since: JDK 1.4
See Also: CertPath
| Constructor Summary | |
|---|---|
| protected | CertPathValidator(CertPathValidatorSpi validatorSpi, Provider provider, String algorithm)
Creates a new CertPathValidator.
|
| Method Summary | |
|---|---|
| String | getAlgorithm()
Return the name of this validator.
|
| static String | getDefaultType()
Returns the default validator type.
|
| static CertPathValidator | getInstance(String algorithm)
Returns an instance of the given validator from the first provider that
implements it.
|
| static CertPathValidator | getInstance(String algorithm, String provider)
Returns an instance of the given validator from the named provider.
|
| static CertPathValidator | getInstance(String algorithm, Provider provider)
Returns an instance of the given validator from the given provider.
|
| Provider | getProvider()
Return the provider of this implementation.
|
| CertPathValidatorResult | validate(CertPath certPath, CertPathParameters params)
Attempt to validate a certificate path.
|
Parameters: validatorSpi The underlying implementation. provider The provider of the implementation. algorithm The algorithm name.
Returns: This validator's name.
This value may be set at run-time via the security property "certpathvalidator.type", or the value "PKIX" if this property is not set.
Returns: The default validator type.
Parameters: algorithm The name of the algorithm to get.
Returns: The new instance.
Throws: NoSuchAlgorithmException If no installed provider implements the
requested algorithm. IllegalArgumentException if algorithm is
null or is an empty string.
Parameters: algorithm The name of the algorithm to get. provider The name of the provider from which to get the implementation.
Returns: The new instance.
Throws: NoSuchAlgorithmException If the named provider does not implement
the algorithm. NoSuchProviderException If no provider named provider is
installed. IllegalArgumentException if either algorithm or
provider is null, or if
algorithm is an empty string.
Parameters: algorithm The name of the algorithm to get. provider The provider from which to get the implementation.
Returns: The new instance.
Throws: NoSuchAlgorithmException If the provider does not implement the
algorithm. IllegalArgumentException if either algorithm or
provider is null, or if
algorithm is an empty string.
Returns: The provider.
Parameters: certPath The path to validate. params The algorithm-specific parameters.
Returns: The result of this validation attempt.
Throws: CertPathValidatorException If the certificate path cannot be validated. InvalidAlgorithmParameterException If this implementation rejects the specified parameters.