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

Crash due to removal of ssl.wrap_socket #22

Open
flinti opened this issue Apr 28, 2024 · 1 comment
Open

Crash due to removal of ssl.wrap_socket #22

flinti opened this issue Apr 28, 2024 · 1 comment

Comments

@flinti
Copy link

flinti commented Apr 28, 2024

ssl.wrap_socket is deprecated since Python 3.7 and has recently been removed in Python 3.12.

On Python 3.12, nxBender therefore fails with:

Traceback (most recent call last):
  File "/usr/local/bin/nxBender", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/__init__.py", line 69, in main
    sess.run()
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/nx.py", line 103, in run
    self.tunnel()
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/nx.py", line 216, in tunnel
    pppd.run()
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/ppp.py", line 51, in run
    self.tunsock = sslconn.SSLTunnel(self.session_id, self.options, self.options.server, self.options.port)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/sslconn.py", line 38, in __init__
    super(SSLTunnel, self).__init__(*args, **kwargs)
  File "/opt/nxBender/lib/python3.12/site-packages/nxbender/sslconn.py", line 17, in __init__
    self.s = ssl.wrap_socket(sock)
             ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'

@flinti
Copy link
Author

flinti commented Apr 28, 2024

I created a PR to fix this: #23

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