[Mono-bugs] [Bug 75781][Nor] Changed - Problem with feeding pre-encoded X509 extensions into Mono

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 4 15:02:35 EST 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=75781

--- shadow/75781	2005-08-11 08:26:06.000000000 -0400
+++ shadow/75781.tmp.5273	2006-01-04 15:02:35.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 75781
 Product: Mono: Class Libraries
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: FIXED
 Severity: Unknown
 Priority: Normal
 Component: Mono.Security
 AssignedTo: sebastien at ximian.com                            
 ReportedBy: dgranath at gmail.com               
 QAContact: mono-bugs at ximian.com
@@ -32,6 +32,36 @@
 
 3) get DER encoding of Mono extension
   byte der = monoExt.ASN1.GetBytes()
 
 ------- Additional Comments From sebastien at ximian.com  2005-08-11 08:26 -------
 Known problem, sadly the "right" fix introduce problem with existing code.
+
+------- Additional Comments From sebastien at ximian.com  2006-01-04 15:02 -------
+The problem is that Encode and Decode weren't symmetric :( wrt the
+octet stream. E.g.
+
+using System;
+using Mono.Security;
+using Mono.Security.X509;
+using Mono.Security.X509.Extensions;
+
+class Program {
+
+	static void Main ()
+	{
+		KeyUsageExtension kue = new KeyUsageExtension ();
+		ASN1 asn1 = kue.ASN1;
+		Console.WriteLine ("1- {0}", BitConverter.ToString (asn1.GetBytes ()));
+
+		kue = new KeyUsageExtension (kue);
+		asn1 = kue.ASN1;
+		Console.WriteLine ("2- {0}", BitConverter.ToString (asn1.GetBytes ()));
+
+		kue = new KeyUsageExtension (asn1);
+		asn1 = kue.ASN1;
+		Console.WriteLine ("3- {0}", BitConverter.ToString (asn1.GetBytes ()));
+	}
+}
+
+
+Fixed in SVN (r55061 + r55063).


More information about the mono-bugs mailing list