dotnet / SqlClient

Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.
MIT License
857 stars 286 forks source link

Removed CTAIP, certificate authentication #2831

Closed edwardneal closed 1 month ago

edwardneal commented 2 months ago

Picking up from a comment on #2828.

This removes anything guarded behind ADONET_CERT_AUTH and ADONET_ORIGINAL_CLIENT_ADDRESS symbols. It then cleans up the knock-on effects of this: an unused Certificate option in the connection string, the PInvokes and their now-unreferenced structs, a delegate type.

The PR touches quite a few files, but it's necessary to start approaching any merge of SqlConnection.

/cc @JRahnama

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.06%. Comparing base (d89372a) to head (f661aab). Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
...etfx/src/Microsoft/Data/SqlClient/SqlConnection.cs 87.50% 1 Missing :warning:
...nt/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2831 +/- ## ========================================== + Coverage 72.02% 72.06% +0.03% ========================================== Files 299 298 -1 Lines 61430 61268 -162 ========================================== - Hits 44246 44152 -94 + Misses 17184 17116 -68 ``` | [Flag](https://app.codecov.io/gh/dotnet/SqlClient/pull/2831/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [addons](https://app.codecov.io/gh/dotnet/SqlClient/pull/2831/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `92.90% <ø> (ø)` | | | [netcore](https://app.codecov.io/gh/dotnet/SqlClient/pull/2831/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `75.88% <100.00%> (-0.08%)` | :arrow_down: | | [netfx](https://app.codecov.io/gh/dotnet/SqlClient/pull/2831/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `70.33% <88.88%> (+0.12%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

saurabh500 commented 2 months ago

@edwardneal scratch what I said. I just had a hallway conversation with @David-Engel We should be OK to take this forward.

edwardneal commented 2 months ago

That's great, thanks @saurabh500. If that changes, I can split the PR so that we remove CTAIP support and the .NET Framework-specific SSL callbacks separately.