public final class AlgorithmChecker
extends java.security.cert.PKIXCertPathChecker
PKIXCertPathChecker implementation to check whether a
specified certificate contains the required algorithm constraints.
Certificate fields such as the subject public key, the signature algorithm, key usage, extended key usage, etc. need to conform to the specified algorithm constraints.
PKIXCertPathChecker,
PKIXParameters| Constructor and Description |
|---|
AlgorithmChecker(java.security.AlgorithmConstraints constraints,
java.lang.String variant)
Create a new
AlgorithmChecker with the given
AlgorithmConstraints and String variant. |
AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.security.AlgorithmConstraints constraints,
java.util.Date date,
java.lang.String variant)
Create a new
AlgorithmChecker with the
given TrustAnchor, AlgorithmConstraints, Date,
and String variant. |
AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.util.Date date,
java.lang.String variant)
Create a new
AlgorithmChecker with the given TrustAnchor,
PKIXParameter date, and variant. |
AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.lang.String variant)
Create a new
AlgorithmChecker with the given
TrustAnchor and String variant. |
| Modifier and Type | Method and Description |
|---|---|
void |
check(java.security.cert.Certificate cert,
java.util.Collection<java.lang.String> unresolvedCritExts) |
java.util.Set<java.lang.String> |
getSupportedExtensions() |
void |
init(boolean forward) |
boolean |
isForwardCheckingSupported() |
public AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.lang.String variant)
AlgorithmChecker with the given
TrustAnchor and String variant.anchor - the trust anchor selected to validate the target
certificatevariant - the Validator variant of the operation. A null value
passed will set it to Validator.GENERIC.public AlgorithmChecker(java.security.AlgorithmConstraints constraints,
java.lang.String variant)
AlgorithmChecker with the given
AlgorithmConstraints and String variant.
Note that this constructor can initialize a variation of situations where
the AlgorithmConstraints or Variant maybe known.constraints - the algorithm constraints (or null)variant - the Validator variant of the operation. A null value
passed will set it to Validator.GENERIC.public AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.security.AlgorithmConstraints constraints,
java.util.Date date,
java.lang.String variant)
AlgorithmChecker with the
given TrustAnchor, AlgorithmConstraints, Date,
and String variant.anchor - the trust anchor selected to validate the target
certificateconstraints - the algorithm constraints (or null)date - the date specified by the PKIXParameters date, or the
timestamp if JAR files are being validated and the
JAR is timestamped. May be null if no timestamp or
PKIXParameter date is set.variant - the Validator variant of the operation. A null value
passed will set it to Validator.GENERIC.public AlgorithmChecker(java.security.cert.TrustAnchor anchor,
java.util.Date date,
java.lang.String variant)
AlgorithmChecker with the given TrustAnchor,
PKIXParameter date, and variant.anchor - the trust anchor selected to validate the target
certificatedate - the date specified by the PKIXParameters date, or the
timestamp if JAR files are being validated and the
JAR is timestamped. May be null if no timestamp or
PKIXParameter date is set.variant - the Validator variant of the operation. A null value
passed will set it to Validator.GENERIC.public void init(boolean forward)
throws java.security.cert.CertPathValidatorException
init in interface java.security.cert.CertPathCheckerinit in class java.security.cert.PKIXCertPathCheckerjava.security.cert.CertPathValidatorExceptionpublic boolean isForwardCheckingSupported()
isForwardCheckingSupported in interface java.security.cert.CertPathCheckerisForwardCheckingSupported in class java.security.cert.PKIXCertPathCheckerpublic java.util.Set<java.lang.String> getSupportedExtensions()
getSupportedExtensions in class java.security.cert.PKIXCertPathCheckerpublic void check(java.security.cert.Certificate cert,
java.util.Collection<java.lang.String> unresolvedCritExts)
throws java.security.cert.CertPathValidatorException
check in class java.security.cert.PKIXCertPathCheckerjava.security.cert.CertPathValidatorException