Commit Graph
1886 Commits
Author SHA1 Message Date
David Shulman 0e2f262013 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
2019-01-31 17:31:03 -08:00
Caesar Chen d6e31afb2d Diable System.Net.Http.FunctionalTests parallel execution on UAP run (dotnet/corefx#35004)
* diable parallel execution

* fix format....

* address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/5543097d8b6039dedffdcd8b8e713de38e5a1ece
2019-01-31 15:55:40 -08:00
Max Kerr b06f237191 Improve handling of HTTP/2 frames received on closed stream (dotnet/corefx#34629)
* Basic support for GoAway frames.

* Review feedback.

* Remove go-away frame handling, add testing to ensure that the loopback server closes the connection instead.

* Remove comma.

* Change error code to reflect the actual failure mode.

* Correct swapped error codes.


Commit migrated from https://github.com/dotnet/corefx/commit/47f6404357832466585f06d5c9ee07ed2f7a27a4
2019-01-30 13:40:28 -08:00
David Shulman 7dc14e490b Fix GSSAPI error handling (dotnet/corefx#34883)
This PR addresses 3 issues in GSSAPI error handling:

* Fixes an uninitialized variable when calling gss_display_status().
This was causing the major statuscode error message to always return
'An invalid status code was supplied'.

* If the minor statuscode is 0 (GSS_S_COMPLETE), we shouldn't be calling
for the minor statuscode error message text. That is why we were always getting
'Unknown error' for that text.

* Added more text (help text) to certain errors returned from GSSAPI
such as when the NTLM plugin is not installed.

No new tests were added to this PR since it requires machine changes
to test. However, I manually tested various combinations of errors
including when 'gss-ntlmssp' is installed or not.

In terms of dotnet/corefx#34877, the exception message goes from:

>GSSAPI operation failed with error - An invalid status code was supplied (Unknown error).

to

>GSSAPI operation failed with error - An unsupported mechanism was requested. NTLM authentication requires the GSSAPI plugin 'gss-ntlmssp'.

Fixes dotnet/corefx#34877

Commit migrated from https://github.com/dotnet/corefx/commit/eec001d96a68376c0e504eb7635c8edec196f90f
2019-01-27 15:41:53 -08:00
Tomas Weinfurt b1ca45db6d fixes for ARM32 (dotnet/corefx#34559)
* arm fixes

* use PassingTestTimeoutMilliseconds instead of hardcoded number


Commit migrated from https://github.com/dotnet/corefx/commit/4eccf3ff4e87831de660e6a23b3ba24d55f7bca1
2019-01-18 10:47:52 -05:00
Stephen Toub 0e2df777ad Avoid unnecessary Span to ReadOnlySpan casts (dotnet/corefx#34646)
In a bunch of places we're creating a Span only to then cast it (generally implicitly) to a ReadOnlySpan.  While the JIT is generally able to do the RightThing(tm), we can avoid the unnecessary IL and pressure on the JIT by just creating a ReadOnlySpan to begin with.

Commit migrated from https://github.com/dotnet/corefx/commit/ab925533fade636748f5d932546e1ce2fe33c1dd
2019-01-17 15:13:56 -05:00
Stephen Toub c8b215bc39 Merge pull request dotnet/corefx#34451 from stephentoub/teststringconcat
Expose/test/use string.Concat(ReadOnlySpan, ...)

Commit migrated from https://github.com/dotnet/corefx/commit/34078a7d3259c6b2d929949babde3a24f9a03e84
2019-01-15 19:55:30 -05:00
Caesar Chen 81f8344e17 Fix CVE-2019-0545: .NET Core Information Disclosure Vulnerability (.NET Core 3.0) (dotnet/corefx#34507)
* fix 100-continue issues

* address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/04b237b2f91ae4b4bb709fa60b51fa6ad7f4bc97
2019-01-11 14:34:02 -08:00
Stephen Toub a125ec174f Use string.Concat(ReadOnlySpan, ...) in a few places across corefx
Commit migrated from https://github.com/dotnet/corefx/commit/3f63fe48c9663c1c607a02fe3c78197181d8e74b
2019-01-10 09:19:01 -05:00
Geoff Kizer 1329b56e06 fix UWP test
Commit migrated from https://github.com/dotnet/corefx/commit/3fb6dd4a0298f61a1a896a0d29e117d8ee95af0f
2019-01-09 12:49:33 -08:00
Geoff Kizer d33615e499 rename HttpClientTestBase to HttpClientHandlerTestBase
Commit migrated from https://github.com/dotnet/corefx/commit/b26e2a66e5c41c3263caf5fdaa8a1811dd360e33
2019-01-09 02:44:04 -08:00
Geoff Kizer 834b812e22 remove handler dependency in HttpClientTest
Commit migrated from https://github.com/dotnet/corefx/commit/93719a61bb57729d940a8f20d7884e06dd935af7
2019-01-09 02:32:23 -08:00
Stephen Toub 8fd85a520b Set ILLinkClearInitLocals across repo
Enable it for all C# src projects.


Commit migrated from https://github.com/dotnet/corefx/commit/4b5b5c163b925400b884dac2bf207d189b69bd3b
2019-01-08 09:49:57 -05:00
Stephen Toub 2111435352 Remove some unnecessary Substrings in System.Net.Http (dotnet/corefx#34356)
Commit migrated from https://github.com/dotnet/corefx/commit/bcd20ce6fa0c7580ac4976cb50747687d07d96b2
2019-01-05 13:45:29 -05:00
Geoff Kizer b5bea157d6 Merge pull request dotnet/corefx#34347 from geoffkizer/decomptests
consolidate decompression tests

Commit migrated from https://github.com/dotnet/corefx/commit/814775ca14faff98602ad2d33f8f443e1e7dce24
2019-01-04 14:40:30 -08:00
Liudmila Molkova 2ce99327c2 Do not add Request-Id header when its added already (dotnet/corefx#34321)
Commit migrated from https://github.com/dotnet/corefx/commit/fe6e895de1fe78c5e677895a1dcf1f6339561153
2019-01-04 09:00:07 -05:00
Geoff Kizer 6386c5af53 consolidate decompression tests
Commit migrated from https://github.com/dotnet/corefx/commit/474b87aeaa9c0ddfe411d3a5d473a20c35f28622
2019-01-03 17:33:45 -08:00
Geoff Kizer 66c9cd06da split redirect tests into separate file
Commit migrated from https://github.com/dotnet/corefx/commit/33aa830e7975d6fdf50143348cb78f2924d673de
2019-01-01 16:00:52 -08:00
Geoff Kizer fedc25a537 disable flaky test SchSendAuxRecordHttpTest
Commit migrated from https://github.com/dotnet/corefx/commit/d08226feeb0af0ff41c8d41b36ba8f6bb97c1785
2018-12-31 15:30:36 -08:00
Stanislav Ushakov ac76a68271 Removed global suppression of CS1573 and CS1591 warnings (dotnet/corefx#34232)
* Removed global suppression of CS1573 and CS1591, moved suppression to the project level.

* Fixes for netfx build, added 2 projects


Commit migrated from https://github.com/dotnet/corefx/commit/adb4d48fe65d48b6dd1c2ff15c8a60e5f96bf266
2018-12-24 12:17:29 -05:00
Max Kerr a3c1c57a27 Improve handling of disallowed HTTP/2 frames (dotnet/corefx#34188)
Additional tests and minor error handling changes.


Commit migrated from https://github.com/dotnet/corefx/commit/d5c4c725c2ee768c93be94a90342f88ef3a584d4
2018-12-21 10:02:46 -08:00
Geoff Kizer 293f6fd8a5 Merge pull request dotnet/corefx#34131 from geoffkizer/http2-initialwindowsize
HTTP2: Respect SETTINGS_INITIAL_WINDOW_SIZE and rework SendAsync code structure

Commit migrated from https://github.com/dotnet/corefx/commit/5b126fd26d9719720503da342c53db98378f9507
2018-12-18 23:54:01 -08:00
Geoff Kizer fb3edd1440 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/d5d1abf80078610389b956db3d4f42a5fdc11f0d
2018-12-18 18:45:17 -08:00
Geoff Kizer cea5d77c90 fix typo
Commit migrated from https://github.com/dotnet/corefx/commit/23b717a60f48e90ccc8b51d9fba2aab37e05cd76
2018-12-18 15:41:00 -08:00
Geoff Kizer 3c234c01fc implement SETTINGS_MAX_CONCURRENT_STREAMS handling
Commit migrated from https://github.com/dotnet/corefx/commit/06f67c0ed6240b1f886334aeb4c1a34fc29582a9
2018-12-17 16:03:26 -08:00
Geoff Kizer 3b7e8854b4 respect SETTINGS_INITIAL_WINDOW_SIZE and rework SendAsync code structure
Commit migrated from https://github.com/dotnet/corefx/commit/04fb2722d89a65ce92d8caa90e1e39a0ab4c3d5f
2018-12-17 13:42:31 -08:00
Stanislav Ushakov 232de53a7c Fixed suppressed XML documentation errors (dotnet/corefx#34020)
* Fixed XML documentation tags for CoreFx.Private.TestUtilities

* Fixed XML documentation tags for System.Diagnostics.Process

* Fixed XML documentation tags for System.ComponentModel.Composition

* Fixed XML documentation tags for System.ComponentModel.Primitives

* Fixed XML documentation tags for System.ComponentModel.TypeConverter

* Fixed XML documentation tags for System.Data.Common

* Fixed XML documentation tags for System.Data.SqlClient

* Fixed XML documentation tags for System.Diagnostics.PerformanceCounter

* Fixed XML documentation tags for System.Diagnostics.StackTrace

* Fixed XML documentation for System.Diagnostics.TraceSource

* Fixed XML documentation for System.IO.Compression.ZipFile

* Fixed XML documentation for System.IO.Compression

* Fixed XMl documentation reference according to review notes

* Fixed XML documentation tags for System.IO.MemoryMappedFiles

* Fixed XML documentation tags for System.IO.Pipes

* Fixed XML documentation tag for OSX interop in System.Diagnostics.Process

* Fixed XML documentation tags for CoreFx.Private.TestUtilities for Unix

* Fixed XML documentation tags for System.Linq.Expressions

* Fixed XML documentation for System.Linq.Parallel

* Fixed XML documentationt ags for System.Linq

* Fixed XML documentation tags for System.Management

* Fixed XMl documentation tags for System.Net.Http (left CS1573)

* Fixed XMl documentation tags for System.Net.Mail

* Fixed XML documentation tags for System.Net.NameResolution

* Fixed XML documentation tags for System.Net.Primitives - added T prefix for Socket as Primitives do not reference System.Net.Sockets

* Fixed XML documentation tags for System.Net.Sockets

* Fixed XML documentation tags for Unix interop files

* Fixed XML documentation tags for System.Net.Http (Unix)

* Fixed XML documentation tags for PlatformDetection.Unix.cs according to review notes

* Fixed XML documentation tags for OSX interop

* Ignore CS1574 for System.Linq as there is no ConcatIterator{TSource}.ToList for uap.

* Fixed XML documentation tags for FreeBSD interop

* Fixed XML documentation tags for System.Net.WebSockets

* Fixed XMLm documentation tags for System.Transactions.Local

* Fixed XML documentation for System.Security.Principal.Windows

* Fixed XML documentation for System.Drawing.Common

* Fixed XML documentation for System.Net.NetworkInformation

* Fixed XML documentation tags for System.Private.XML (left CS1589)

* Fixed XML documentation tags for System.Security.Cryptography

* Fixed XML documentation for System.Runtime.WindowsRuntime

* Fixed XML documentation tags for System.Security.Cryptography.Xml

* Fixed XML documentation tags for System.Security.Cryptography.Primitives
CS3016 was added by mistake as part of dotnet/corefx#32934 so I removed it.

* Fixed XML documentation tags for System.Linq: added M to ToList method as it is not accessible by uap builds.

* Fixed XML documentation tags for System.IO.FileSystem

* Fixed XML documentation tags for System.Security.Cryptography.*

* Fixed XML documentation for System.IO.Ports

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335

* Fixed XML documentation tags for System.Windows.Extensions

* Fixed XMl documentation tags for System.Console

* Fixed XML documentation for System.IO.FileSystem.DriveInfo

* Fixed XML documentation tags for System.Runtime.Extensions

* Fixed XML documentation tags for System.Drawing.Primitives.
Left CS1589 as there is no 'doc\KnownColor.uex' file.

* Fixed XMl documentation for System.Runtime.WindowsRuntime.
Had to add M prefix to 'Windows.Foundation.IAsyncAction' as Windows.Foundation is not accessible at compilation time.

* Fixed XML documentation tags for System.Private.Xml

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
Had to add a prefixes to: 'T:System.Collections.Immutable' and 'M:Enumerable.ToArray{TSource}' as they are not available for uap at compilation time.

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* XML documentation tags fixes: changes after review.


Commit migrated from https://github.com/dotnet/corefx/commit/f7539b726c4bc2385b7f49e5751c1cff2f2c7368
2018-12-17 09:15:22 -08:00
Geoff Kizer 2d8dabc6b0 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/671409a8a845f69b5120cab24e44ca60d87355dc
2018-12-15 12:32:48 -08:00
Geoff Kizer 09bf3552bf improve SETTINGS handling and other small changes
Commit migrated from https://github.com/dotnet/corefx/commit/c260486e788ef057909ff4dde813522a5816d2b1
2018-12-13 16:38:08 -08:00
Geoff Kizer 08cdb19715 add missing ConfigureAwait
Commit migrated from https://github.com/dotnet/corefx/commit/cb19e0dc38aa3b02fa8a4b145c908370aa41f53f
2018-12-13 13:12:50 -08:00
Geoff Kizer 3fb8ce8bf0 implement outbound flow control
Commit migrated from https://github.com/dotnet/corefx/commit/a43253650f18a75383707a3a62fe761332317c85
2018-12-12 18:47:49 -08:00
Geoff Kizer 47b90c25e3 Merge pull request dotnet/corefx#34016 from geoffkizer/http2responsewindow
HTTP2: Implement inbound flow control support

Commit migrated from https://github.com/dotnet/corefx/commit/95406c508940bbb42d7de2eb6b19b88cef15cb1e
2018-12-12 12:25:07 -08:00
Geoff Kizer b20a149118 Merge pull request dotnet/corefx#33990 from geoffkizer/http2headerrework
HTTP2: rework SendHeader logic

Commit migrated from https://github.com/dotnet/corefx/commit/b0d8cc9375199b49c333e0565e3d8305e580cec9
2018-12-12 00:52:48 -08:00
Geoff Kizer 7098bd93e7 don't send Uri fragment
Commit migrated from https://github.com/dotnet/corefx/commit/cd6daee1988a516902dd6dd379fac401e078300c
2018-12-11 18:59:38 -08:00
Geoff Kizer a73cb2343d add inbound window update support
Commit migrated from https://github.com/dotnet/corefx/commit/fea9123a7b50b0e26214298d0adf8c8941d8f100
2018-12-11 18:23:47 -08:00
Geoff Kizer d2e4a12922 address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/9f1851990fd425eea10a07eaa89383933d7d10b9
2018-12-11 18:10:41 -08:00
Geoff Kizer 815bf9fc33 improve test filter for bogus VPN IPv6 link local addresses
Commit migrated from https://github.com/dotnet/corefx/commit/62d2de45550b12acbc048dfabb21251067fb5b03
2018-12-11 14:41:01 -08:00
Geoff Kizer ae588bad2b address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/3e6512efaac99ff3717fc7087355fb1d3a0f852f
2018-12-11 14:25:36 -08:00
Geoff Kizer 5f72c56930 rework SendHeader logic
Commit migrated from https://github.com/dotnet/corefx/commit/e579c0c538d1902e8552015bd974bc398f73cb5f
2018-12-11 13:10:33 -08:00
Geoff Kizer 7daa91aad2 Merge pull request dotnet/corefx#33952 from geoffkizer/http2outbound2
HTTP2: Rework send logic and support request body send

Commit migrated from https://github.com/dotnet/corefx/commit/c30f2bc75066aeccd610f36c8ce84ae5aaff675a
2018-12-11 13:05:35 -08:00
Geoff Kizer 04e05229d3 rework async send handling to avoid "async void"
Commit migrated from https://github.com/dotnet/corefx/commit/7e71cdd8fb956beeb4c8bf004eaff1278d7c06bf
2018-12-10 13:55:48 -08:00
Geoff Kizer bedf3bfb82 add private modifier to nested Stream implementations
Commit migrated from https://github.com/dotnet/corefx/commit/0228f948de1a581a27451c19098d01a3b3a9f539
2018-12-10 11:40:10 -08:00
Geoff Kizer 25cd4ea624 remove test calls to EnsureHttp2Feature that are no longer necessary
Commit migrated from https://github.com/dotnet/corefx/commit/79481df38ed168758f4ac6e6fcd4cc5f9cb5611d
2018-12-10 10:31:38 -08:00
Geoff Kizer 8effa76278 add missing EnsureAvailableSpace
Commit migrated from https://github.com/dotnet/corefx/commit/c8add2d184cdde7eb0a55954ae7a23c78289e7c8
2018-12-10 10:29:13 -08:00
Geoff Kizer cfa3fa2365 support request bodies and rework overall send logic
Commit migrated from https://github.com/dotnet/corefx/commit/dba358046535ee05a3a6c23a76c93877819c3bfe
2018-12-10 04:32:14 -08:00
AraHaan f108845249 Turn on xml documentation validation globally. (dotnet/corefx#32934)
* Turn on xml documentation validation globally.

* Ignore warning 1591 globally.

* Fixed build failures.

* Move the Original DocumentationFile Condition to the Group.

Now NoWarn has no Condition on it.

* Fixed NoWarn overwrite.

* Update Directory.Build.props

* Update System.Runtime.CompilerServices.Unsafe.ilproj

* Update file on github web.

Sadly it seems I can only do this on my phone now. RIP

* Update System.Security.Cryptography.Csp.csproj

* Update Directory.Build.props

* Suppress some warnings.

* Fixed remaining compile errors.

* Update System.Diagnostics.StackTrace.csproj

* Update System.Security.Cryptography.Xml.csproj

* Fixed xml documentation typo in Microsoft.VisualBasic.

* Fixed missing suppressions.

* Suppress more errors.

* Suppress more errors.

* Suppress more errors.

* Suppress even more errors.

* Suppress more errors.

* Update Directory.Build.props

* Suppress more errors.

Also fix a documentation issue specific to OSX.

* Suppress more errors.

* Suppress more errors.

* Disable xml documentation for System.Diagnostics.Process.

* Do not overwrite NoWarn.

* Enable docs for S.D.P


Commit migrated from https://github.com/dotnet/corefx/commit/6abb4cd0bafa2a3c7486fb23bcc611bd211d0f8e
2018-12-08 22:21:50 -08:00
Viktor Hofer 66e8f64d31 Consume Microsoft.DotNet.CoreFxTesting package (dotnet/corefx#33423)
* Consume Microsoft.DotNet.CoreFxTesting package

* Remove code coverage dedicated runtime dir config files and switch to Coverlet

* Add global tool support in corefx

* Update code coverage docs

Commit migrated from https://github.com/dotnet/corefx/commit/ae38b7cc3762d832fdcebe27a0aab7b22ab2f3fa
2018-12-06 02:56:11 +01:00
Stephen Toub 2c8e9b5e94 Fix remaining XML comment errors for source.dot.net (dotnet/corefx#33819)
This is hopefully the last batch of XML comment issues causing failures in source.dot.net.

Commit migrated from https://github.com/dotnet/corefx/commit/42c107ce4dcee545c8cdb510be0b60afdb9527ba
2018-12-04 14:30:39 -05:00
Jeremy Barton cefe07725e Add initial support for TLS 1.3 to .NET Core
* TLS 1.3 connections have been tested on Ubuntu 18.10 (OpenSSL 1.1.1).
* There's no public version of Windows with TLS 1.3 enabled.
* There's no public version of macOS with TLS 1.3 enabled out of the box.

When making use of SslProtocols.None (system default) TLS 1.3 is already working on Ubuntu 18.10, this change mainly makes it so that EncryptionPolicy.None is better handled, and that we can restrict-to and report TLS 1.3.

Commit migrated from https://github.com/dotnet/corefx/commit/d30157d9e48cf73e267994e45953722d18ccd4c6
2018-11-12 17:49:05 -08:00
David Shulman 1742d13f56 Fix SPN used for Negotiate authentication (dotnet/corefx#33426)
SocketsHttpHandler was not normalizing the DNS name prior to using it for the SPN
(Service Principal Name). So, when using URI's that involve a CNAME, it was using
the CNAME directly and not evaluating it to the normalized FQDN A record of the host.

This change fixes the behavior to match .NET Framework so that CNAMEs are resolved
properly. We can use the standard Dns.GetHostEntryAsync() API to resolve the name.

From a performance perspective, this additional DNS API call is limited to just
the SPN calculation for NT Auth. Calling this API doesn't impact the performance on the
wire since the OS will cache DNS calls.  Wireshark confirms that no additional DNS
protocol packets will be sent.

.NET Framework actually caches the normalized DNS resolution on the ServicePoint object
when it opens up a connections. Thus, it doesn't have to call Dns.GetHostEntryAsync()
for the SPN calculation. While a future PR could further optimize SocketsHttpHandler to
also cache this DNS host name, it isn't clear it would result in measurable performance gain.

I tested this change in a separate Enterprise testing environment I set up. I created
a CNAME for a Windows IIS server in a Windows domain-joined environment and demonstrated that
the Negotiate protocol results in a Kerberos authentication (and doesn't fall back to NTLM).

Fixes dotnet/corefx#32328 


Commit migrated from https://github.com/dotnet/corefx/commit/684114f26dbc23341b5ae5f8626fb748ac6cec2b
2018-11-12 14:47:16 -08:00