[Mono-bugs] [Bug 49555][Nor] New - private extern Assembly LoadAssembly (AssemblyName assemblyRef, Evidence securityEvidence) does not expose strongname publickey

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Oct 2003 11:58:19 -0400 (EDT)


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 spouliot@videotron.ca.

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

--- shadow/49555	2003-10-11 11:58:18.000000000 -0400
+++ shadow/49555.tmp.20043	2003-10-11 11:58:18.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 49555
+Product: Mono/Runtime
+Version: unspecified
+OS: All
+OS Details: Need windows to compare results
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: spouliot@videotron.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: private extern Assembly LoadAssembly (AssemblyName assemblyRef, Evidence securityEvidence) does not expose strongname publickey
+
+Description of Problem:
+
+This code just don't work (or is incomplete) using Mono
+
+using System;
+using System.Reflection;
+
+public class MainClass {
+	public static void Main (string[] args)
+	{
+		AssemblyName an = AssemblyName.GetAssemblyName (args [0]);
+		Console.WriteLine (an.GetPublicKey ().Length);
+	}
+}
+
+Steps to reproduce the problem:
+1. compile snkey.cs (using MCS or CSC)
+2. execute snkey.exe passing a strongnamed assembly as the parameter
+   snkey helloworld.exe
+   or
+   mono snkey.exe
+
+
+Actual Results:
+Using Microsoft runtime: 160
+Using Mono runtime: 0
+
+
+Expected Results:
+Both runtime should return 160
+
+How often does this happen? 
+Always
+
+
+Additional Information:
+
+AssemblyName an = AssemblyName.GetAssemblyName (assemblyName);
+Console.WriteLine (an.GetPublicKey ().Length);
+
+public static AssemblyName GetAssemblyName (string assemblyFile)
+
+	calls into public static Assembly Load (String assemblyString)
+
+		calls into AppDomain.Load (AssemblyName, Evidence)
+
+		calls into public Assembly Load (string assemblyString)
+		then into public Assembly Load (string assemblyString, 
+Evidence assemblySecurity)
+		which (almost) finally calls into the runtime 
+
+[MethodImplAttribute (MethodImplOptions.InternalCall)]
+private extern Assembly LoadAssembly (AssemblyName assemblyRef, Evidence 
+securityEvidence);