* increase FailingTestTimeoutMiliseconds
* use standard ITestOutputHelper helper
* set timeout to to 500ms
* rework protocol mismatch
Co-authored-by: Tomas Weinfurt <[email protected]>
* initial alerts with openssl
* get alerts from schannel
* update tests to work with openssl 1.1.x
* fix ClientAsyncAuthenticate_ServerNoEncryption_NoConnect to work properly with Tls13
* remove extra comment
* feedback from review
* feedback from review
* remove unused variable
Commit migrated from https://github.com/dotnet/corefx/commit/784cb6b5b7e947d3a69c7183847652a0e9335ff0
* debian 10 fixes
* Fix Windows 8.1 (product issue)
* expand SSL_CTX_set_min/max_proto_version macro in attempt to fix the build
* define SSL_CTRL_SET_MIN/MAX_PROTO_VERSION when not defined
* Apply Win8.1 fix to all platforms in attempt to fix OSX
* check if failing test with excluded SSL2 passes on OSX
* Filter out incompatible protocols at the source instead of each callsite
* Remove ResetProtocolRestrictions from header file
* Update src/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs
Co-Authored-By: Jeremy Barton <[email protected]>
* revert files with only whitespace changes
Commit migrated from https://github.com/dotnet/corefx/commit/d5b91dc5e2b1c4bc73c4ba2070fd7cb8f7013b49
Re-enabling client certificate authentication tests for System.Net.Security. These tests
appear to be passing for a while now. Will monitor the tests to see if anything regresses.
Updated Ping tests to permanently skip them for UAP. Due to Windows OS limitations in the
Win32 APIs for ping, the .NET Ping class is not supported for UWP apps.
Fixesdotnet/corefx#16534Fixesdotnet/corefx#19583
Commit migrated from https://github.com/dotnet/corefx/commit/3b665d55700b67d01f8da268096f55deb2facc6f
Windows 7 and Windows 2008 R2 support TLS 1.1 and 1.2, but for legacy reasons by default those protocols are not enabled when a developer elects to use the system default. However, in .NET Core 2.0 and earlier, HttpClientHandler would enable them, due to being a wrapper for WinHTTP, which enabled them. Both for compatibility and because we prefer those higher protocols whenever possible, SocketsHttpHandler also pretends they're part of the default when running on Win7/2008R2.
Commit migrated from https://github.com/dotnet/corefx/commit/0c7a1de0448c9dee76723d0bedd90f76c3436662
By default, .NET Core defaults to allowing TLSv1, TLSv1.1, and TLSv1.2. However, whereas .NET Framework allows a developer to opt-in to SSLv2/SSLv3, .NET Core currently blocks it. This means developers are unable to use .NET Core when they need to communicate with an endpoint they don't control and that's unfortunately limited to one of these protocols, which blocks adoption of .NET Core.
This commit stops blocking these protocols. They're still disabled by default, and compiling against them still results in a deprecation warning, but if a developer chooses to ignore the warning and explicitly sets SslProtocols, they are at least able to use the protocols, subject to whatever the underlying operating system allows (e.g. Windows stops supporting SSLv2 as of v1607).
Commit migrated from https://github.com/dotnet/corefx/commit/3cc6fda0c6abe76eea222c165ebdf816e83df564
* Test cleanup for System.Net.Security
dotnet/corefx#3144 - Removed TODO because Begin/End were added back in dotnet/corefx#8358 and the issue is closed
dotnet/corefx#7825 - Original issue from April 2016. Cannot repro today. Re-enabling to watch for future failures.
dotnet/corefx#11170 - Can't repro failures on multiple OSs. Re-enabling to watch for future failures.
dotnet/corefx#11345 - Outerloop tests are passing and stable for thousands of iterations. Tentatively moving to innerloop to watch for potential future failures.
dotnet/corefx#12107 - removed TODO because issue is closed
dotnet/corefx#9130, dotnet/corefx#10909, dotnet/corefx#11624, dotnet/corefx#14177, dotnet/corefx#14505 - duplicate issues failing because of an intermittent error (remote party closed transport stream) not exclusive to the test which occurs in Outerloop runs for other NetSecurity tests. Re-enabling them and leaving them in innerloop to get more data.
dotnet/corefx#8744, dotnet/corefx#12683, dotnet/corefx#12706, dotnet/corefx#12728 - duplicate issues failing because of an intermittent error (credentials package not recognized) not exclusive to the test which occurs in Outerloop runs for other NetSecurity tests. Re-enabling them and leaving them in innerloop to get more data.
* Remove unused netsecurity tests helper
* Remove unused test helper
Commit migrated from https://github.com/dotnet/corefx/commit/02b0fdb699dfc03fd995d278d90f396892095590
Lately, the CI system and test server infrastructure has been overloaded with many PRs. This is causing many networking tests to randomly fail due to resource exhaustion caused by so many simultaneous PR runs on the same CI machines. This occurrs not only when using an external test server endpoint (corefx-net.cloudapp.net) but also loopback servers.
To improve engineering efficiency for the team, we are moving most of the tests in the networking libraries from the default CI runs (innerloop). For developers working on networking libraries, the networking tests can be run by invoking the "outerloop" tests.
We will not be allowing any merges of PRs in the networking libraries unless the outerloop tests are also run by the developer.
This affects tests in the following libraries right now:
* System.Net.Http
* System.Net.Http.WinHttpHandler
* System.Net.Sockets
* System.Net.Security
* System.Net.WebSockets.Client
I will be working on fine tuning these exclusions (issue dotnet/corefx#11345) to try to bring back tests into the innerloop runs when we have begun to address the infrastructure issues.
Commit migrated from https://github.com/dotnet/corefx/commit/defbb8afd11b317f6b5cc2f4422a03d701b6dba3
The property leaks through the abstraction. It's rarely used. And it complicates things on Unix due to exposing the underlying socket instance combined with difficulties with multiple connect calls on a single socket instance.
Until we have good reason to expose it in the contract, we're removing it from the contract before it's stable.
Commit migrated from https://github.com/dotnet/corefx/commit/30abd30421289509cd3bd18a9114501afdc0fb7c
- System.Net.Sockets removed a bunch of APIs. They're somehow still in the contracts, so compilation succeeds, but they're not implementation, so the tests fail when trying to use methods like TcpClient.Connect and various Begin/End methods. I've changed these to use the appropriate Async methods.
- SslStream has a Debug.Fail which has been failing regularly, but it wasn't being noticed. Now that Debug.Fail will throw an exception, the tests that were previously asserting are now failing. I've temporarily commented out the Debug.Fail with a TODO comment.
One test is still failing:
```
System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Ssl2_Fails_Linux(server: Ssl2, client: Tls11, expected: typeof(System.Security.Authentication.AuthenticationException)) [FAIL]
Assert.Throws() Failure
Expected: typeof(System.Security.Authentication.AuthenticationException)
Actual: typeof(System.InvalidOperationException): EndAuthenticate can only be called once for each asynchronous operation.
Stack Trace:
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
```
Commit migrated from https://github.com/dotnet/corefx/commit/c0aab82ea70453324f5e7d51902a0e1bb40db365