mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
don't require OpenSSL SNI to pass hostname to ssl functions (#22921)
Patch by Donald Stufft.
This commit is contained in:
parent
378e15d7ab
commit
7243b574e5
16 changed files with 22 additions and 67 deletions
|
|
@ -538,12 +538,7 @@ class SSLSocket(socket):
|
|||
raise ValueError("server_hostname can only be specified "
|
||||
"in client mode")
|
||||
if self._context.check_hostname and not server_hostname:
|
||||
if HAS_SNI:
|
||||
raise ValueError("check_hostname requires server_hostname")
|
||||
else:
|
||||
raise ValueError("check_hostname requires server_hostname, "
|
||||
"but it's not supported by your OpenSSL "
|
||||
"library")
|
||||
raise ValueError("check_hostname requires server_hostname")
|
||||
self.server_side = server_side
|
||||
self.server_hostname = server_hostname
|
||||
self.do_handshake_on_connect = do_handshake_on_connect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue