Gennady Krasnikov

Results 4 comments of Gennady Krasnikov

You can try SSLContext() API derivated from sspsk package, see https://github.com/drbild/sslpsk/issues/19 in some way like this: ``` context = SSLPSKContext(ssl.PROTOCOL_TLS) context.set_ciphers('PSK') context.psk = (b'1234', bytes("1234", encoding="utf-8")) client.tls_set_context(context) ``` It works...

Hello @pavel-ch , this is not a patch but steps how I use this. I change sslpsk just to let it work with python 3.8. Then I place the code...

No, I didn't check it with mosquitto server. But I saw handshake problems and this is the reason I added `context.set_ciphers('PSK')` and tried to work with the more recent Python...

This makes it possible to add PSK support to [paho-mqtt client](https://github.com/eclipse/paho.mqtt.python). A problem only appears with PSK ciphers, and `context.set_ciphers('PSK')` didn't help till I patched sslpsk a bit to work...