[Mono-bugs] [Bug 77342][Wis] Changed - Error loading PKCS#12 with no password

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jan 25 11:11:28 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=77342

--- shadow/77342	2006-01-25 04:05:35.000000000 -0500
+++ shadow/77342.tmp.1931	2006-01-25 11:11:28.000000000 -0500
@@ -130,6 +130,64 @@
 ------- Additional Comments From khe at kmd.dk  2006-01-25 04:05 -------
 I sent you the Mono.Security.dll that has been working so far.
 It's from around Juli 1st 2005.
 I have not tried PKCS12.LoadFromFile(myPkcs12File) with this DLL, so 
 I don't know if the method is broken here also, but 
 PKCS12.LoadFromFile(myPkcs12File, "") works fine with this DLL.
+
+------- Additional Comments From sebastien at ximian.com  2006-01-25 11:11 -------
+Hello Kim,
+
+I can't duplicate your success with the provided assembly and PKCS#12
+file.
+
+Here's what I tried...
+
+First I renamed the Mono.Security.dll that you attached to
+Mono.Security.77342.dll, then I tried this small sample:
+
+---8<---8<---8<---8<---8<---8<---8<---8<---8<---
+
+using System;
+using Mono.Security.X509;
+
+class Program {
+
+	static void Main (string[] args)
+	{
+		PKCS12.LoadFromFile (args [0]);
+	}
+}
+
+---8<---8<---8<---8<---8<---8<---8<---8<---8<---
+
+I compiled the sample with a reference to the Mono.Security.77342.dll
+(which works for you).
+
+~/src/bugzilla> mcs 77342.cs -r:Mono.Security.77342.dll
+
+Then I executed it using your PKCS#12 file.
+
+~/src/bugzilla> mono 77342.exe 77342.p12
+ 
+Unhandled Exception:
+System.Security.Cryptography.CryptographicException: Invalid MAC -
+file may have been tampered!
+in <0x007a9> Mono.Security.X509.PKCS12:Decode (System.Byte[] data)
+in <0x00024> Mono.Security.X509.PKCS12:.ctor (System.Byte[] data,
+System.String password)
+in <0x0002b> Mono.Security.X509.PKCS12:LoadFromFile (System.String
+filename, System.String password)
+in <0x0001d> Program:Main (System.String[] args)
+
+I then modified the sample with:
+		PKCS12.LoadFromFile (args [0], String.Empty);
+and:
+		PKCS12.LoadFromFile (args [0], null);
+and got the same result.
+
+Is it possible that you attached the wrong Mono.Security.dll file ?
+
+To be 100% sure could you download your own attachment and repeat this
+test ?
+
+Thanks


More information about the mono-bugs mailing list