Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL error(s) on What's New web page load #21518

Closed
qgib opened this issue Sep 30, 2015 · 3 comments
Closed

SSL error(s) on What's New web page load #21518

qgib opened this issue Sep 30, 2015 · 3 comments
Labels
Authentication Related to the QGIS Authentication subsystem or user/password handling Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Sep 30, 2015

Author Name: Larry Shaffer (Larry Shaffer)
Original Redmine Issue: 13471
Affected QGIS version: master
Redmine category:authentication_system
Assignee: Larry Shaffer


For some reason, the Qt application trusted Certificate Authorities are not being loaded into the @QgsWebPage@ upon requests, resulting in:

https://www.google.com/jsapi
Unable To Get Local Issuer Certificate...
Certificate Untrusted...

Started happening after the proxy support, i.e. using @QgsNetworkAccessManager@, was added to the new welcome page.

Setting the SSL cert exception is a workaround, but should not be needed. It appears that no trusted Certificate Authorities are being added to the @QgsWebView@ requests. This is very odd, especially because if you inspect the certificate chain and trusted certs from within the SSL error dialog everything is there. I even tried adding the specific cert authorities to QGIS's new cert manager, with no luck.

Next I tried commenting out the @QNetworkRequest@ hack in @QgsNetworkAccessManager@ for HTTPS requests, but that had no effect either.

It seems that the @QWebPage@ requests are maybe in a different thread and the SSL errors, as handled by the @QgisApp@, are just a response to a signal, but not being honored in the calling thread. Still it doesn't explain why the CAs are not being passed to the @QgsWebView@ to begin with.


@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2015

Author Name: Anónimo (Anónimo)


Fixed in changeset "95c377a607757b4cc9d03a6e399b5516d0b44dcd".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2015

Author Name: Larry Shaffer (Larry Shaffer)


While the web page exhibiting the issue has been removed from master, the issue still stands: https://www.google.com/jsapi does not have its certificate chain validated properly.

Initially, I thought it was related to the new authentication system (and spent a bunch of effort trying to find how it affected SSL cert chain validation), but it is not related to the new auth system at all. I wrote a small PyQt4 script (attached cert-authority-test.py) to test both @QNetworkAccessManager@ and @QWebPage@ outside of QGIS's custom implementation of both.

Try:

You can play around with the script a bit:

  • Uncomment @wv.page().setNetworkAccessManager(nam)@ line to test setting an outside manager. Same result as internal manager: SSL errors for 'https://www.google.com/jsapi'.
  • Comment out all lines that start with 'wv' and uncomment the @nam.sslErrors ...@ block. Shows same result if calling @get()@ on @QNetworkAccessManager@: SSL errors for 'https://www.google.com/jsapi'.

Essentially, Qt4 certificate chain validation has an issue with this particular chain. I tried doing all the chain validation through QCA and ended up with the same errors. If I were to guess, both Qt4 and QCA have issues validating an SSL cert chain which contains a cert with an "Elliptic Curve Public Key":https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/ which https://www.google.com uses.

Could be that Qt5 has this issue fixed (untested).


  • 9140 was configured as cert-authority-test.py

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2015

Author Name: Matthias Kuhn (@m-kuhn)


No error for me on Fedora / QGIS 2.10.1 libs.

I also did not get this error on app startup with current master. Basically SSL certificate verification seems to work perfectly fine.

Adding @url = 'https://tv.eurosport.com/'@ shows an SSL error, I used this to check that checks are actually performed.

Qt version: 4.8.6

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Authentication Related to the QGIS Authentication subsystem or user/password handling labels May 25, 2019
@qgib qgib added this to the Version 2.12 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authentication Related to the QGIS Authentication subsystem or user/password handling Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority
Projects
None yet
Development

No branches or pull requests

1 participant