Most visited

Recently visited

Added in API level 24

CertPathChecker

public interface CertPathChecker

java.security.cert.CertPathChecker
Known Indirect Subclasses


对每个的一个或多个检查 Certificate一个的 CertPath

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

Summary

Public methods

abstract void check(Certificate cert)

使用其内部状态对指定证书执行检查。

abstract void init(boolean forward)

初始化此 CertPathChecker的内部状态。

abstract boolean isForwardCheckingSupported()

指示是否支持转发检查。

Public methods

check

Added in API level 24
void check (Certificate cert)

使用其内部状态对指定证书执行检查。 证书按照init方法指定的顺序init

Parameters
cert Certificate: the Certificate to be checked
Throws
CertPathValidatorException if the specified certificate does not pass the check

init

Added in API level 24
void init (boolean forward)

初始化此 CertPathChecker的内部状态。

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

Parameters
forward boolean: the order that certificates are presented to the check method. If true, certificates are presented from target to trust anchor (forward); if false, from trust anchor to target (reverse).
Throws
CertPathValidatorException if this CertPathChecker is unable to check certificates in the specified order

isForwardCheckingSupported

Added in API level 24
boolean isForwardCheckingSupported ()

指示是否支持转发检查。 前向检查是指在向前方向(从目标到信任锚点)向check方法颁发证书时, CertPathChecker执行检查的能力。

Returns
boolean true if forward checking is supported, false otherwise

Hooray!