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

AttributeError: module 'ssl' has no attribute 'wrap_socket' #1153

Open
kidexx opened this issue Jan 4, 2025 · 3 comments
Open

AttributeError: module 'ssl' has no attribute 'wrap_socket' #1153

kidexx opened this issue Jan 4, 2025 · 3 comments

Comments

@kidexx
Copy link

kidexx commented Jan 4, 2025

I have the following issue:
In the log smarthack-psk.log I get

module 'ssl' has no attribute 'wrap_socket'
new client on port 443 from 10.42.42.33:60310
module 'ssl' has no attribute 'wrap_socket'
new client on port 443 from 10.42.42.33:60312
module 'ssl' has no attribute 'wrap_socket'
new client on port 443 from 10.42.42.33:60324
module 'ssl' has no attribute 'wrap_socket'

This seems to be related to a change in python:
eventlet/eventlet#795

It is in the file psk-frontend.

The old code:

ssl_sock = sslpsk.wrap_socket(s1,
server_side = True,
ssl_version=ssl.PROTOCOL_TLSv1_2,
ciphers='PSK-AES128-CBC-SHA256',
psk=lambda identity: gen_psk(identity, self.hint),
hint=self.hint)

But I don't know how to change it to the new format.

@haschler
Copy link

+1

@haschler
Copy link

Just update the file inside the sslpsk library:
https://github.com/drbild/sslpsk/blob/e16c8662cf84942636f0e1eab264a6b0434c07b6/sslpsk/sslpsk.py

@kidexx
Copy link
Author

kidexx commented Jan 19, 2025

Thank you.

I exchanged the file in /usr/local/lib/python3.12/dist-packages/sslpsk/ - but I still get an error:

new client on port 443 from 10.42.42.33:49674 wrap_socket() got an unexpected keyword argument 'ssl_context' new client on port 443 from 10.42.42.33:49676 wrap_socket() got an unexpected keyword argument 'ssl_context'

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

2 participants