Fix issues with SSL certificates#306
Open
wonder-sk wants to merge 1 commit into
Open
Conversation
Urllib's default handling of SSL certs is rather inconsistent: on linux/mac it should use some system openssl path (which on mac may not be present), and on windows it should use system certificate store. Our old macOS workaround was apparently preventing usage of system certificate store on windows as well, and using the old vendored cert.pem instead. The fix is to use SSL certificates from OS certificate store, using truststore python module. The truststore module requires python 3.10+ so we bump the minimum python dependency.
Coverage Report for CI Build 28545728839Coverage decreased (-0.1%) to 83.366%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions11 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
urllib's default handling of SSL certs is rather inconsistent: on linux/mac it should use some system openssl path (which on mac may not be present), and on windows it should use system certificate store.
Our old macOS workaround was apparently preventing usage of system certificate store on windows as well, and using the old vendored cert.pem instead. The fix is to use SSL certificates from OS certificate store, using truststore python module.
The truststore module requires python 3.10+ so we bump the minimum python dependency.
Python 3.10 was released in 2021, and all python version < 3.10 are now EOL-ed: https://python3.info/about/versions.html
In the QGIS plugin, I think we should be safe with at least QGIS >= 3.40 - the osgeo4w got python upgraded from 3.9 to 3.12 before QGIS 3.40 release.
Fixes #230
Fixes MerginMaps/qgis-plugin#820
Fixes MerginMaps/qgis-plugin#821
Fixes MerginMaps/qgis-plugin#149