[Mono-bugs] [Bug 79269][Nor] Changed - [2.0] X509Certificate2.PrivateKey only contains the public key when loaded from a PKCS12 file
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Sep 5 10:48:56 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 sebastien at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=79269
--- shadow/79269 2006-09-05 10:11:20.000000000 -0400
+++ shadow/79269.tmp.13784 2006-09-05 10:48:56.000000000 -0400
@@ -11,13 +11,13 @@
AssignedTo: sebastien at ximian.com
ReportedBy: atsushi at ximian.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: [2.0] NRE in RSACryptoServiceProvider.Decrypt() for X509Certificate2.PrivateKey
+Summary: [2.0] X509Certificate2.PrivateKey only contains the public key when loaded from a PKCS12 file
The following code causes a NullReferenceException with the attached
certificate.
using System;
using System.Security.Cryptography;
@@ -115,6 +115,12 @@
@"YgyAhscnTTIcDeLJTZcOYYyHVxNhV6d03jeZYjq0sPMEsfCCbE/NcFyYHD9BTuiduqPplCLbGpfZIZYJ6vAP9m5z4Q9eEw79kmEFCsm8wSKEo/gKiptVpwQ78VOPrWd/wEkTTeeg2nVim3JIsTKGFlV7rKxIWQhGN9aAqgP8nZI=";
byte [] bytes = Convert.FromBase64String (b64);
csp.Decrypt (bytes, true);
}
}
+
+------- Additional Comments From sebastien at ximian.com 2006-09-05 10:48 -------
+The NRE is fixed in SVN r64939 with new unit test in r64940. It will
+now throw a CryptographicException saying that the private key is missing.
+
+Updating the bug summary for the second-half of the problem.
More information about the mono-bugs
mailing list