Fix CefRequestHandler::OnCertificateError callback trigger (issue #2019)
This commit is contained in:
parent
4fdfc02858
commit
8b2618a72a
|
@ -199,7 +199,7 @@ class CefAllowCertificateErrorCallbackImpl : public CefRequestCallback {
|
||||||
static void RunNow(const CallbackType& callback, bool allow) {
|
static void RunNow(const CallbackType& callback, bool allow) {
|
||||||
CEF_REQUIRE_UIT();
|
CEF_REQUIRE_UIT();
|
||||||
callback.Run(allow ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
|
callback.Run(allow ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
|
||||||
content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
|
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
CallbackType callback_;
|
CallbackType callback_;
|
||||||
|
@ -750,11 +750,10 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||||
bool proceed = handler->OnCertificateError(
|
bool proceed = handler->OnCertificateError(
|
||||||
browser.get(), static_cast<cef_errorcode_t>(cert_error),
|
browser.get(), static_cast<cef_errorcode_t>(cert_error),
|
||||||
request_url.spec(), cef_ssl_info, callbackImpl.get());
|
request_url.spec(), cef_ssl_info, callbackImpl.get());
|
||||||
if (!proceed)
|
if (!proceed) {
|
||||||
callbackImpl->Disconnect();
|
callbackImpl->Disconnect();
|
||||||
|
callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
|
||||||
callback.Run(proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE :
|
}
|
||||||
content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefContentBrowserClient::SelectClientCertificate(
|
void CefContentBrowserClient::SelectClientCertificate(
|
||||||
|
|
Loading…
Reference in New Issue