Skip to content

EnvelopedCms test failures on net10.0 for unsupported algorithms #118103

@PranavSenthilnathan

Description

@PranavSenthilnathan

EnvelopedCms tests in System.Security.Cryptography.Pkcs work on net481 and net10.0-windows, but on net10.0, there are 15 failures due to RC4, RSA-OAEP and Diffie-Hellman only being supported when the assembly targets Windows. The cause of this behavior difference is that the net10.0 product assembly always uses the managed PAL, even on Windows (it is built only with the managed pal type and not the Windows pal):

<Compile Include="Internal\Cryptography\Pal\Windows\PkcsPal.Windows.cs" />

In my opinion, since no one has asked for these algorithms to be supported in the net10.0 TFM, we should instead just fix the tests and nothing more. The alternative is to add the support in the product with a runtime platform check.

Test Failures
✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaOaepCertTests.TestKeyTransEncryptKey_RsaOaepCertificate_Sha256Parameters​57ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.113549.1.1.7'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaOaepCertTests.TestKeyTransEncryptKey_RsaOaepCertificate_Sha256Parameters() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyTransRecipientInfoRsaOaepCertTests.cs:line 46
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.ContentEncryptionAlgorithmTests.DecodeAlgorithmRc4_RoundTrip​10ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.113549.3.4'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.OpenAlgorithm(String algorithmIdentifier) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.cs:line 199
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.OpenAlgorithm(AlgorithmIdentifier algorithmIdentifier) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.cs:line 142
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.EncryptContent(ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, Byte[]& cek, Byte[]& parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 156
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 26
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.ContentEncryptionAlgorithmTests.DecodeAlgorithmRc4_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\ContentEncryptionAlgorithmTests.cs:line 241
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeType_RoundTrip​6ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeType_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 54
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaOaepCertTests.TestKeyTransEncryptKey_RsaOaepCertificate_NoParameters_DefaultToSha1​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.113549.1.1.7'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaOaepCertTests.TestKeyTransEncryptKey_RsaOaepCertificate_NoParameters_DefaultToSha1() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyTransRecipientInfoRsaOaepCertTests.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeRecipientIdValue_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeRecipientIdValue_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 84
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreesRecipientIdType_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreesRecipientIdType_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 68
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeEncryptedKey_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeEncryptedKey_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 164
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeKeyEncryptionAlgorithm_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeKeyEncryptionAlgorithm_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 146
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeDate_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeDate_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 218
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeOriginatorIdentifierOrKey_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeOriginatorIdentifierOrKey_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 182
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.GeneralTests.DecodeRecipients3_RoundTrip​1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.GeneralTests.DecodeRecipients3_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\GeneralTests.cs:line 89
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeOtherKeyAttribute_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeOtherKeyAttribute_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 255
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeVersion_RoundTrip​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeVersion_RoundTrip() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 40
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeDate_RoundTrip_Ski​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.10046.2.1'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.EncodeKeyAgreel(SubjectIdentifierType type) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 363
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyAgreeRecipientInfoTests.TestKeyAgreeDate_RoundTrip_Ski() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyAgreeRecipientInfoTests.cs:line 234
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

✘ System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaPaddingModeTests.TestKeyTransEncryptedKey_RsaAlgorithms_Recipient_PreferredOverCertificate​< 1ms
Error:
System.Security.Cryptography.CryptographicException : Unknown algorithm '1.2.840.113549.1.1.7'.

Stack trace:
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes, Byte[] encryptedContent, Byte[] cek, Byte[] parameterBytes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 114
   at Internal.Cryptography.Pal.AnyOS.ManagedPkcsPal.Encrypt(CmsRecipientCollection recipients, ContentInfo contentInfo, AlgorithmIdentifier contentEncryptionAlgorithm, X509Certificate2Collection originatorCerts, CryptographicAttributeObjectCollection unprotectedAttributes) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs:line 37
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipientCollection recipients) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 105
   at System.Security.Cryptography.Pkcs.EnvelopedCms.Encrypt(CmsRecipient recipient) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\src\System\Security\Cryptography\Pkcs\EnvelopedCms.cs:line 89
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaPaddingModeTests.EncodeKeyTransl_Rsa2048(RSAEncryptionPadding encryptionPadding, CertLoader loader) in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyTransRecipientInfoRsaPaddingModeTests.cs:line 72
   at System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests.KeyTransRecipientInfoRsaPaddingModeTests.TestKeyTransEncryptedKey_RsaAlgorithms_Recipient_PreferredOverCertificate() in D:\git\runtime\src\libraries\System.Security.Cryptography.Pkcs\tests\EnvelopedCms\KeyTransRecipientInfoRsaPaddingModeTests.cs:line 29
   at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\RuntimeHandles.cs:line 1168
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in D:\git\runtime\src\coreclr\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in D:\git\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs:line 57

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions