@@ -723,6 +723,25 @@ def connect():
723723
724724 test_no += 1
725725
726+ print ("Test {0} - good mutual X.509, PHA and KeyUpdate, TLSv1.3" .format (test_no ))
727+ synchro .recv (1 )
728+ connection = connect ()
729+ settings = HandshakeSettings ()
730+ settings .minVersion = (3 , 4 )
731+ settings .maxVersion = (3 , 4 )
732+ connection .handshakeClientCert (x509Chain , x509Key , settings = settings )
733+ for result in connection .send_keyupdate_request (
734+ KeyUpdateMessageType .update_requested ):
735+ assert result in (0 , 1 )
736+ synchro .recv (1 )
737+ b = connection .read (0 , 0 )
738+ assert b == b''
739+ testConnClient (connection )
740+ assert (isinstance (connection .session .serverCertChain , X509CertChain ))
741+ connection .close ()
742+
743+ test_no += 1
744+
726745 print ("Test {0} - mutual X.509, PHA, no client cert, TLSv1.3" .format (test_no ))
727746 synchro .recv (1 )
728747 connection = connect ()
@@ -1995,6 +2014,27 @@ def connect():
19952014
19962015 test_no += 1
19972016
2017+ print ("Test {0} - good mutual X.509, PHA and KeyUpdate, TLSv1.3" .format (test_no ))
2018+ synchro .send (b'R' )
2019+ connection = connect ()
2020+ settings = HandshakeSettings ()
2021+ settings .minVersion = (3 , 4 )
2022+ settings .maxVersion = (3 , 4 )
2023+ connection .handshakeServer (certChain = x509Chain , privateKey = x509Key ,
2024+ settings = settings )
2025+ assert connection .session .clientCertChain is None
2026+ for result in connection .request_post_handshake_auth (settings ):
2027+ assert result in (0 , 1 )
2028+ synchro .send (b'R' )
2029+ assert connection .read (0 , 0 ) == b''
2030+ assert connection .session .clientCertChain is not None
2031+ assert isinstance (connection .session .clientCertChain , X509CertChain )
2032+ testConnServer (connection )
2033+
2034+ connection .close ()
2035+
2036+ test_no += 1
2037+
19982038 print ("Test {0} - mutual X.509, PHA, no client cert, TLSv1.3" .format (test_no ))
19992039 synchro .send (b'R' )
20002040 connection = connect ()
0 commit comments