|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.cert.CertPathValidator
public class CertPathValidator
Generic interface to classes that validate certificate paths.
Using this class is similar to all the provider-based security
classes; the method of interest, validate(java.security.cert.CertPath,java.security.cert.CertPathParameters)
,
which takes provider-specific implementations of CertPathParameters
, and return provider-specific implementations of
CertPathValidatorResult
.
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,
Provider provider)
Returns an instance of the given validator from the given provider. |
static CertPathValidator |
getInstance(String algorithm,
String provider)
Returns an instance of the given validator from the named provider. |
Provider |
getProvider()
Return the provider of this implementation. |
CertPathValidatorResult |
validate(CertPath certPath,
CertPathParameters params)
Attempt to validate a certificate path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CertPathValidator(CertPathValidatorSpi validatorSpi, Provider provider, String algorithm)
validatorSpi
- The underlying implementation.provider
- The provider of the implementation.algorithm
- The algorithm name.Method Detail |
---|
public static String getDefaultType()
This value may be set at run-time via the security property "certpathvalidator.type", or the value "PKIX" if this property is not set.
public static CertPathValidator getInstance(String algorithm) throws NoSuchAlgorithmException
algorithm
- The name of the algorithm to get.
NoSuchAlgorithmException
- If no installed provider implements the
requested algorithm.
IllegalArgumentException
- if algorithm
is
null
or is an empty string.public static CertPathValidator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
algorithm
- The name of the algorithm to get.provider
- The name of the provider from which to get the
implementation.
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.public static CertPathValidator getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
algorithm
- The name of the algorithm to get.provider
- The provider from which to get the implementation.
NoSuchAlgorithmException
- If the provider does not implement the
algorithm.
IllegalArgumentException
- if either algorithm
or
provider
is null
, or if
algorithm
is an empty string.public final String getAlgorithm()
public final Provider getProvider()
public final CertPathValidatorResult validate(CertPath certPath, CertPathParameters params) throws CertPathValidatorException, InvalidAlgorithmParameterException
certPath
- The path to validate.params
- The algorithm-specific parameters.
CertPathValidatorException
- If the certificate path cannot
be validated.
InvalidAlgorithmParameterException
- If this implementation
rejects the specified parameters.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |