@@ -102,6 +102,11 @@ PROTOCOL_TLSv1 = ... # type: int
102
102
if sys .version_info >= (3 , 4 ):
103
103
PROTOCOL_TLSv1_1 = ... # type: int
104
104
PROTOCOL_TLSv1_2 = ... # type: int
105
+ if sys .version_info >= (3 , 5 ):
106
+ PROTOCOL_TLS = ... # type: int
107
+ if sys .version_info >= (3 , 6 ):
108
+ PROTOCOL_TLS_CLIENT = ... # type: int
109
+ PROTOCOL_TLS_SERVER = ... # type: int
105
110
106
111
OP_ALL = ... # type: int
107
112
OP_NO_SSLv2 = ... # type: int
@@ -114,6 +119,8 @@ OP_CIPHER_SERVER_PREFERENCE = ... # type: int
114
119
OP_SINGLE_DH_USE = ... # type: int
115
120
OP_SINGLE_ECDH_USE = ... # type: int
116
121
OP_NO_COMPRESSION = ... # type: int
122
+ if sys .version_info >= (3 , 6 ):
123
+ OP_NO_TICKET = ... # type: int
117
124
118
125
if sys .version_info >= (3 , 5 ):
119
126
HAS_ALPN = ... # type: int
@@ -168,6 +175,10 @@ class SSLSocket(socket.socket):
168
175
context = ... # type: SSLContext
169
176
server_side = ... # type: bool
170
177
server_hostname = ... # type: Optional[str]
178
+ if sys .version_info >= (3 , 6 ):
179
+ session = ... # type: Optional[SSLSession]
180
+ session_reused = ... # type: Optional[bool]
181
+
171
182
def read (self , len : int = ...,
172
183
buffer : Optional [bytearray ] = ...) -> bytes : ...
173
184
def write (self , buf : bytes ) -> int : ...
@@ -237,6 +248,9 @@ if sys.version_info >= (3, 5):
237
248
context = ... # type: SSLContext
238
249
server_side = ... # type: bool
239
250
server_hostname = ... # type: Optional[str]
251
+ if sys .version_info >= (3 , 6 ):
252
+ session = ... # type: Optional[SSLSession]
253
+ session_reused = ... # type: bool
240
254
def read (self , len : int = ...,
241
255
buffer : Optional [bytearray ] = ...) -> bytes : ...
242
256
def write (self , buf : bytes ) -> int : ...
@@ -257,6 +271,14 @@ if sys.version_info >= (3, 5):
257
271
def write (self , buf : bytes ) -> int : ...
258
272
def write_eof (self ) -> None : ...
259
273
274
+ if sys .version_info >= (3 , 6 ):
275
+ class SSLSession :
276
+ id = ... # type: bytes
277
+ time = ... # type: int
278
+ timeout = ... # type: int
279
+ ticket_lifetime_hint = ... # type: int
280
+ has_ticket = ... # type: bool
281
+
260
282
261
283
# TODO below documented in cpython but not in docs.python.org
262
284
# taken from python 3.4
0 commit comments