From 8b2618a72ae4cb869f7ecdc81667c0bc98f4d951 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 17 Jan 2017 12:49:23 -0500 Subject: [PATCH] Fix CefRequestHandler::OnCertificateError callback trigger (issue #2019) --- libcef/browser/content_browser_client.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 7bdab99b8..a2634cbf3 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -199,7 +199,7 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback { static void RunNow(const CallbackType& callback, bool allow) { CEF_REQUIRE_UIT(); callback.Run(allow ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE : - content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); + content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); } CallbackType callback_; @@ -750,11 +750,10 @@ void CefContentBrowserClient::AllowCertificateError( bool proceed = handler->OnCertificateError( browser.get(), static_cast(cert_error), request_url.spec(), cef_ssl_info, callbackImpl.get()); - if (!proceed) + if (!proceed) { callbackImpl->Disconnect(); - - callback.Run(proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE : - content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); + callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); + } } void CefContentBrowserClient::SelectClientCertificate(