mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
bpo-34271: Fix compatibility with 1.0.2 (GH-13728)
Fix various compatibility issues with LibreSSL and OpenSSL 1.0.2 introduced by bpo-34271. Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
06651ee418
commit
e35d1ba9ea
4 changed files with 22 additions and 46 deletions
|
@ -658,12 +658,12 @@ class SSLContext(_SSLContext):
|
|||
def inner(conn, direction, version, content_type, msg_type, data):
|
||||
try:
|
||||
version = TLSVersion(version)
|
||||
except TypeError:
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
try:
|
||||
content_type = _TLSContentType(content_type)
|
||||
except TypeError:
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if content_type == _TLSContentType.HEADER:
|
||||
|
@ -674,7 +674,7 @@ class SSLContext(_SSLContext):
|
|||
msg_enum = _TLSMessageType
|
||||
try:
|
||||
msg_type = msg_enum(msg_type)
|
||||
except TypeError:
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
return callback(conn, direction, version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue