Fix PYROPSK protocol configuration. After a few iteration of trial and error it appears that TSLv1 and PSK ciphers needs to be specified
authorEdouard Tisserant
Fri, 19 Oct 2018 13:29:52 +0200
changeset 2316 5416c76df9e2
parent 2314 e927c101ce6d
child 2317 b7330f3461dd
Fix PYROPSK protocol configuration. After a few iteration of trial and error it appears that TSLv1 and PSK ciphers needs to be specified
connectors/PYRO/PSK_Adapter.py
--- a/connectors/PYRO/PSK_Adapter.py	Thu Oct 18 13:17:48 2018 +0200
+++ b/connectors/PYRO/PSK_Adapter.py	Fri Oct 19 13:29:52 2018 +0200
@@ -28,7 +28,8 @@
                 _connect_socket(raw_sock, URI.address, URI.port, self.timeout)
                 sock = sslpsk.wrap_socket(
                     raw_sock, psk=Pyro.config.PYROPSK, server_side=False,
-                    ciphers="PSK-AES256-GCM-SHA384:PSK-AES256-CBC-SHA")
+                    ciphers="PSK-AES256-GCM-SHA384:PSK-AES256-CBC-SHA",
+                    ssl_version=ssl.PROTOCOL_TLSv1)
                 # all the rest is the same as in Pyro/protocol.py 
 
                 conn=TCPConnection(sock, sock.getpeername())