-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
SslStream.HashAlgorithm does not seems to work with Tls12 and above #37578
Comments
Tagging subscribers to this area: @dotnet/ncl |
Triage: Not critical for 5.0. @wfurt plans to do a write up and follow up with crypto to decide what to do here. |
This seems to be by design. The cc: @bartonjs |
Classically, the return value here is dictated by whatever SChannel reports, then just making the OpenSSL/macOS PALs try to report the same thing for the same ciphersuites. |
That does not quite match the windows. I did test run and I get:
interestingly, hash strength is 0, and we don't seems to map properly the KeyExchange algorithm. |
Note that this might be by design, see my comment here: |
It is interesting that it does not match Windows behavior as @bartonjs expected. |
I believe Windows answer is wrong in that case (assuming by HashAlgorithm we mean MAC and that's what docs describe). For reporting issue I'd reccomend to change Windows to use https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteData.Lookup.cs instead of answer returned by SChannel which returns hash used for HKDF And then to improve reporting I'd recommend to do one of the following:
|
As krwq said, For consistency, we might want to use the |
Triage: should be consolidated with the effort on other HashAlgorithmType and other enums. Potential idea?: Mark everything except TlsCipherSuite obsolete since the cipher suite contains all necessary information, or improve documentation to manage user expectations. |
Since #100361, the plan is to obsolete the enum, closing as won't do. |
Description
I used examples from https://docs.microsoft.com/en-us/dotnet/api/system.net.security.sslstream.hashalgorithm?view=net-5.0
When I force Tls11 I see TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA negotiated and output of:
when I use default, Tls12 or Tls13 I get TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and :
Configuration
Tested with current 5.0 version on Linux with OpenSsl 1.1.1 and macOS 10.15 Catalina.
Other information
We seems to have no unit test to cover
HashAlgorithm
.The text was updated successfully, but these errors were encountered: