connectors/PYRO/PSK_Adapter.py
changeset 2325 71593d3f880b
parent 2318 8925d487605a
child 2492 7dd551ac2fa0
equal deleted inserted replaced
2324:1cf3768ebf85 2325:71593d3f880b
    27                 # This are the statements that differ from Pyro/protocol.py
    27                 # This are the statements that differ from Pyro/protocol.py
    28                 raw_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    28                 raw_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    29                 _connect_socket(raw_sock, URI.address, URI.port, self.timeout)
    29                 _connect_socket(raw_sock, URI.address, URI.port, self.timeout)
    30                 sock = sslpsk.wrap_socket(
    30                 sock = sslpsk.wrap_socket(
    31                     raw_sock, psk=Pyro.config.PYROPSK, server_side=False,
    31                     raw_sock, psk=Pyro.config.PYROPSK, server_side=False,
    32                     ciphers="PSK-AES256-GCM-SHA384:PSK-AES256-CBC-SHA",
    32                     ciphers="PSK-AES256-CBC-SHA", # available in openssl 1.0.2 
    33                     ssl_version=ssl.PROTOCOL_TLSv1)
    33                     ssl_version=ssl.PROTOCOL_TLSv1)
    34                 # all the rest is the same as in Pyro/protocol.py 
    34                 # all the rest is the same as in Pyro/protocol.py 
    35 
    35 
    36                 conn=TCPConnection(sock, sock.getpeername())
    36                 conn=TCPConnection(sock, sock.getpeername())
    37                 # receive the authentication challenge string, and use that to build the actual identification string.
    37                 # receive the authentication challenge string, and use that to build the actual identification string.