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

Switch from ssl.wrap_socket to SSLContext.wrap_socket #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jheunis-bloomberg
Copy link

The python docs specify that since python 3.2, it is recommended to use SSLContext.wrap_socket instead of ssl.wrap_socket ("since it is both inefficient and has no support for SNI and hostname matching").

In python3.12, ssl.wrap_socket was removed, which causes the 100-continue test to reliably fail whenever it's configured with is_secure=True. Switching to the recommended SSLContext.wrap_socket (using the default SSL context) fixes this, allowing the test to run cleanly again.

The python docs specify that since python 3.2, it is recommended to use
`SSLContext.wrap_socket` instead of `ssl.wrap_socket` ("since it is both
inefficient and has no support for SNI and hostname matching").

In python3.12, `ssl.wrap_socket` was removed, which causes the 100-continue
test to reliably fail whenever it's configured with `is_secure=True`.
Switching to the recommended `SSLContext.wrap_socket` (using the default
SSL context) fixes this, allowing the test to run cleanly again.

Signed-off-by: Jacques Heunis <[email protected]>
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