For any libary that is part of netstandard and needs to either add types
to desktop or satisfy a higher assembly version that we previously
shipped, ensure we have both a netfx ref and src build.
The ref build is required because previously we were using the src build
(partial facade) as both ref and lib. This is problematic because we
need to build the full netstandard.dll facade before building src
projects. Ensuring a ref build also helps reduce package size since we
don't end up shipping the partial facade implementation in ref.
Src build has been added where it wasn't already present to fill in the
missing types, members, or satisfy the previously shipped assembly
version in netstandard1.x.
Commit migrated from https://github.com/dotnet/corefx/commit/45b4c71bff924245d8962035bd751d65c45bf31d
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
* Improve negative alignment for asymmetric algs.
Ensure that we get consistent (modulo HResult/exact message text) exceptions
for negative experiences across each of the three implementations of the three
asymmetric algorithms.
RSA:
* We should throw when decrypting with no private key
* We should throw when signing with no private key
* We should throw when signing and the hash value is the wrong size
* We should throw ArgumentNullException on the null hash
DSA:
* We should throw when signing with no private key
ECDSA:
* We should throw when signing with no private key
Commit migrated from https://github.com/dotnet/corefx/commit/677bfabe55e3f3e542d00bc37dd17bbbd1473553
During the design of the ECC import/export feature we concluded that
better overloads for the asymmetric algorithms' Create methods should
exist which allow the user to specify the generation space (an ECCurve for ECC,
a keysize for RSA and DSA) or to specify key parameters for importing.
These methods are currently pure convenience, but in the future they could
end up using the arguments to change a preferred back-end provider;
for example, on netfx RSA.Create() could prefer RSACng when the Exponent is
larger than 4 bytes, since RSACryptoServiceProvider cannot process those keys.
Commit migrated from https://github.com/dotnet/corefx/commit/97fcdd3f68b80b79a4b91cb94e4a0f01eeace8a5
* 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
This adds support for using (HMAC) SHA256, SHA384, SHA512 in PBKDF2.
(HMAC)MD5 isn't being enabled at this time. We can re-evaluate that later,
but since this API change is about letting newer algorithms in it doesn't
seem like letting the older ones in is high-value.
This is staying as a managed implementation in this change, switching to
using native implementations can easily be done as a followup given the new
tests.
Commit migrated from https://github.com/dotnet/corefx/commit/29cb063b95661470340b6ba7e1381495c05bfff2
Generate RSA and ECDSA keys via a temporary keychain.
When no keychain is given, SecKeyGeneratePair will generate the keys into the
default/login keychain. Since the keys were not expected to have been in the
keychain, they permanently leak out and the keychain grows over time.
Instead, have the managed code provide a temporary keychain into which the keys
will be created. Then, export them and re-import them to the NULL keychain. The
temporary keychain can then be deleted, and the hard problem of delayed cleanup is
avoided.
Files on disk will still leak if the process terminates during the key generation
phase, but that is a much smaller window than other 'temporary file on disk' solutions.
Commit migrated from https://github.com/dotnet/corefx/commit/37ddcd39db16a0069683c3d3f95e6740c44aaec3
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
* Marking code as unchecked (pt 7)
Marking code that may intentionally lead to over or underflows with
unchecked in preparation of turning on CheckForOverflowUnderflow for
all projects (issue dotnet/corefx#3140)
* Marking code as unchecked (pt 7a)
Additional fixes from a debugging session on macOS
* Marking code as unchecked (pt 7b)
Added missing unchecked to ConcurrentBag
Commit migrated from https://github.com/dotnet/corefx/commit/0ebc867d6bad9d777dd61afb78d0445c86143b34
* Enable tests to compile with netstandard
Most of the tests have netstandard configurations and it doesn't compile. the changes here is to fix the configurations and the tests to compile.
This is important step to get netfx tests compile too as we are in most of the time netfx fallback to netstandard configuration
The changes include some fixes to compile teh sources too.
* Fix System.Collections.Immutable
* update src configuration
* remove netstandard17 defines
* Split netcoreapp code to its own files
* Remove 17 from the test class name
Commit migrated from https://github.com/dotnet/corefx/commit/15b4f51c2f3cb924840e5407bb8d5fe03bb282ea
* Enable compiling the test projects against the configuration
The tests were compiled using the vertical configuration and not the best configuration picked from Configurations.props. this change is fix that and have all test projects configured accordingly.
This change ensuring netcoreapp runs successfully and we'll have another rounds later for other configurations like netfx, UAP...etc.
* Fix openssl test project on Linux distros
* Update the project configurations
* Update VS solution files
* update solution files
Commit migrated from https://github.com/dotnet/corefx/commit/e79912f8b77bc22abfd85e94b74c06e5d99e8381
With one exception: System.Runtime.InteropServices.RuntimeInformation.
For the rest we will no longer ship packages.
Instead the types will be supported as follows:
1. In a netstandard2.0+ project via NETStandard.Library package's
netstandard.dll
2. In a netstandard1.x project via NETStandard.Library package and
closure which ship from servicing branches.
3. In a framework specific project via the framework's targeting pack
or framework package.
Commit migrated from https://github.com/dotnet/corefx/commit/d6bd0c5889c604bda6afcba4cd7848b7cb0fa6d3