-
Notifications
You must be signed in to change notification settings - Fork 29
fix: use the correct SSL config if cert verification is disabled #187
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
Conversation
Signed-off-by: Norbert Biczo <[email protected]>
Signed-off-by: Norbert Biczo <[email protected]>
0c0e0c0
to
7fa94d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I have a couple of questions/comments:
- Perhaps we should add a negative test that shows that an exception occurs (bad certificate) if SSL verification is NOT disabled.
- Perhaps it would be good to document how you created the certificate and key files used during the test. Maybe the test_no_ssl_verification.py file would be a good place for this?
Signed-off-by: Norbert Biczo <[email protected]>
Signed-off-by: Norbert Biczo <[email protected]>
Signed-off-by: Norbert Biczo <[email protected]>
Signed-off-by: Norbert Biczo <[email protected]>
Signed-off-by: Norbert Biczo <[email protected]>
a8330c2
to
af12ac3
Compare
Signed-off-by: Norbert Biczo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Norbert Biczo <[email protected]>
## [3.19.1](v3.19.0...v3.19.1) (2024-01-24) ### Bug Fixes * use the correct SSL config if cert verification is disabled ([#187](#187)) ([7fc172a](7fc172a))
🎉 This PR is included in version 3.19.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
It turned out, disabling the SSL certificate verification didn't work as expected.
We passed the right arguments to the
requests
package, but since we usea custom SSL context, it couldn't turn off the verification entirely, because the
default SSL context has the
check_hostname
set toTrue
and the documentationsays the following: "
verify_mode
is now automatically changed toCERT_REQUIRED
when hostname checking is enabled and
verify_mode
isCERT_NONE
."This commit adds an addition step which disables the hostname checking in our
custom SSL context.
Ref: #186