Enable TLS channel binding token for NTLM authentication on Linux (dotnet/corefx...
authorDavid Shulman <david.shulman@microsoft.com>
Fri, 1 Feb 2019 01:31:03 +0000 (17:31 -0800)
committerGitHub <noreply@github.com>
Fri, 1 Feb 2019 01:31:03 +0000 (17:31 -0800)
commit0e2f262013a29021a2d966cf4cc5de0e9494938f
tree64f82ffe30fce4acd28894bc130b089709e8b832
parentd6e31afb2d8e8b5fe9fefd9b0bc3c3c673c3861e
Enable TLS channel binding token for NTLM authentication on Linux (dotnet/corefx#34998)

This PR adds support for passing in the computed TLS channel binding
token (cbt) into the gssapi during NTLM authentication. This included
removing the code that threw the PlatformNotSupported exception.

No new tests were added to this PR since it requires machine changes
to test. However, I manually tested various combinations of NTLM
authentication including when the server requires (or NOT) the cbt
to be used. Currently only Windows Servers uses this functionality
as part of the "Extended Protection for Authentication" feature.

CurlHandler does not support using the cbt during NTLM authentication.
This is a problem with libcurl itself.

As part of this PR I removed a redundant assert and refactored the
SecChannelBindings structure into src/Common.

Fixes dotnet/corefx#34879

Commit migrated from https://github.com/dotnet/corefx/commit/6575de65608c95717b2a032b689adae32378778f
14 files changed:
src/libraries/Common/src/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.cs
src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs
src/libraries/Common/src/System/Net/Security/Unix/SecChannelBindings.cs [new file with mode: 0644]
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/Resources/Strings.resx
src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj
src/libraries/System.Net.Http/src/Resources/Strings.resx
src/libraries/System.Net.Http/src/System.Net.Http.csproj
src/libraries/System.Net.Mail/src/Resources/Strings.resx
src/libraries/System.Net.Mail/src/System.Net.Mail.csproj
src/libraries/System.Net.Security/src/Resources/Strings.resx
src/libraries/System.Net.Security/src/System.Net.Security.csproj
src/libraries/System.Net.Security/src/System/Net/Security/Pal.Managed/SafeChannelBindingHandle.cs