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

fix: use system CA certificates for requests #1367

Merged
merged 1 commit into from
Dec 25, 2021

Conversation

nevesnunes
Copy link
Contributor

On Fedora 34, I've built Zeal with Qt5.15.2 and OpenSSL-1.1.1l.

When trying to check for updates, the request fails with "SSL handshake error". I can also reproduce this issue in one of the Qt examples, which includes the more descriptive message "The issuer certificate of a locally looked up certificate could not be found".

The root cause seems to be the same as described in another issue: If I run strace on zeal, I confirm that it doesn't access my certificate bundle (/etc/pki/tls/certs/ca-bundle.crt), instead it tries to lookup c_rehash generated files that aren't present.

Regardless of which files are present, Zeal can be resilient to these cases and load the certificate bundle explicitly. My pull request accomplishes that by using QSslConfiguration's built-in method that provides those system certificates. This way, the peer certificate chain can be verified and no SSL handshake error is thrown.

@nevesnunes nevesnunes requested a review from trollixx as a code owner November 11, 2021 23:49
@trollixx trollixx closed this Dec 23, 2021
@trollixx trollixx reopened this Dec 23, 2021
@trollixx trollixx merged commit 7bd8598 into zealdocs:master Dec 25, 2021
@trollixx
Copy link
Member

Thanks! Somehow I missed this feature completely. This might be also a fix #1022.

@trollixx trollixx changed the title fix: Include system CA certificates in requests fix: use system CA certificates for requests Dec 25, 2021
ferronrsmith pushed a commit to ferronrsmith/zeal that referenced this pull request Mar 13, 2022
Co-authored-by: nevesnunes <maxnevesnunes+gh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants