Commit Graph
558 Commits
Author SHA1 Message Date
Eric St. John da8c29065d Treat Crypto.Cng as inbox on Xamarin profiles.
Commit migrated from https://github.com/dotnet/corefx/commit/5114e42ddc313f470cc41e49eb80f33d2d0f5c4f
2018-02-08 09:04:14 -08:00
Wes Haggard fc9b090ef0 Update references assemblies to include private fields for structs
Contributes to https://github.com/dotnet/corefx/issues/6185.


Commit migrated from https://github.com/dotnet/corefx/commit/2e97d43060dfb589907a15dbfef0cc7db6e90546
2018-01-12 08:53:41 -08:00
Santiago Fernandez Madero f230741a96 Change PlatformDetection.GetFrameworkVersion() to use registry key value instead of minor build number (dotnet/corefx#26094)
* Change PlatformDetection.GetFrameworkVersion() to use registry key value instead of minor build number

* Address PR Feedback to do one liner getters


Commit migrated from https://github.com/dotnet/corefx/commit/0a131dd2dd4d408c47946a0928f5a9f2d709f6db
2017-12-30 02:02:03 -06:00
Ahson Khan 7886be085d Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference (dotnet/corefx#25936)
* Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference

* Fix unresolved merge conflict.

* Add using directive

* Add missing using directives.

* Add references to System.Memory


Commit migrated from https://github.com/dotnet/corefx/commit/40cbd5636851093309b841db4d53af369b7ef1c6
2017-12-21 11:05:06 -08:00
Wes Haggard ca428a88ca Update cng and openssl packages to pin netstandard assembly versions
Given that we are harvesting the netcoreapp2.0 assets for these packages
we need to keep the netstandard2.0 assembly versions matching what we are harvesting.

If we need to add more APIs to the netstandard refs then we need need to bump the versions
and start building live versions of the netcoreapp2.0 assets again to add the APIs.


Commit migrated from https://github.com/dotnet/corefx/commit/e3ec0b2b6d1fe173983df0b6910b214d5db36a82
2017-12-14 10:54:55 -08:00
Stano Peťko c479e42e76 Deleted dead code from System.Security.Cryptography.Cng. (dotnet/corefx#24996)
Commit migrated from https://github.com/dotnet/corefx/commit/2803bae61a4d256d8b498141527cdd4bb7ccab83
2017-11-02 15:40:52 -07:00
Santiago Fernandez Madero b9d768589e Fix System.Data.Odbc configurations for support package and run UpdateVSConfigurations (dotnet/corefx#24752)
* Fixed odbc configurations for compat package

* Run UpdateVSConfigurations

* Remove Default Configurations to help VS... comment from csproj's

* Remove from System.Buffers as well


Commit migrated from https://github.com/dotnet/corefx/commit/bcc59b2e74090cfbcc4d6e7c245c172744e9d46b
2017-10-23 18:24:28 -07:00
Eric St. John 6c5a247c17 Fix library packages overlapping with framework packages
Many library packages overlap with assemblies we include in our framework packages.

In the first release we handled this by preventing the library package from applying any
assets.

This becomes problematic if the reference assembly needs to version, and especially
if the library wants to add API.  The new version will be greater than what was previously
shipped inbox, and we wouldn't want to restrict the new version just to future TFMs.

To address this problem I've made a couple fixes:
1. For packages which are shipping brand new API that's not present in desktop, we'll
omit any placeholders and allow conflict resolution to decide if the library package
or framework package should be used (based on version).  In some cases this required
bringing some configurations into the package so that it could always be "up to date".

2. For packages which are just exposing API in desktop, and thus already tied/anchored
to netstandard versions, we'll freeze the reference assembly version for the non-desktop
builds.  This ensures that the reference assembly will never move past the version that's
inbox in the framework package.

Update BuildToolsVersion to 2.0.0-prerelease-01931-01


Commit migrated from https://github.com/dotnet/corefx/commit/7ee51be7ed472a12266c8cc2ab25a9e1862c1d00
2017-09-01 09:01:41 -07:00
Stephen Toub 512139598e Add ECDsa span-based methods (dotnet/corefx#23252)
Commit migrated from https://github.com/dotnet/corefx/commit/1d7b43d32c8767bb853f1cfb00008eff0834947f
2017-08-15 13:07:23 -04:00
Eric StJohn be6163290c Merge pull request dotnet/corefx#23168 from ericstj/netcoreapp2.1
Move master to netcoreapp2.1

Commit migrated from https://github.com/dotnet/corefx/commit/8affaae021f73bad750664efa01f469539c85bfe
2017-08-15 07:53:57 -07:00
Stephen Toub 844f04d636 Add DSA span-based methods (dotnet/corefx#23226)
* Add DSA span-based methods

- Augmented DSA with new span-based methods
- Overrode relevant methods on DSACng and DSACryptoServiceProvider on Unix with full implementations
- Overrode relevant methods on DSAOpenSSL and DSASecurityTransforms with valid implementations that avoid some of the base implementation costs, but there's still a lot of allocation there to be avoided subsequently.
- Did not override implementations on DSACryptoServiceProvider on Windows, for the same reason I didn't do so in RSACryptoServiceProvider (it mutates the input).
- Added a bunch of tests.

* Address PR feedback

Also fix a few argument-name-related failures on macOS, and clean up a few minor issues spotted while doing the other changes.

* Disable tests on macOS relying key generation


Commit migrated from https://github.com/dotnet/corefx/commit/30dab1f8f207661d511f7608f2afcee20ebbf823
2017-08-15 09:22:14 -04:00
Eric St. John cb4f8f8796 Ensure packages continue to build for NETCoreApp2.0
These are for packages that are outside of the shared framework.  We shouldn't make them
cross-compile for netcoreapp2.1 just because master has moved to that.  Instead we'll make
them continue to target netcoreapp2.0.

Two cases we want to cross-compile are OpenSsl and Cng since these have already started
taking advantage of API added in NCA2.1 (span).  For this we'll cross-compile and redist the
old netcoreapp2.0 implementation.

Two other special cases are System.Memory and System.Runtime.CompilerServices.Unsafe.
In these cases we wanted to keep them targeting netcoreapp (netcoreapp2.1) and
make their portable implementations apply for netcoreapp2.0.


Commit migrated from https://github.com/dotnet/corefx/commit/4a94c7b730928eda2e540b0d95bf8b9e89376907
2017-08-14 16:06:30 -07:00
Stephen Toub 37ed60d8c1 Add RSA span-based methods (dotnet/corefx#23112)
* Add RSA span-based methods

- Add RSA.TryDecrypt/TryEncrypt/TryHashData/TrySignData/TrySignHash/VerifyData/VerifyHash, with default implementations on the base class
- Override the relevant methods on RSACng (Windows), RSAOpenSSL (Linux), RSASecurityTransforms (macOS), as well as on RSACryptoServiceProvider on Unix.
- I did not override the members on RSACryptoServiceProvider's Windows implementation, as it mutates the input, something we should stay away from when supplied a ReadOnlySpan; we can revisit subsequently if needed.
- Modified the existing tests to also test the span-based methods in addition to the array-based methods, and added some additional tests
- Some minor cleanup of code here and there as I was modifying nearby code

* Address PR feedback

- Various formatting preferences
- More tests

* Fix macOS exception difference for invalid HashAlgorithmName

* Fix missing argument validation in RSASecurityTransform

This includes missing validation on existing methods, not just new ones.


Commit migrated from https://github.com/dotnet/corefx/commit/2d7ee255d3cdb1b13072176d4881e1b58453358b
2017-08-11 16:51:11 -04:00
Tarek Mahmoud Sayed 3765a6069b Moving PlatformDetection to Corefx.Private.TestUtilities assembly (dotnet/corefx#23109)
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly

The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.

* Fix Linux BB

* Update the xunit package reference

* Fix wrong condition on one of the tests

* Update the ConditionalFact/Theory to use Type as a parameter


Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
2017-08-10 22:37:36 -07:00
Jose Perez Rodriguez 4f4f2fd8d0 Adding few libraries to UWP Metapackage
Commit migrated from https://github.com/dotnet/corefx/commit/e8a80b149efff2b3c664bf7a3a1a57981b62c80e
2017-08-03 15:01:12 -07:00
Wes Haggard ee1e153dc1 Update harvest paths for new stable packages
Commit migrated from https://github.com/dotnet/corefx/commit/4deb3b587c4cf9788c5af137c47c9a2607d817d1
2017-07-31 11:34:06 -07:00
Jose Perez Rodriguez 370b49763c Merge pull request dotnet/corefx#21836 from joperezr/uapvnext
Renaming uap10.1 to uap10.0.15138

Commit migrated from https://github.com/dotnet/corefx/commit/32f3e82596c8c35691b7cdbf1a27e27784acc652
2017-07-03 15:41:09 -07:00
Jose Perez Rodriguez c9a146ca2a Renaming uap10.1 to uap10.0.15138
Commit migrated from https://github.com/dotnet/corefx/commit/60fe0c60dc418a6856955c215a9695f6f900acf1
2017-07-03 14:32:24 -07:00
Hugh Bellamy 98b18432b7 Move AssertExtensions to Corefx.Private.TestUtilities (dotnet/corefx#21799)
* Move AssertExtensions to Corefx.Private.TestUtilities

* Update csprojs

* Fix Linq.Expressions uapaot build


Commit migrated from https://github.com/dotnet/corefx/commit/7e3b0db2892c56a431f8e99af9cd9381adec385a
2017-07-03 09:27:30 -07:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
Steve Harter de9768975f Support Two-Key Triple DES (dotnet/corefx#20275)
Support Two-Key Triple DES

Commit migrated from https://github.com/dotnet/corefx/commit/1ce37dfb5a03e5decdb25ee67ef765f89424ceb1
2017-05-25 12:26:36 -05:00
Santiago Fernandez 73854b40c3 Fix System.Cryptography.Cng tests for netfx
Commit migrated from https://github.com/dotnet/corefx/commit/94bd5b4f50d796fcdd3c20700971d66d77d88dc3
2017-05-23 13:26:06 -07:00
Gaurav Khanna f167b0de93 Merge pull request dotnet/corefx#19842 from ericstj/incrementVersions
Increment versions post 2.0

Commit migrated from https://github.com/dotnet/corefx/commit/45d30e6bdf44d4a0e55df5a6064e8275cdf14d25
2017-05-17 12:03:29 -07:00
Morgan Brown 975ad3c685 Scale back [Serializable] CoreFX types (dotnet/corefx#19742)
* Remove SerializableAttribute from many CoreFX types that will not be serializable.

* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.

* Remove unneeded pragmas

* Update based on review comments


Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
2017-05-16 18:16:29 -04:00
Eric St. John e02c675179 Increment versions post 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/6c5f87319a4785499008c95b2ff5e7f13a413d22
2017-05-16 14:12:16 -07:00
Wes Haggard 69104e87e0 Revert "Remove some assemblies from some OS shared frameworks"
Commit migrated from https://github.com/dotnet/corefx/commit/55e85fa5da49c762645063c3771cbcee7eec1984
2017-05-15 09:40:00 -07:00
Sepideh Khoshnood 9214b25a4f Add nice messages for assemblies with autogenerated PNSE (dotnet/corefx#19506)
* Add nice messages for assemblies with autogenerated PNSE

* Fix failing builds

* Apply feedback

* Temporary workaround for Microsoft.Win32.Registry which needs using System statement

* Add new resource files

* Temporary workaround for System.Security.Cryptography.Cng which needs using System statement on Unix platforms

* Update BuildTools version and use resource strings for all PNSE messages

* Fix builds

* Fix typo


Commit migrated from https://github.com/dotnet/corefx/commit/00b2a853429c896eb973ffc1bbff04b186ab5d07
2017-05-09 20:16:50 -07:00
Eric St. John f94b701b92 Fix cycle in Cng package
Commit migrated from https://github.com/dotnet/corefx/commit/83a07730f97affcf13a9ec9472077469f51543f0
2017-05-09 12:53:26 -07:00
Santiago Fernandez Madero 0e1207475c Fix S.Security.Cryptography desktop tests (dotnet/corefx#19505)
* Fix 19283

* Fix 19238

* Fix 19080

* Fix 19079


Commit migrated from https://github.com/dotnet/corefx/commit/021867054976d1bada6de970208e5fc8b2a9beb5
2017-05-08 22:23:11 -04:00
Santiago Fernandez Madero 221406c996 Include Cryptography.Cng 462OrNewer tests only when targetgroup is net462, net47 or netcoreapp (dotnet/corefx#19390)
* Include S.S.Cryptography.Cng 462OrNewer tests only when net462, net47 or netcoreapp


Commit migrated from https://github.com/dotnet/corefx/commit/35735e24a65e4ed7513b6f40177056c3b35e2be4
2017-05-08 16:08:04 -07:00
Wes Haggard 025e014544 Merge pull request dotnet/corefx#19327 from weshaggard/CleanUpSharedFx
Remove some assemblies from some OS shared frameworks

Commit migrated from https://github.com/dotnet/corefx/commit/59e677b4afdf6c64f3c1315143992023ece235bc
2017-05-04 09:27:14 -07:00
FAREAST\v-lijiay 77781620b8 Disable failed test for issue 18719.
Commit migrated from https://github.com/dotnet/corefx/commit/489c716932f02dd4ad57ae54c7d49b6db7afdcfb
2017-05-04 02:42:43 -07:00
Wes Haggard 3641ab1a51 Remove some assemblies from some OS shared frameworks
A number of assemblies are only needed for implementation closure
on some OS's so for those lets only include them on the OS that
needs them.


Commit migrated from https://github.com/dotnet/corefx/commit/c5db9a803ee1eb2c9c33f8101a3d1692c0158317
2017-05-03 16:15:57 -07:00
Jeremy Barton 5bd3bf528c Make ECDsa.Create(ECCurve(.IsExplicit)) work on Windows. (dotnet/corefx#19208)
ECDsa.Create(ECCurve) had a check which rightly belonged in GenerateKey
behind an IsNamed check.  Moved that check to where it belonged, and added
an Explicit (PrimeShortWeierstrass) test to the big create matrix.

Adding the test resulted in debugging several tests which were assuming IsNamed.
The extra debugging data seemed generally applicable, so it remains.

Commit migrated from https://github.com/dotnet/corefx/commit/41b6a68a43f64217996489d4770c4024413a5957
2017-05-02 08:29:23 -07:00
Ian Hays b7f7908fbf Add Cng netstandard1.3, 1.4 PNSE builds
Commit migrated from https://github.com/dotnet/corefx/commit/420f65c49a898dc277c4a0b55c18dd168c47faef
2017-04-25 13:26:02 -07:00
Ian Hays 1488dfbd8a Update to CNG package
Commit migrated from https://github.com/dotnet/corefx/commit/6325117f2137f1d59a443a53a612bc8aac317100
2017-04-25 13:26:01 -07:00
Ian Hays 1b0207ae34 The cng package was removed so that the assembly could be included in the netstandard meta-package. However, Cng was later removed from netstandard, so the standalone package needs to be added back.
Commit migrated from https://github.com/dotnet/corefx/commit/8b06250c5262cc9c392e818094abf86d9a8bc0c5
2017-04-25 13:25:18 -07:00
Krzysztof Wicher 1d053531ba Merge pull request dotnet/corefx#18930 from krwq/fix18846
Disable netfx cng implementation testing lack of DP when importing RSA params

Commit migrated from https://github.com/dotnet/corefx/commit/ea9a927b6e4cd1fed5a39cf6d90d9823498ada5e
2017-04-25 13:20:58 -07:00
Krzysztof Wicher fb5f8dc0e3 fix DefineConstants
Commit migrated from https://github.com/dotnet/corefx/commit/b3a789fccde2c576111c23e124b254caa7062e0f
2017-04-25 09:25:35 -07:00
Krzysztof Wicher 844c8e6e1b disable netfx cng implementation testing lack of DP when importing rsa params
Commit migrated from https://github.com/dotnet/corefx/commit/7da8043614e8f728eb341165e73d64f936abac3f
2017-04-25 09:22:44 -07:00
Eric StJohn 8af4fc9c49 Merge pull request dotnet/corefx#18766 from ericstj/removeIsDesktopFacade
Remove IsDesktopFacade

Commit migrated from https://github.com/dotnet/corefx/commit/c77b83942986c9103d959dbba5de5ce0599b2858
2017-04-24 16:43:55 -07:00
Eric St. John 809b1ef04a Remove use of IsDesktopFacade
Commit migrated from https://github.com/dotnet/corefx/commit/7a7bf2e0cb40168c8819d84c66c99c8984746e02
2017-04-24 15:46:30 -07:00
Atsushi Kanamori 230dc50ff5 Fix 37 UWP failues in S.S.C.Cng.Tests. (dotnet/corefx#18739)
Crypto was fine, it's xunit reflecting over
theory data.

Commit migrated from https://github.com/dotnet/corefx/commit/98e1a453240ab4e61394eea512175ec192236e82
2017-04-21 10:30:40 -07:00
Eric St. John c91a1639df Fix warnings during -allConfigurations build
Commit migrated from https://github.com/dotnet/corefx/commit/1ce8e1c823d6a69bae9a933de550a80d8757b9f6
2017-04-18 13:28:51 -07:00
Viktor Hofer 850ec0dc78 Adding missing ECDsaCng members (dotnet/corefx#18522)
* Adding missing ECDsaCng members

* Add two ECDsaCng members which throw PNSE

* Moved method out of conditional compilation

* nameof HashAlgorithm


Commit migrated from https://github.com/dotnet/corefx/commit/c564ecd7805a4ced68bb0ebd07f2233feac1b716
2017-04-18 20:33:45 +02:00
Daniel Harvey 252cdc5e95 Bulk updates of tests for AssertExtensions (dotnet/corefx#18491)
Bulk update to AssertExtensions.Throws for AOT support. This doesn't disable Assert.Throws.

Commit migrated from https://github.com/dotnet/corefx/commit/b43b4df2e0e2182154bb0f425cb4a61bc1269828
2017-04-18 09:52:02 -07:00
Jose Perez Rodriguez c5f98fe064 Merge pull request dotnet/corefx#17885 from joperezr/issue_17764
Fixing test configurations for Cng and X509Certificates

Commit migrated from https://github.com/dotnet/corefx/commit/8697c0b31f61e48a423f484b3e383bfd96193f1e
2017-04-13 09:00:52 -07:00
Wes Haggard 4185183e8c Updates how we define which key an assembly uses
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
2017-04-10 12:51:50 -07:00
Jose Perez Rodriguez 851f6c39b6 Making System.Security.Cryptography.Cng have a netstandard configuration
Commit migrated from https://github.com/dotnet/corefx/commit/68b3adbd0855a87e634f08dcfa6f3273193b2192
2017-04-07 15:56:23 -07:00
Shin Mao 386595b08c Exclude Some Files when Building uapaot (dotnet/corefx#17962)
* Exclude some files when building uapaot.

* Fixed paths in projects for RefelctionOnly.

* Change uapaot to uap in config.

* Update VS Configurations.


Commit migrated from https://github.com/dotnet/corefx/commit/642541f7b6fe2a66e66cfaf26c2ee2b79a4511da
2017-04-06 11:16:05 -07:00