From b52404b35394c9941b521622564e3dc061c95118 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Tue, 18 Oct 2011 15:49:24 -0400 Subject: [PATCH] Ensure private key flow from the mono store into the X509Certificate2 instance. Patch from bug #1201 --- .../X509Store.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs index f3e377e916b..e4e567f84ec 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs @@ -225,7 +225,9 @@ namespace System.Security.Cryptography.X509Certificates { _flags = flags; foreach (MX.X509Certificate x in store.Certificates) { - Certificates.Add (new X509Certificate2 (x.RawData)); + var cert2 = new X509Certificate2 (x.RawData); + cert2.PrivateKey = x.RSA; + Certificates.Add (cert2); } } -- 2.25.1