sslpsk icon indicating copy to clipboard operation
sslpsk copied to clipboard

Refactor/ssl context

Open doronz88 opened this issue 2 years ago • 4 comments

doronz88 avatar Nov 26 '23 16:11 doronz88

LGTM. With this, tuya-convert works on Python 3.13. Without it, it does not.

AdamWill avatar Feb 22 '25 19:02 AdamWill

I don't think this package is going to be maintained and also python 3.13 has this feature builtin so it's no longer necessary.

If anyone is interested, I forked this repo into my own sslpsk-pmd3 quite a long time ago

doronz88 avatar Feb 22 '25 20:02 doronz88

It's not strictly necessary, but tuya-convert is written to use this, and with sslpsk patched with this PR, tuya-convert works as-is. To use the new Python built-in PSK support, tuya-convert would need a patch.

Also, ssl.wrap_socket was dropped in 3.12, but only 3.13 added the built-in PSK stuff, so anyone who's on exactly Python 3.12 really needs this.

I'll send a PR for tuya-convert to use your fork for now, I guess. Not sure if I want to figure out how to rejig tuya-convert to work with the built-in PSK stuff. Thanks.

AdamWill avatar Feb 22 '25 23:02 AdamWill

There is an updated version called sslpsk3 v2.0.0, which I just released with support for SSLContext and wrap_socket. Both methods work on Python 3.7-3.13+, additionally it transparently uses the built-in methods that are available on 3.13 and newer. The new library is a drop-in replacement.

kuba2k2 avatar Sep 02 '25 14:09 kuba2k2