Skip to content

Merge | Remove OS-specific TdsParser files #3469

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

edwardneal
Copy link
Contributor

Description

This picks up where #3434 left off. The earlier PR handled the simple case of merging OS-specific functionality (which was actually just different between the native and managed SNIs.) This one expands the principle, moving PostReadAsyncForMars and WaitForSSLHandShakeToComplete from TdsParser to TdsParserStateObject's child classes. This removes TdsParser.Unix.cs and TdsParser.Windows.cs.

This has also involved modifying the call site for the method within TdsParser to reference TdsParserStateObject. This is particularly noticeable in EnableSsl.

Finally, while it's not a new gap, this process has highlighted that the existing functionality of warning when down-level SSL is in use only functions on Windows. I've maintained this gap and made it a little more explicit.

Issues

Contributes to #1261 and #2953.

Testing

Testing with SSL- and MARS-enabled connection strings works, I'd appreciate a CI run.

This was lingering from earlier work to change the SSPI abstractions
The managed SNI doesn't use this, so will always return SNI_SUCCESS_IO_PENDING.
The handling of this method is unusual. Only Windows actually waits for the SSL handshake.
Also mop up the unused SNIErrorDetails structure
This exposes a behavioural difference in TdsParser between Unix and Windows: downlevel TLS warnings only appear on Windows.
@edwardneal edwardneal requested a review from a team as a code owner July 9, 2025 22:58
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.

1 participant