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

Handle custom trusted CA certificates in our access manager #9642

Merged
merged 4 commits into from
May 6, 2022

Conversation

fmoc
Copy link
Contributor

@fmoc fmoc commented May 5, 2022

Preparation for an upcoming PR that implements a TLS error dialog in the wizard.

This PR extends the existing AccessManager subclass of QNetworkAccessManager with TLS certificates management. Unfortunately, the default Qt class does not support this.

This PR replaces all the hacks that altered the global state in order to make requests to servers using (previously untrusted) certificates work.

Fabian Müller added 2 commits May 5, 2022 23:44
Gives us access to its features (for instance, it sets the correct user agent).
Needed to be able to access planned TLS certificate handling related methods.
@fmoc fmoc added this to the 2.11 milestone May 5, 2022
@fmoc fmoc requested a review from a team May 5, 2022 21:56
src/libsync/accessmanager.cpp Outdated Show resolved Hide resolved
src/libsync/accessmanager.cpp Outdated Show resolved Hide resolved
@fmoc fmoc force-pushed the work/tls-handling-nam branch from ad15fda to ae62570 Compare May 6, 2022 08:23
Fabian Müller added 2 commits May 6, 2022 10:51
This eliminates the need for hacks like changing the global state (e.g., by changing the default QSslConfiguration or using the deprecated QSslSocket methods).
@fmoc fmoc force-pushed the work/tls-handling-nam branch from ae62570 to c6130cd Compare May 6, 2022 08:51
@TheOneRing
Copy link
Contributor

Looks great, lets find out how it will blow up.

@TheOneRing TheOneRing merged commit 6a03490 into master May 6, 2022
@delete-merged-branch delete-merged-branch bot deleted the work/tls-handling-nam branch May 6, 2022 08:53
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants