Skip to content

Commit

Permalink
enforce TLS<1.3 for SSL renegotiation tests
Browse files Browse the repository at this point in the history
* fixes #248
  • Loading branch information
fantix authored and 1st1 committed May 7, 2019
1 parent 6e24e88 commit cbbac15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_tcp.py
Expand Up @@ -2203,6 +2203,8 @@ def test_renegotiation(self):
sslctx.use_privatekey_file(self.ONLYKEY)
sslctx.use_certificate_chain_file(self.ONLYCERT)
client_sslctx = self._create_client_ssl_context()
if hasattr(ssl, 'OP_NO_TLSv1_3'):
client_sslctx.options |= ssl.OP_NO_TLSv1_3

def server(sock):
conn = openssl_ssl.Connection(sslctx, sock)
Expand Down Expand Up @@ -2560,6 +2562,8 @@ def test_flush_before_shutdown(self):
sslctx_openssl.use_privatekey_file(self.ONLYKEY)
sslctx_openssl.use_certificate_chain_file(self.ONLYCERT)
client_sslctx = self._create_client_ssl_context()
if hasattr(ssl, 'OP_NO_TLSv1_3'):
client_sslctx.options |= ssl.OP_NO_TLSv1_3

future = None

Expand Down

0 comments on commit cbbac15

Please sign in to comment.