Skip to content
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

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Conversation

edwardneal
Copy link
Contributor

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 and BeginLinuxConnectionTest, including an end-to-end connection test to a TDS server which only supports TLS 1.0 & 1.1.

@edwardneal edwardneal changed the title Issue 3120 Fix down-level SSL/TLS version warnings Jan 17, 2025
@cheenamalhotra cheenamalhotra requested a review from a team January 21, 2025 17:15
Copy link

@paulmedynski paulmedynski left a 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.

@edwardneal
Copy link
Contributor Author

Thanks - I've made that correction.

Copy link
Contributor

@benrr101 benrr101 left a 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)
Copy link
Contributor

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.

Copy link
Contributor

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.

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.

@benrr101 benrr101 merged commit 198b906 into dotnet:main Jan 21, 2025
1 check passed
benrr101 pushed a commit that referenced this pull request Jan 21, 2025
* Added test for downlevel connectivity warning

* Correctly test bit flags for legacy SSL protocol warning

* Corrected warning disablement/restore.

(cherry picked from commit 198b906)
benrr101 added a commit that referenced this pull request Jan 22, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants