needed workaround for self-signed certificates

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

needed workaround for self-signed certificates

Postby Abagian » Wed Feb 08, 2017 2:14 pm

Hi,

I have a self-signed https certificate at my local virtual server. When I use this red URL in a browser, it finally let me in after couple of questions.
But with CEF I could not overcome it. "--ignore-certificate-errors", settings.ignore_certificate_errors, browser_settings.web_security are useless in this case.

Is there any decision for this ?

Thanks
Abagian
Techie
 
Posts: 15
Joined: Wed Feb 08, 2017 1:55 pm

Re: needed workaround for self-signed certificates

Postby magreenblatt » Wed Feb 08, 2017 2:36 pm

Implement CefRequestHandler::OnCertificateError
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: needed workaround for self-signed certificates

Postby Abagian » Fri Feb 10, 2017 11:35 am

This works :

bool MyCefHandler::OnCertificateError(
CefRefPtr<CefBrowser> browser,
cef_errorcode_t cert_error,
const CefString& request_url,
CefRefPtr<CefSSLInfo> ssl_info,
CefRefPtr<CefRequestCallback> callback)
{
callback->Continue(true);
return true;
}

and

CefSettings settings;
settings.ignore_certificate_errors = false;
CefInitialize(main_args, settings, ...)
Abagian
Techie
 
Posts: 15
Joined: Wed Feb 08, 2017 1:55 pm

Re: needed workaround for self-signed certificates

Postby Czarek » Mon Feb 13, 2017 1:20 am

magreenblatt wrote:Implement CefRequestHandler::OnCertificateError


Why wouldn't ignore_certificate_errors work for self-signed certificates? Is this a bug that should be reported?

I have a custom patch to Chromium that enables cache on sites with certificate errors, this was mainly intended for self-signed certificates and is enabled only when ignore_certificate_errors option is set to true, so looks like this feature will break now.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: needed workaround for self-signed certificates

Postby magreenblatt » Mon Feb 13, 2017 11:11 am

Czarek wrote:
magreenblatt wrote:Implement CefRequestHandler::OnCertificateError


Why wouldn't ignore_certificate_errors work for self-signed certificates? Is this a bug that should be reported?

I have a custom patch to Chromium that enables cache on sites with certificate errors, this was mainly intended for self-signed certificates and is enabled only when ignore_certificate_errors option is set to true, so looks like this feature will break now.

--ignore-certificate-errors works for me in 2924 branch.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 32 guests