-
Notifications
You must be signed in to change notification settings - Fork 299
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
Fix down-level SSL/TLS version warnings #3126
Conversation
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/ConnectionTestParametersData.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny change requested - see in-file comments.
Thanks - I've made that correction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really appreciate that you added test cases for this! 🚢
@@ -79,9 +81,9 @@ public static TestTdsServer StartServerWithQueryEngine(QueryEngine engine, bool | |||
|
|||
public static TestTdsServer StartTestServer(bool enableFedAuth = false, bool enableLog = false, | |||
int connectionTimeout = DefaultConnectionTimeout, [CallerMemberName] string methodName = "", | |||
X509Certificate2 encryptionCertificate = null, TDSPreLoginTokenEncryptionType encryptionType = TDSPreLoginTokenEncryptionType.NotSupported) | |||
X509Certificate2 encryptionCertificate = null, SslProtocols encryptionProtocols = SslProtocols.Tls12, TDSPreLoginTokenEncryptionType encryptionType = TDSPreLoginTokenEncryptionType.NotSupported) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if the arguments have to go on multiple lines, it should be one argument per line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I definitely won't hold the review on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's the existing "style", so it gets a pass for a targeted change like this.
* Added test for downlevel connectivity warning * Correctly test bit flags for legacy SSL protocol warning * Corrected warning disablement/restore. (cherry picked from commit 198b906)
* Fix down-level SSL/TLS version warnings (#3126) * Added test for downlevel connectivity warning * Correctly test bit flags for legacy SSL protocol warning * Corrected warning disablement/restore. (cherry picked from commit 198b906) * Test by rolling back changes to connection test matrix --------- Co-authored-by: Edward Neal <[email protected]>
Contributes to #3120. I'll backport this to 6.0 if this is merged.
To verify this, I've expanded our test TDS server, adding support for using a named SSL protocol. It adds to the data for
CertificateTestWithTdsServer.BeginWindowsConnectionTest
andBeginLinuxConnectionTest
, including an end-to-end connection test to a TDS server which only supports TLS 1.0 & 1.1.