@@ -3190,7 +3190,8 @@ def test_wrong_cert_tls13(self):
3190
3190
)
3191
3191
with server , \
3192
3192
client_context .wrap_socket (socket .socket (),
3193
- server_hostname = hostname ) as s :
3193
+ server_hostname = hostname ,
3194
+ suppress_ragged_eofs = False ) as s :
3194
3195
# TLS 1.3 perform client cert exchange after handshake
3195
3196
s .connect ((HOST , server .port ))
3196
3197
try :
@@ -3207,13 +3208,7 @@ def test_wrong_cert_tls13(self):
3207
3208
if support .verbose :
3208
3209
sys .stdout .write ("\n socket.error is %r\n " % e )
3209
3210
else :
3210
- if sys .platform == "win32" :
3211
- self .skipTest (
3212
- "Ignoring failed test_wrong_cert_tls13 test case. "
3213
- "The test is flaky on Windows, see bpo-43921."
3214
- )
3215
- else :
3216
- self .fail ("Use of invalid cert should have failed!" )
3211
+ self .fail ("Use of invalid cert should have failed!" )
3217
3212
3218
3213
def test_rude_shutdown (self ):
3219
3214
"""A brutal shutdown of an SSL server should raise an OSError
@@ -4450,7 +4445,8 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
4450
4445
server = ThreadedEchoServer (context = server_context , chatty = True )
4451
4446
with server :
4452
4447
with client_context .wrap_socket (socket .socket (),
4453
- server_hostname = hostname ) as s :
4448
+ server_hostname = hostname ,
4449
+ suppress_ragged_eofs = False ) as s :
4454
4450
s .connect ((HOST , server .port ))
4455
4451
s .write (b'PHA' )
4456
4452
# test sometimes fails with EOF error. Test passes as long as
@@ -4461,17 +4457,13 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
4461
4457
):
4462
4458
# receive CertificateRequest
4463
4459
data = s .recv (1024 )
4464
- if not data :
4465
- raise ssl .SSLError (1 , "EOF occurred" )
4466
4460
self .assertEqual (data , b'OK\n ' )
4467
4461
4468
4462
# send empty Certificate + Finish
4469
4463
s .write (b'HASCERT' )
4470
4464
4471
4465
# receive alert
4472
- data = s .recv (1024 )
4473
- if not data :
4474
- raise ssl .SSLError (1 , "EOF occurred" )
4466
+ s .recv (1024 )
4475
4467
4476
4468
def test_pha_optional (self ):
4477
4469
if support .verbose :
0 commit comments