-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
SSLV3_ALERT_HANDSHAKE_FAILURE in Python 3.5, works in Python 2.7 #4753
Comments
Hi @ghtyrant, It looks like there is some variance in your SSL setup between each python install. The 3.5 interpreter is unable to negotiate an acceptable protocol with the server. The fact that installing PyOpenSSL solves this suggests that there is something wrong with your 3.5 SSL setup. I unfortunately haven't been able to reproduce this locally between installations of 2.7.13 and 3.5.3 either. I believe there were some issues originally with OpenSSL 1.1 and Python not building together nicely due to API/struct changes. The only advice I can offer at the moment is to look at either reinstalling 3.5.3 against your system OpenSSL, or upgrading to 3.5.6. I'm not sure I see a clear link to a defect in Requests and the behaviour being observed. I'm going to close this for now but If you find further information, please feel free to reopen. Thanks! |
Came across this when having the same problem when installing OpenSSL 1.1.1b from packages.sury.org on Debian 9. This was the easiest way to get the latest version of nginx and TLS 1.3. However apparently it does not play very well with the default Python install (3.5.3) and was causing this error in the Django app. Installing pyOpenSSL fixes the problem. Guess we'll have to wait for Debian 10 to get TLS 1.3 and Python working together properly ;-) |
hey did you find a solution? |
This issue from ws4py websocket implementation of TLS SNI might be relevant. Seems you need to have an ssl.py that supports SNI and ALSO ssl.wrap_socket call is deprecated and needs to be updated to ssl.SSLSocket(self.sock, **self.ssl_options), with 'server_hostname' specified (as the full hostname) in the self.ssl_options dictionary, to get a good SNI-enabled handshake. |
I'm running the following code:
Using Python 3.5.3, I get the following errors:
Using Python 2.7.13 everything works as expected:
System Information
Python 3.5.3
requests.help
pip freeze
Python 2.7.13:
requests.help
pip freeze
Possible solution
Installing pyOpenSSL in the Python3 venv seems to fix this issue.
The text was updated successfully, but these errors were encountered: