The names are super misleading. First, they're written in a way that's the opposite of how people think about these things (CLIENT_AUTH -> server socket; SERVER_AUTH -> client socket). Second, they're misleading, you can have TLS which is *mutually* authenticated. Third, CLIENT_AUTH is very frequently used for a server socket where the client isn't authenticated (at the TLS layer) at all!
A simple fix would be to add: Purpose.{CLIENT,SERVER}_SOCKET and alias the old names to those values.
Activity
alex commented on Mar 14, 2017
The names are super misleading. First, they're written in a way that's the opposite of how people think about these things (CLIENT_AUTH -> server socket; SERVER_AUTH -> client socket). Second, they're misleading, you can have TLS which is *mutually* authenticated. Third, CLIENT_AUTH is very frequently used for a server socket where the client isn't authenticated (at the TLS layer) at all!
A simple fix would be to add: Purpose.{CLIENT,SERVER}_SOCKET and alias the old names to those values.
tiran commented on Mar 14, 2017
For 3.7 I'm planning to move to protocols instead of purpose oids (PROTOCOL_TLS_CLIENT, PROTOCOL_TLS_SERVER).
alex commented on Mar 14, 2017
Ah, so instead of PROTOCOL_SSLv23 using PROTOCOL_TLS_CLIENT and deprecating the Purpose bits entirely? That sounds good to me!
tiran commented on Mar 14, 2017
Yes, I'm planning a PEP to make the SSL module a bit more sane:
alex commented on Mar 14, 2017
Sounds good to me!
Fix use_ssl: True on Python 3.10 (#1493)