模块 java.base

接口 CertPathChecker

所有已知的实现类:
PKIXCertPathChecker , PKIXRevocationChecker

public interface CertPathChecker

CertPath 的每个 Certificate 执行一项或多项检查。

通常创建 CertPathChecker 实现来扩展证书路径验证算法。例如,一个实现可以检查并处理证书路径中每个证书的关键私有扩展。

自从:
1.8
  • 方法总结

    修饰符和类型
    方法
    描述
    void
    使用其内部状态对指定证书执行检查。
    void
    init(boolean forward)
    初始化此 CertPathChecker 的内部状态。
    boolean
    指示是否支持前向检查。
  • 方法详情

    • init

      void init(boolean forward) throws CertPathValidatorException
      初始化此 CertPathChecker 的内部状态。

      forward 标志指定将证书传递给 check 方法的顺序(正向或反向)。

      参数:
      forward - 证书提交给 check 方法的顺序。如果 true ,证书从目标提交到信任锚(转发);如果 false ,从信任锚到目标(反向)。
      抛出:
      CertPathValidatorException - 如果此 CertPathChecker 无法按指定顺序检查证书
    • isForwardCheckingSupported

      boolean isForwardCheckingSupported()
      指示是否支持前向检查。前向检查是指 CertPathChecker 在正向(从目标到信任锚)上向 check 方法提供证书时执行其检查的能力。
      返回:
      true 如果支持前向检查,false 否则
    • check

      void check(Certificate  cert) throws CertPathValidatorException
      使用其内部状态对指定证书执行检查。证书按 init 方法指定的顺序显示。
      参数:
      cert - 要检查的 Certificate
      抛出:
      CertPathValidatorException - 如果指定的证书没有通过检查