Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Aug 11, 2019
1 parent 444f4cd commit 8643f60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tornado/test/iostream_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,9 +973,10 @@ def connect_to_server(self, server_cls):
server = server_cls(ssl_options=_server_ssl_options())
server.add_socket(sock)

client = SSLIOStream(
socket.socket(), ssl_options=dict(cert_reqs=ssl.CERT_NONE)
)
ssl_ctx = ssl.SSLContext(ssl.PROTOCOL_TLS)
ssl_ctx.verify_mode = ssl.CERT_NONE
ssl_ctx.options |= getattr(ssl, "OP_NO_TLSv1_3", 0)
client = SSLIOStream(socket.socket(), ssl_options=ssl_ctx)
yield client.connect(("127.0.0.1", port))
self.assertIsNotNone(client.socket.cipher())
finally:
Expand Down

0 comments on commit 8643f60

Please sign in to comment.