From 1744844da40393d760a5da74a2cafee679091126 Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Wed, 28 Aug 2024 22:08:41 -0400 Subject: [PATCH] Change BuildWithFactoryReadDirect to not use RSA+MD5 --- .../tests/Pkcs12/KeyBagTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Security.Cryptography.Pkcs/tests/Pkcs12/KeyBagTests.cs b/src/libraries/System.Security.Cryptography.Pkcs/tests/Pkcs12/KeyBagTests.cs index 2a3ba970c01aef..071a210c79dd55 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/tests/Pkcs12/KeyBagTests.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/tests/Pkcs12/KeyBagTests.cs @@ -29,7 +29,7 @@ public static void BuildWithFactoryReadDirect() Assert.True(rsa2.TrySignData( keyBag.Pkcs8PrivateKey.Span, sig, - HashAlgorithmName.MD5, + HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1, out int sigLen)); @@ -38,7 +38,7 @@ public static void BuildWithFactoryReadDirect() Assert.True(rsa.VerifyData( keyBag.Pkcs8PrivateKey.Span, sig, - HashAlgorithmName.MD5, + HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1)); } }