sslpsk icon indicating copy to clipboard operation
sslpsk copied to clipboard

Add support for Python 3.7

Open drbild opened this issue 5 years ago • 2 comments

Fixes #11

drbild avatar Mar 22 '19 19:03 drbild

In the meantime, this monkey-patch has gotten around the issue with using SSLPSK with Python 3.8+:

import sys
import sslpsk

# Monkey patch for SSLPSK
def _sslobj(sock):
    if (3, 5) <= sys.version_info <= (3, 7):
        return sock._sslobj._sslobj
    else:
        return sock._sslobj
sslpsk.sslpsk._sslobj = _sslobj

rlaunch avatar Feb 10 '21 13:02 rlaunch

In the meantime, this monkey-patch has gotten around the issue with using SSLPSK with Python 3.8+:

Thanks for this code snippet, it saved me a bunch of time!

It would be great if (pending inclusion of sslpsk in the stdlib -- grin) this would be released so sslpsk can be used out of the box again on Python 3.7 / 3.8 / .. -- hopeful smile :)

rutgerhendriks avatar Mar 09 '21 09:03 rutgerhendriks