Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.
This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.
As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).
Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.
The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility
Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
It should not be possible by construction for _pendingReadRequest to become null in SignalComplete after we check it for nullness, as all access to it is protected by a lock. But for good measure, store it into a local and use that local for subsequent accesses. If nothing else, we can avoid an extra field access.
Commit migrated from https://github.com/dotnet/corefx/commit/7dc759724bd3da68ebe3756f1e3ffa9bd9266d2c
It looks like it's possible in a rare situation for the following to occur and result in a NullReferenceException when finalizing a request:
- HttpClient.SendAsync is called, which creates an EasyRequest. That EasyRequest isn't yet associated with a MultiAgent.
- The request is queued to the MultiAgent.
- Between the time that the request is queued and it's handled, the associated CancellationToken has cancellation requested.
- When the agent then processes the request, in ActivateNewRequest it'll see that cancellation has been requested and will immediately bail, before associating the easy request with the agent.
- Everything is dropped and eventually finalized. At that point the response stream's finalizer is invoked, it calls SignalComplete(..., forceCancel:true), and that dereferences _associatedMultiAgent in order to issue a cancellation request... but _associatedMultiAgent hasn't yet been set.
There's no reason _associatedMultiAgent's initialization needs to be deferred until the EasyRequest is picked up by the agent. We can instead make _associatedMultiAgent a readonly field that's initialized to the associated agent when the EasyRequest is constructed, so it won't be null even in such a situation.
Commit migrated from https://github.com/dotnet/corefx/commit/534a8dcd35bd3f264d08eadfe54a49e859e2012e
* Fix MaxResponseHeadersLengthSemantics
The new HttpClientHandler.MaxResponseHeadersLength property is defined differently from the similarly
named WebRequestHandler and HttpWebRequest properties. The units are supposed to be in Kilobytes
(1024 bytes). This problem was discovered while doing .NET Core vs. .NET Framework compat testing.
Fix the semantics to match the existing WebRequestHandler and HttpWebRequest properties. Adjust tests.
Contributes to dotnet/corefx#17691
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/170f7a5ac7f98f2076f0776c573e3188a390d565
Got the Http Functional tests running with no errors against NETFX (Desktop). Found a bunch
of compatibility differences between Desktop and Core that need to be investigated. For now,
the tests are skipped on Desktop.
Fixed the LoopbackServer so that it will run. It was blowing up with `MissingTypeException`
due to missing SocketTaskExtensions class (dotnet/corefx#17690).
Contributes to dotnet/corefx#17691
Commit migrated from https://github.com/dotnet/corefx/commit/b7f6f5f159ebe6c0597578bbd858697a6159a22f
In most cases we don't include the desktop refs because those
configurations are merely present to pass to API Compat.
In the System.Net.Http case the ref is actually necessary since the
ref is a real ref and not a facade.
Commit migrated from https://github.com/dotnet/corefx/commit/1c7f7034af89a59609711e09b2922889bcce492d
* Fix UWP Pinvoke checker condition
* analyzer baselines
* Remove redundant local define
* Remove redundant CA lines
* Special case Registry
* Fix BlockReflectionAttribute
* Replace NETNATIVE with uap define
* baselines
* Disable Pinvoke scan on specific projects
* Disable BlockReflectionAttribute on ilproj
* Revive 2 baselines
* Disable UWP validation on SQlClient
* Convert some defines to `uwp`
* Fix S.N.Primitives baseline
* Remove dead baselines
* Clean up NET_NATIVE defines
* Remove FEATURE_CORECLR except from shared sources
* Change Threading.Thread defines to just uapaot
* Fix comment
* Fix comment 2
* Change serialization uap defines to uapaot
* Rename EnableWinRT to UWPCompatible
* Fix UAP build for Console
* Fix uap condition in XML csproj
* Fix condition in XmlSerializer project
* Replace netcore50
* Remove dead #if
* Redundant console condition
* Redundant console condition2
* Trim baseline
* Revert Console baseline to pre UAP
* Fix MemoryMappedFiles uap build
* Fix S.Linq.Expressions build for UAP by temporarily disabling it
* Fix S.N.Sockets build for uap
* No plans to put SQLClient in UWP
* Fix RuntimeInformation build
* Fix MemoryMappedFiles build for Unix
* Add UWPCompatible to all netstandard versions
* Add EnablePinvokeAnalyzer to disable Pinvoke checking entirely for some reason
* Remove dead System.Xml.XmlSerializer.Tests.settings.targets
* Fix interop services build
* Remove last uap/uapaot define in Xml tests
* PInvoke check doc
* Fix PInvoke casing
* PInvoke file is case sensitive
* Remove unnecessary references to uapaot from projects that don't have uapaot configs
* Remove unnecessary uapaot from S.R.I.RI
* Replace UWPCompatible for TargetGroup in csproj conditions
* Reverse FileSystem edit as not ready to build for UWP
Commit migrated from https://github.com/dotnet/corefx/commit/b1865ea0847a7a86baefe8378b772ecf0b785681
- Removed stale code not used anywhere
- Removed defunct replacement code from .NET Core 1.x that can now use the real methods in .NET Core 2.0 (e.g. DnsAPMExtensions)
- Removed stale compilation constants
- Removed Unix-specific MultipleSocketMultipleConnectAsync that's no longer necessary as we're able to reuse Sockets after failed connects
- Moved some Unix-specific code out of the Windows compilation
- Modified some perf-counter code to minimize its impact, since it's currently a nop
- Replaced the same repeated snippet of error handling code with a helper
- Removed unused namespace imports
- Removed some unnecessary null checks, for objects that can never be null based on always being assigned to new objects in the ctors
- Removed unnecessary tracing guards, where a guard was just used at all call sites
- Removed invalid asserts that were triggered by new tests
- Some other minor miscellaneous cleanup as I noticed things, like using the null-coalescing operator
Commit migrated from https://github.com/dotnet/corefx/commit/e7b687700aefa791a05ac0f7024cedd514c2dc36
Broken by this change:
* A lot of TLS CipherSuites have no metadata defined.
* macOS does not support version skipping in TLS. So `Tls | Tls12` is an invalid choice.
In this change:
General:
* All OSStatus related exceptions now look up the error message.
X509Certificates:
* X509Certificate moves to using SecCertificateRef from OpenSSL's X509.
* X509 metadata comes from a managed reader after being loaded by Security.framework,
due to the significant amount of data that has no public export in Apple's libraries.
* Significant code was factored out to be shared by OpenSSL and Apple implementations for X500DistinguishedName and X509Certficate2Collection.Find.
* Loading a PFX (or, rather, the private keys from a PFX) via Apple's platform
requires importing into a Keychain, and a Keychain requires a file on disk.
A temporary keychain is created during cert loading and erased when safe.
Like the perphemeral key load on Windows this can leak files due to
abnormal program termination.
* The X.509 My store for CurrentUser and LocalMachine are the default (user) and System keychains.
* The X.509 Root store is an interpretation of the Apple SecTrustSettings data.
* The X.509 Disallowed store hasn't been implemented yet, but should be a very small change.
* Other X.509 stores cannot be created due to keychain complexity.
HttpClient:
* Initialization no longer wakes up OpenSSL
SslStream:
* New implementation based on Apple SecureTransport.
* Currently has support for SNI (for AuthenticateAsClient)
Commit migrated from https://github.com/dotnet/corefx/commit/3b19899963606a34e1623e0926b90fe907197ee6