Emit verify-certificate only when default verifier fails

This commit is contained in:
Cheng Zhao 2015-11-17 21:36:36 +08:00
parent e3517b701e
commit ebe66daa56
4 changed files with 65 additions and 68 deletions

View file

@ -266,11 +266,12 @@ void Session::RequestCertVerification(
const scoped_refptr<AtomCertVerifier::CertVerifyRequest>& request) {
bool prevent_default = Emit(
"verify-certificate",
request->hostname(),
make_scoped_refptr(request->cert()),
request->args().hostname,
request->args().cert,
base::Bind(&PassVerificationResult, request));
if (!prevent_default)
// Tell the request to use the result of default verifier.
request->ContinueWithResult(net::ERR_IO_PENDING);
}