Commit Graph

13 Commits

Author SHA1 Message Date
Nate McMaster eea8c1a146
Support decrypting keys with X509Certificate that is not in the X509Store
The default implementation of EncryptedXml doesn't support using the RSA
key from X509Certificate to decrypt xml unless that cert is in the X509
CurrentUser\My or Localmachine\My store. This adds support for
decrypting with the X509Certificate directly. This is useful for Linux
(often Docker) scenarios, where the user already has a .pfx file, but
may not have added it to X509Store.
2018-02-16 12:11:20 -08:00
Nate McMaster 8ed38f5dcf Upgrade to xunit 2.3.0-beta4 2017-08-22 15:01:11 -07:00
Nate McMaster b706a75e03 Target .NET Standard 2.0
This retargets all data protection libraries to ns2.0. This means .NET
Framework applications will need to upgrade to .NET Framework 4.6.1.
This upgrade makes available API to .NET Core that was previously only
available on .NET Framework, such as encrypting keys at rest with
certificates.

New API for .NET Core users:
- IDataProtectionBuilder.ProtectKeysWithCertificate(string thumbprint)
- CertificateXmlEncryptor
- ICertificateResolver
- DataProtectionProvider
  - .Create(string applicationName, X509Certificate2 certificate)
  - .Create(DirectoryInfo keyDirectory, X509Certificate2 certificate)
  - .Create(DirectoryInfo keyDirectory, Action<IDataProtectionBuilder>
  setupAction, X509Certificate2 certificate

Other minor changes in this commit:
- Fixed samples that were using obsolete logging API
- Remove calls to api-sets, instead using kernel32. .NET Core 2.0 no
longer requires using api-sets as Nano Server now forwards kernel32
calls
- Made minor improvements to the TypeForwardingActivator
- Remove dead code an unused api baselines
- Enable more tests on macOS/Linux that previously only ran on Windows
2017-05-24 09:47:10 -07:00
Pranav K 91406009d3 Remove net451 as a cross-compile target 2017-03-23 17:20:12 -07:00
Kiran Challa bb7b58321c Converted samples and test projects to run on netcoreapp2.0 2017-03-23 17:05:16 -07:00
Pranav K f3a6083c9c Updating to netcoreapp1.1 2016-10-13 11:13:21 -07:00
Pranav K 01e9377eff Revert "Updating to netcoreapp1.1"
This reverts commit a2a214f698.
2016-10-12 16:08:10 -07:00
Pranav K a2a214f698 Updating to netcoreapp1.1 2016-10-12 13:44:59 -07:00
Pavel Krymets 6aca37fe5e Migrate tests, tools and samples to portable 2016-04-18 08:37:56 -07:00
Ajay Bhargav Baaskaran 5654310a68 [Fixes #130] Added few DataProtectionProvider.Create overloads 2016-04-06 13:10:55 -07:00
jacalvar aa1495deb0 [Fixes #120, Fixes #121, Fixes #122] Make data protection follow the options model
* Add an IDataProtectionBuilder interface and move methods on DataProtectionConfiguration
  to extension methods on IDataProtectionBuilder.
* Make AddDataProtection return an IDataProtectionBuilder instance for further configuration.
* Make AddDataProtection take in an action with a GlobalConfigurationOptions parameter instead
  of a DataProtectionConfiguration parameter.
* Make DataProtectionProvider static
* Remove ConfigureGlobalOptions
* Change Option suffix in classes that are not actually options to Settings.
* Add extension method for configuring key management options.
* Cleanups.
2016-03-15 15:20:59 -07:00
N. Taylor Mullen 43dfd15a01 Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:32:33 -08:00
N. Taylor Mullen b87a8001fe Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:16:08 -08:00