From 2b93bea3dfbada4a4567e291db30fc7a020ec736 Mon Sep 17 00:00:00 2001 From: Rishabh Chauhan Date: Mon, 8 Jul 2024 17:54:09 +0530 Subject: [PATCH] Replace X509Certificate2 ctor with X509CertificateLoader.LoadCertificate --- .../src/WindowsBase/MS/Internal/IO/Packaging/Certificate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/Certificate.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/Certificate.cs index fa0c21283a4..84747a37c2c 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/Certificate.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/IO/Packaging/Certificate.cs @@ -113,7 +113,7 @@ internal X509Certificate2 GetCertificate() // X509Certificate constructor desires a byte array Byte[] byteArray = new Byte[s.Length]; PackagingUtilities.ReliableRead(s, byteArray, 0, (int)s.Length); - _certificate = new X509Certificate2(byteArray); + _certificate = X509CertificateLoader.LoadCertificate(byteArray); } } }