Rework Linux/Kerberos native interop layer (dotnet/corefx#38377)
authorDavid Shulman <david.shulman@microsoft.com>
Tue, 11 Jun 2019 02:06:08 +0000 (19:06 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2019 02:06:08 +0000 (19:06 -0700)
commite334603d8230873b91fde94210acaca19c710e72
tree5c238b4b11ed795d2e0fca38d4dfcffba1e5744c
parent624f160a33430dd49743f770e8a64f12eaeea844
Rework Linux/Kerberos native interop layer (dotnet/corefx#38377)

The latest changes to the System.Net.Security.Native shim layer fixed a lot of important
bugs for Linux Kerberos usage. But this created a new problem since SqlClient ships
in out-of-band NuGet packages separate from the .NET Core runtime. SqlClient builds
out of the CoreFx repo and uses the common source includes for Kerberos authentication.
This created an unexpected dependency on the System.Net.Security.Native shim layer.
The recent changes to these API signatures caused problems with different combinations
of SqlClient NuGet packages and .NET Core 2.x versus .NET Core 3.0.

After discussion with the SqlClient team, we decided to rework the changes to these
native APIs so that they would remain compatible across all .NET Core versions.

Long-term, the plan is to implement dotnet/corefx#36896 to expose a Kerberos API in .NET Core which
could be used by SqlClient and other consumers.

Closes dotnet/corefx#37183
Closes dotnet/corefx#25205

Commit migrated from https://github.com/dotnet/corefx/commit/7f920b2984a97ce8643bc8e64a93e7bd4d8a059e
src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs
src/libraries/Common/src/Microsoft/Win32/SafeHandles/GssSafeHandles.cs
src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs
src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteNegoContext.cs
src/libraries/Native/Unix/System.Net.Security.Native/pal_gssapi.c
src/libraries/Native/Unix/System.Net.Security.Native/pal_gssapi.h
src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.Unix.cs [deleted file]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.Windows.cs [deleted file]
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.cs