drbild / sslpsk

Adds TLS-PSK support to the Python ssl package
Apache License 2.0
24 stars 32 forks source link

example client is not connecting to the server. #25

Open StensonSimon opened 2 years ago

StensonSimon commented 2 years ago

Hi, i am new to this and needs help in connecting to the server. When i try to connect to the example_server from example_client, it gives the below message. Can someone help? image

gitbock commented 1 year ago

same error here :( AttributeError: '_ssl._SSLSocket' object has no attribute '_sslobj'

Python 3.10.6
sslpsk 1.0.0
tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcp_socket.connect((dm_args.zabbix_server, 10051))
psk_sock = sslpsk.wrap_socket(tcp_socket,
                          ssl_version=ssl.PROTOCOL_TLSv1_2,
                          ciphers="PSK-AES128-CBC-SHA",
                          psk=(dm_args.psk, dm_args.psk_id) )

Edit: After applying this patch manually, it works fine! See also this thread.