-
Notifications
You must be signed in to change notification settings - Fork 102
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
SSL Error on 11 ('xxx', 4098): [SSL] internal error (_ssl.c:1108) #181
Comments
@mzealey having exact issue on same platform. Sorry for newb question, was trying to do a quick flash, but how would I change to v1_2? thanks in advance |
@jemccullough Look for PROTOCOL_TLSv1_1 in sonota.py, change it to PROTOCOL_TLSv1_2. |
Hmm. I've got the same issue. Ubuntu 20.04, SSL internal error. I changed sonota.py to PROTOCOL_TLSv1_2. Definitely got further, but now it hangs with this: OSError: [Errno 0] Error Looks like still an SSL related issue. Help? -- |
While researching this myself before finding this ticket, I found this oddity from my Sonoff TXUS switch:
Note the conflicting TLS versions provided in the Client Hello packet:
The default code in SonOTA hardcodes the TLS version to v1.1. This is why switching it to v1.2 works. Though, I'm not sure what's up with the outermost v1.0. After changing the TLS version to v1.2, I get this error on the SonOTA console:
Ciphers offered by my Sonoff TXUS when connecting to the server on my laptop, as decoded by wireshark:
Ciphers accepted by Tornado, by way of Python's SSL Context:
Indeed, no common ciphers. Documentation for ssl.SSLContext includes the following note:
You can add back one of the older ciphers if you build an SSL Context manually and pass it to the HTTPServer constructor instead of a dict of parameters: Line 664:
This gets SonOTA to at least respond to the Client Hello with a Server Hello, listing TLS_RSA_WITH_AES_256_CBC_SHA256 as the chosen cipher. But then the Sonoff TXUS immediately closes the socket with a FIN ACK, with no indication of what it's unhappy about. Unfortunately, the only other meaningful thing that's included in the Server Hello is the TLS certificate, which strongly suggests it's the TLS cert it's unhappy with. If its actually checking the server TLS cert, then there's very little we can do to spoof that, without having the matching private key. |
The TLS 1.1 flag is not working for me and causes errors like
Changing to v1_2 fixes this issue - perhaps modern ubuntu's ssl doesnt have tls 1.1 support or python 3.8 removed this support?
The text was updated successfully, but these errors were encountered: