bpo-36037: Fix test_ssl for strict OpenSSL policy#11940
Conversation
|
cc @stratakis |
|
Tested it on a RHEL8 system and I confirm this PR actually fixes the tests. |
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy. Use older TLS version for minimum TLS version of the server SSL context if needed, to test TLS version older than default minimum TLS version.
|
I used git push --force to elaborate the commit message and NEWS entry: mention that the fix changes the minimum version. |
|
Hmm, I'll let @tiran comment on this. I really haven't kept up with the ssl testing infrastructure, nor with the ssl module itself. |
|
Oh macOS on Azure faild with: pythoninfo: Ah, that's pre-OpenSSL 1.1.1. I fixed my PR. |
|
I tested manually the PR on Debian Buster:
|
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
GH-11942 is a backport of this pull request to the 3.7 branch. |
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy. Use older TLS version for minimum TLS version of the server SSL context if needed, to test TLS version older than default minimum TLS version. (cherry picked from commit 3ef6344) Co-authored-by: Victor Stinner <vstinner@redhat.com>
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy. Use older TLS version for minimum TLS version of the server SSL context if needed, to test TLS version older than default minimum TLS version. (cherry picked from commit 3ef6344) Co-authored-by: Victor Stinner <vstinner@redhat.com>
| if (min_version is not None | ||
| # SSLContext.minimum_version is only available on recent OpenSSL | ||
| # (setter added in OpenSSL 1.1.0, getter added in OpenSSL 1.1.1) | ||
| and hasattr(server_context, 'minimum_version') |
There was a problem hiding this comment.
style nit (not worth another PR, just leave it), I'd have indented these lines to match the column of min_version after your opening ( above.
There was a problem hiding this comment.
He he, I expected that someone would complain about that 😁 Feel free to change it if you want.
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict
crypto policy.
https://bugs.python.org/issue36037