Title: if check_hostname is true, context can't be used for server purposes
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4, Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
Priority: normal Keywords:

Created on 2014-03-22 11:35 by pitrou, last changed 2014-03-22 17:25 by pitrou.

Messages (2)
msg214462 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-03-22 11:35
On a SSLContext with check_hostname = True, calling wrap_socket(..., server_side=True) will complain that no server hostname has been passed. This should only be done for client sockets.
msg214492 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-03-22 17:25
(of course, it may be better to have separate contexts for client and server use, but it can also be convenient to use a single context - especially when doing tests :-))
Date User Action Args
2014-03-22 17:25:12pitrousetmessages: + msg214492
2014-03-22 17:23:52pitrousetnosy: + dstufft
2014-03-22 11:35:11pitroucreate