gh-94199: Remove the ssl.wrap_socket() function#94203
gh-94199: Remove the ssl.wrap_socket() function#94203vstinner merged 1 commit intopython:mainfrom vstinner:ssl_wrap_socket
Conversation
|
I'm not sure of the Python ecosystem is ready for this :-( A code search for
|
|
Any package] that still uses |
Remove the ssl.wrap_socket() function, deprecated in Python 3.7: instead, create a ssl.SSLContext object and call its sl.SSLContext.wrap_socket() method. Any package that still uses ssl.wrap_socket() is broken and insecure. The function neither sends a SNI TLS extension nor validates server hostname. Code is subject to CWE-295 : Improper Certificate Validation.
Oh wow, that sounds scary! I updated the documentation to mention that! But I omitted the last part: "and worth a CVE with at least medium severity". I prefer to not say that in the Python documentation. |
|
Merged. Thanks for the review @tiran. |
Remove the ssl.wrap_socket() function, deprecated in Python 3.7:
instead, create a ssl.SSLContext object and call its
SSLContext.wrap_socket() method.