Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCSocket: connect Error: module 'ssl' has no attribute 'wrap_socket' #49

Open
zibous opened this issue Jun 13, 2024 · 0 comments
Open

Comments

@zibous
Copy link

zibous commented Jun 13, 2024

Hi,

Using Python python3.12 get:

connect Error: module 'ssl' has no attribute 'wrap_socket'

def reconnect(self):
        print(now(), "CON:", self.uri)
        self.reset()
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        if not self.http:
            sock = sslpsk.wrap_socket(
                sock,
                ssl_version=ssl.PROTOCOL_TLSv1_2,
                ciphers="ECDHE-PSK-CHACHA20-POLY1305",
                psk=self.psk,
            )
        self.ws = websocket.WebSocket()
        self.ws.connect(
            self.uri,
            socket=sock,
            origin="",
        )

Is there any way to solve this ?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant