drbild / sslpsk

Adds TLS-PSK support to the Python ssl package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example client is not connecting to the server.

StensonSimon opened this issue · comments

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

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.