-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Reopen #44191: SSL/TLS handshake fails in Ubuntu 20.04 and Net 5.0.1 #46271
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I don't know how to set the area label, but, obviously, this is a job for @dotnet/ncl |
An observation, openssl in Ubuntu 20.04 is compiled with Adding this to the top of
and this to the bottom of it:
I suspect this is related to the site not supported any forward secrecy cipher suites. I'm not recommending this change one way or another, but it appears to play a part of the issue at hand. |
I already had tried this, with no change. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsA client connection created with HttpWebRequest or HttpClient fails with SSL handshake error. With default openssl.cnf file, we are able to connect a site with Sample program: Works fine in Mac and in a container docker, but fails in Ubuntu 20.04
Expected output:
Current output (exception)
Configuration
Regression?Yes, this is a regression. This work fine with Net Core 3.1 Other informationOPENSSL test
CURL output
|
I have had this issue and commented back then on #44191. But still not resolution, we had to revert back to .NET Core 3.1, we tried everything but with no luck. |
Yes. I have updated the issue report, with more information about the tests I have already done. Please, could you add yours too? |
I did what @vcjones suggested on fresh Ubuntu20.04 installation and it works as expected (failing with defaults):
From the SSL scan, the site allows only weak ciphers and that is not allowed by default with .NET 5 (documented as breaking change) I added configuration with default ubuntu20 + change suggested by @vcsjones I also look again at the config you posted in #44191 @ClimberBear and it is not right e.g. OpenSSL is sensitive to ordering and that is reason why it did not work for you. Here is updated configuration with your original changes. I suspect @ChrisIsidora has same issue e.g. the ordering is not right but it is hard to tell without details. (e.g. actual config and possibly URL) Aside from modifying system configuration, it should be also possible to use CipherSuitesPolicy to enforce weak ciphers. |
REALLY THANK YOU!! It worked for me too! I have still a couple of doubts. When you say openssl is order sensitive, do you mean the order of the cipherstrings in cipherstring attribute, or you mean that CipherString and Ciphersuites has to be below [tls_defaults] section? Thanks, thanks again! |
@wfurt I'm also curious as to what ordering you are referring to. Furthermore I did try the CipherSuitesPolicy back then without any luck. |
In the sample @ClimberBear posted in #44191, [openssl_init], [ssl_config] and [tls_defaults] sections are at beginning of the config. All I really did was moving them to the end. There, may be some place in the middle but I know the end works. If exact same lines are in wrong location, the configuration is ignored silently. (and that is reason why I try to guide people to verify changes with Wireshark to see that the config change actually changed the handshake) On the same note, the
I think the suggestion @vcsjones posted is simples to follow. It is possible that your server needs different ciphers @ChrisIsidora but I think it is important to verify that your configuration changes are parsed properly. Let me know if that make sense. |
Thanks again, @wfurt The manual is really hard to find and hard to understand. I'll try to do after season holidays Merry Christmas! (if apply) |
A client connection created with HttpWebRequest or HttpClient fails with SSL handshake error.
With default openssl.cnf file, we are able to connect a site with
curl
oropenssl s_client
, but a sample console program fails.Sample program: Works fine in Mac and in a container docker, but fails in Ubuntu 20.04
Expected output:
Current output (exception)
Configuration
Regression?
Yes, this is a regression. This work fine with Net Core 3.1
Other information
OPENSSL test
CURL output
Here is my code for testing with ALL cipherstrings implemented in Net5 (without using openssl.cnf)
The text was updated successfully, but these errors were encountered: