Skip to content

Commit fc18d1a

Browse files
author
ioeides
committed
setting ssl context to TLSv1.2 and context's cypher to AES256-GCM-SHA384
1 parent d2cb2ae commit fc18d1a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎OMMClient/OMMClient.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def __init__(self, host, port=12622):
4545
self._port = port
4646
self._tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
4747
self._tcp_socket.settimeout(10)
48-
self._ssl_context = ssl.create_default_context()
48+
self._ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLSv1_2)
49+
self._ssl_context.set_ciphers("AES256-GCM-SHA384")
4950
self._ssl_socket = self._ssl_context.wrap_socket(self._tcp_socket, server_hostname=self._host)
5051
self._send_q = queue.Queue() # should contains strings (not bytes)
5152
self._recv_q = queue.Queue() # should contains strings (not bytes)

0 commit comments

Comments
 (0)