This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ssl.wrap_socket doesn't take server_hostname as a kwarg
Type: enhancement Stage:
Components: Versions: Python 3.4
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, vinay.sajip
Priority: normal Keywords:

Created on 2013-02-05 15:14 by vinay.sajip, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg181442 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-02-05 15:14
The wrap_socket function in ssl.py (unlike the method of the same name in SSLContext) doesn't accept a server_hostname argument, despite the fact that it's a one-liner calling SSLSocket, which does take that argument. It it like this for a reason, or just an oversight?

Unless there is some reason not to do so, I think a server_hostname kwarg should be added to the wrap_socket function.
msg181453 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-02-05 16:22
The reason is that wrap_socket() is there only for compatibility reasons, and I'd like people to switch to SSLContext instead. 12-argument functions are only good for LISPers ;-)

As for SSLSocket, its constructor isn't a public API.
History
Date User Action Args
2022-04-11 14:57:41adminsetgithub: 61335
2013-02-05 16:22:27pitrousetstatus: open -> closed
resolution: wont fix
messages: + msg181453
2013-02-05 15:14:25vinay.sajipcreate