Better support RSAES_OAEP certificates for EnvelopedCms
authorKevin Jones <kevin@vcsjones.com>
Fri, 3 May 2019 15:05:38 +0000 (11:05 -0400)
committerJeremy Barton <jbarton@microsoft.com>
Fri, 3 May 2019 15:05:38 +0000 (08:05 -0700)
commiteb693c35c79708a85cf23b381f380282b31fc2c7
tree90dfea1b051de6c6937059c53fd98cbe1ac2da78
parenta4ed7f3fe5670bb106c163682519dee40f1e57d4
Better support RSAES_OAEP certificates for EnvelopedCms

Improve the .NET Core EnvelopedCms support on Windows for certificates whose public key says the algorithm is RSA-OAEP to restore .NET Framework-equivalent capability.

Linux and macOS cannot reliably represent those certificates as an X509Certificate2, so their support is unchanged at this time.

Commit migrated from https://github.com/dotnet/corefx/commit/c5d6284dec3136ff9e45d02c5d788f29269ae1df
src/libraries/Common/src/System/Security/Cryptography/Oids.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/Certificates.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/GeneralTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaOaepCertTests.cs [new file with mode: 0644]
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/KeyTransRecipientInfoRsaPaddingModeTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/System.Security.Cryptography.Pkcs.Tests.csproj