[Mono-bugs] [Bug 79357][Nor] New - [PATCH] implement HasPrivateKEy and don't return X509Certificate2.PrivateKey when it does not contain private key

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Sep 11 10:53:05 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79357

--- shadow/79357	2006-09-11 10:53:05.000000000 -0400
+++ shadow/79357.tmp.26080	2006-09-11 10:53:05.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 79357
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: sebastien at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] implement HasPrivateKEy and don't return X509Certificate2.PrivateKey when it does not contain private key
+
+As the summary suggests...
+
+--------
+using System;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Security.Cryptography.Xml;
+using System.Xml;
+
+public class Test
+{
+        public static void Main ()
+        {
+                X509Certificate2 cert =
+                        new X509Certificate2 ("test2.cer");
+                Console.WriteLine (cert.PrivateKey == null);
+        }
+}
+
+(try arbitrary valid .cer file here.)
+
+Actual Results:
+FALSE
+
+Expected Results:
+TRUE
+
+How often does this happen? 
+consistently.
+
+Additional Information:
+
+patch for X509Certificate2.cs and X509Certificate2Test.cs being attached.


More information about the mono-bugs mailing list