CEF webpage fails loading - Certificate Verification error

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.

CEF webpage fails loading - Certificate Verification error

Postby ysaliens » Fri Feb 16, 2018 5:29 pm

I'm getting the following error while trying to load an intranet page and the latest CEF:

Code: Select all
[0216/053928.350342:ERROR:cert_verify_proc_nss.cc(922)] CERT_PKIXVerifyCert for 192.168.0.41 failed err=-8179


This is on an up-to-date OpenSUSE 42.3 Linux. The error code translates to 8179 = SEC_ERROR_UNKNOWN_ISSUER, effectively the OS doesn't trust the CA certificate.
The machine has up-to-date mozilla-nss, mozila-nss-certs, ca-certificates-mozilla packages (as well as a few more nss packages).

I found a similar problem (https://bugs.chromium.org/p/chromium/is ... ?id=164172) where the result was a missing libnssckbi.so library.
I have verified this library exists on my machine in /usr/lib64/ and the libraries it references are also there. I've also tried replacing the library with other versions but that has not worked.

The latest Mozilla Firefox is able to load the same web page on the same machine.
Do you have any suggestions for what else I can look at?
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby magreenblatt » Fri Feb 16, 2018 5:33 pm

Does it load in Google Chrome at the same version?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby ysaliens » Mon Feb 19, 2018 4:30 pm

Just tested with the latest stable version of Chrome. Page loaded OK however...before it loaded it gave me a "Certificate not Trusted" page and I had to click proceed anyway before it loaded the page.

On CEF I never get such a page, only a white blank screen with the log showing

Code: Select all
[0219/082532.714321:ERROR:cert_verify_proc_nss.cc(912)] CERT_PKIXVerifyCert for 192.168.0.41 failed err=-8179
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby ysaliens » Mon Feb 19, 2018 4:33 pm

To clarify, I tested both Chrome and CEF on the same machine hence same packages installed.
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby magreenblatt » Mon Feb 19, 2018 4:35 pm

Have you implemented CefRequestHandler::OnCertificateError?
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby ysaliens » Tue Feb 20, 2018 12:20 pm

No didn't know I needed it. Looking through cefclient for the implementation there and will port it. Thanks!
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby ysaliens » Tue Feb 20, 2018 1:10 pm

If I make cefclient load a page with an untrusted certificate I get the expected certificate error but no prompt/button to actually ignore the error and load the page.
I tried returning true from OnCertificateError but that just makes it load a blank page.

What is the proper way to ignore certificate errors or better yet disable certificates entirely (My application will only be used on a trusted intranet with 1 site)?
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby magreenblatt » Tue Feb 20, 2018 1:22 pm

Read the documentation for OnCertificateError. It will tell you what you need to do.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: CEF webpage fails loading - Certificate Verification err

Postby ysaliens » Tue Feb 20, 2018 1:22 pm

Figured it out:

--disable-web-security
--ignore-certificate-errors

All I need, no new code needed. Thank you again for the quick responses!
ysaliens
Techie
 
Posts: 20
Joined: Mon Oct 02, 2017 1:08 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 41 guests