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