public interface CertificateVerifier
Modifier and Type | Method and Description |
---|---|
CertificateVerifyResult |
verify(CertificateVerifyParams params)
Verifies the given SSL
将给定的SSL CertificateVerifyParams.getCertificate()与给定的CertificateVerifyParams.getHostName()验证为SSL服务器。 CertificateVerifyParams.getCertificate() against the given
CertificateVerifyParams.getHostName() as an SSL server.
|
CertificateVerifyResult verify(CertificateVerifyParams params)
CertificateVerifyParams.getCertificate()
against the given
CertificateVerifyParams.getHostName()
as an SSL server.
This method is invoked every time when Server SSL certificate verification is required. By default Chromium uses its own default certificate verifier which always checks incoming SSL certificate and passes verification results as
CertificateVerifyParams.getVerifyFlags()
parameter. You can analyze the verify flags parameter to find out how the given certificate was initially validated by Chromium engine and decide whether it should be accepted/rejected, or Chromium should decide it itself.
If implementation of this method throws an exception, then default behavior will be used - Chromium engine will decide itself whether SSL certificate should be accepted or rejected.
params
- details about certificate, host, and Chromium verify results.
-有关证书,主机和Chromium验证结果的详细信息。
CertificateVerifyResult.OK
to accept SSL certificate,
CertificateVerifyResult.INVALID
to reject SSL certificate,
CertificateVerifyResult.DEFAULT
to let Chromium decide.
接受SSL证书,拒绝SSL证书,让Chromium做出决定。