Package java.security.cert
Class PKIXCertPathChecker
- java.lang.Object
-
- java.security.cert.PKIXCertPathChecker
-
- All Implemented Interfaces:
Cloneable
public abstract class PKIXCertPathChecker extends Object implements Cloneable
The class specifying the interface to extend the certification path validation algorithm by checks to perform on anX509Certificate.The checks are added to a certification path validation using the
setCertPathCheckersoraddCertPathCheckerof thePKIXParametersandPKIXBuilderParametersclass respectively. Thecheckmethod will be called for each certificate processed by aCertPathBuilderofCertPathValidator.A
PKIXCertPathCheckerimplementation must support reverse checking (from trusted CA to target) and may support forward checking (from target to trusted CA). The return value ofisForwardCheckingSupportedindicates whether forward checking is supported.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPKIXCertPathChecker()Creates a newPKIXCertPathCheckerinstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcheck(Certificate cert, Collection<String> unresolvedCritExts)Checks the specified certificate and removes the processed critical extensions from the specified list of X.509 extension OIDs.Objectclone()Clones thisPKIXCertPathCheckerinstance.abstract Set<String>getSupportedExtensions()Returns the list of extensions of X.509 certificates that thisPKIXCertPathCheckeris able to process.abstract voidinit(boolean forward)Initializes thisPKIXCertPathCheckerinstance for specified checking direction.abstract booleanisForwardCheckingSupported()Returns whether thisPKIXCertPathCheckerinstance supports forward checking.
-
-
-
Method Detail
-
clone
public Object clone()
Clones thisPKIXCertPathCheckerinstance.
-
init
public abstract void init(boolean forward) throws CertPathValidatorExceptionInitializes thisPKIXCertPathCheckerinstance for specified checking direction.- Parameters:
forward- the direction of the certification path processing,trueif the certificates are processed in forward direction (from target to trusted CA),falseif processed in reverse direction (from trusted CA to target).- Throws:
CertPathValidatorException- if initialization of thisPKIXCertPathCheckerinstance fails, or if it cannot process certificates in the specified order.
-
isForwardCheckingSupported
public abstract boolean isForwardCheckingSupported()
Returns whether thisPKIXCertPathCheckerinstance supports forward checking.- Returns:
trueif thisPKIXCertPathCheckerinstance supports forward checking, otherwisefalse.
-
getSupportedExtensions
public abstract Set<String> getSupportedExtensions()
Returns the list of extensions of X.509 certificates that thisPKIXCertPathCheckeris able to process.- Returns:
- the list of extensions of X.509 certificates that this
PKIXCertPathCheckeris able to process, ornullif there are none.
-
check
public abstract void check(Certificate cert, Collection<String> unresolvedCritExts) throws CertPathValidatorException
Checks the specified certificate and removes the processed critical extensions from the specified list of X.509 extension OIDs.- Parameters:
cert- the certificate.unresolvedCritExts- the list of critical X.509 extension OID strings.- Throws:
CertPathValidatorException- if check(s) fail on the specified certificate.
-
-