* Split the Unix and Windows project.json files for System.Net.Security since they have different dependencies at the implementation level.
* Use the managed IdnMapping to do the IDNA rules application
* Update comments in the native half of the match logic
This was verified against a private domain which uses a mix of ASCII and non-ASCII characters.
* Lowercase punycode form: Success before, success after
* Mixed-case punycode form: Failed before, success after
* Unicode form: Failed before, success after.
Commit migrated from https://github.com/dotnet/corefx/commit/d573223a0d99d41daf8ed26fa89647894a9770da
Build on the CI is complaining about missing base types for many
reference assemblies (where we only pass the compiler direct
references, trimming transitive dependencies).
Additionally I removed the test data packages from some tests
because, of course, they were not directly referenced :).
Commit migrated from https://github.com/dotnet/corefx/commit/3348234db28a1c186f0bab9b0437bc48a81d0ad2
- 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
A change was made to DNX to no longer restore project.jsons
that are in nested folders. This caused my batch update to miss
a number of tests and reference assembly projects.
This fixes the stale lock files, but restore is still broken.
[tfs-changeset: 1540448]
Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
We need a new DNX to understand the latest packages.
We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.
The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.
[tfs-changeset: 1540388]
Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
Instead of having managed code duplicate the SSL_CIPHER struct, moving all the code that uses the cipher struct into a native shim method.
That also pulled a lot of algorithm constants to be defined in native instead of managed.
Commit migrated from https://github.com/dotnet/corefx/commit/30c98cc053bcdd0f7aef556bbe203ada1b9f23a2
There are a number of clean up tasks that came out of the first 2 rounds of libssl shim work.
1. Add some Debug.Asserts when reading/writing to buffers.
2. Split the SSL extern methods into a separate class from the Interop.Crypto class. This allows the minimum amount of intialization to occur as needed. It also better keeps libssl separate from libcrypto shims.
3. Use a configure.cmake and #cmakedefine01 feature in our CMake file to create defines. This is consistent with CoreCLR and the other of CoreFX shims.
Commit migrated from https://github.com/dotnet/corefx/commit/61bcd097aade191538cabe4cbc13b6c8bc0c3ea3
I added shims the first 8 libssl functions and did a little clean up.
- Put all Interop files under "Common\Interop" in System.Net.Security.
- Removed some unused fields from StreamSizes.
- Changed some unnecessary IntPtr usages to byte[] or byte*, where appropriate.
Commit migrated from https://github.com/dotnet/corefx/commit/cc364e67c841c4c7d49eeac87ae6f0feef412748
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.
Now all packages contain all generations of API that they have ever shipped.
In doing this I needed to change how we determine package version. Before we ensured all assemblies would have the same version and used that. Now we choose the max.
Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there). To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders. In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.
This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm. This uncovered many existing issues in packages that I have cleaned up. The validation algorithm could use some polish but its working now. Perf is not great, package build went from 15s to ~2 minutes. I'll work on this some more by making it incremental (input: nuspec, output: marker created on success). Profiling shows that most of the time is spent in calling the nuget APIs. I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph). Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.
[tfs-changeset: 1539216]
Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738