Exemple #1
0
        private int on_certificate_error(cef_request_handler_t *self, cef_browser_t *browser, CefErrorCode cert_error, cef_string_t *request_url, cef_sslinfo_t *ssl_info, cef_request_callback_t *callback)
        {
            CheckSelf(self);

            var m_browser     = CefBrowser.FromNative(browser);
            var m_request_url = cef_string_t.ToString(request_url);
            var m_ssl_info    = CefSslInfo.FromNative(ssl_info);
            var m_callback    = CefRequestCallback.FromNativeOrNull(callback);

            var result = OnCertificateError(m_browser, cert_error, m_request_url, m_ssl_info, m_callback);

            return(result ? 1 : 0);
        }
Exemple #2
0
 /// <summary>
 /// Called on the UI thread to handle requests for URLs with an invalid
 /// SSL certificate. Return true and call CefRequestCallback::Continue() either
 /// in this method or at a later time to continue or cancel the request. Return
 /// false to cancel the request immediately. If
 /// CefSettings.ignore_certificate_errors is set all invalid certificates will
 /// be accepted without calling this method.
 /// </summary>
 protected virtual bool OnCertificateError(CefBrowser browser, CefErrorCode certError, string requestUrl, CefSslInfo sslInfo, CefRequestCallback callback)
 {
     return(false);
 }