File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2345,9 +2345,12 @@ def run(self):
2345
2345
self .close ()
2346
2346
self .running = False
2347
2347
except OSError as err :
2348
- if 'peer did not return a certificate' in err .args [1 ] and self . server . chatty :
2348
+ if 'peer did not return a certificate' in err .args [1 ]:
2349
2349
# test_pha_required_nocert causes this error which results in a false(?) failure
2350
- sys .stdout .write (err .args [1 ])
2350
+ if self .server .chatty and support .verbose :
2351
+ sys .stdout .write (err .args [1 ])
2352
+ # test_pha_required_nocert is expecting this exception
2353
+ raise ssl .SSLError ('tlsv13 alert certificate required' )
2351
2354
else :
2352
2355
if self .server .chatty :
2353
2356
handle_error ("Test server failure:\n " )
@@ -4286,7 +4289,7 @@ def test_pha_required_nocert(self):
4286
4289
server_context .verify_mode = ssl .CERT_REQUIRED
4287
4290
client_context .post_handshake_auth = True
4288
4291
4289
- server = ThreadedEchoServer (context = server_context , chatty = True )
4292
+ server = ThreadedEchoServer (context = server_context , chatty = False )
4290
4293
with server :
4291
4294
with client_context .wrap_socket (socket .socket (),
4292
4295
server_hostname = hostname ) as s :
You can’t perform that action at this time.
0 commit comments