mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add TLSVersion & related attributes to SSLContext (#3097)
This commit is contained in:
committed by
Sebastian Rittau
parent
3272307933
commit
47450629c9
@@ -211,6 +211,17 @@ class SSLSocket(socket.socket):
|
||||
def pending(self) -> int: ...
|
||||
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
class TLSVersion(enum.IntEnum):
|
||||
MINIMUM_SUPPORTED = ...
|
||||
MAXIMUM_SUPPORTED = ...
|
||||
SSLv3 = ...
|
||||
TLSv1 = ...
|
||||
TLSv1_1 = ...
|
||||
TLSv1_2 = ...
|
||||
TLSv1_3 = ...
|
||||
|
||||
|
||||
class SSLContext:
|
||||
if sys.version_info < (3,) or sys.version_info >= (3, 4):
|
||||
check_hostname: bool
|
||||
@@ -257,6 +268,9 @@ class SSLContext:
|
||||
server_side: bool = ...,
|
||||
server_hostname: Optional[str] = ...) -> SSLObject: ...
|
||||
def session_stats(self) -> Dict[str, int]: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
maximum_version: TLSVersion
|
||||
minimum_version: TLSVersion
|
||||
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
|
||||
Reference in New Issue
Block a user