[Mono-bugs] [Bug 49555][Nor] Changed - 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 12:39:26 -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 12:08:33.000000000 -0400
+++ shadow/49555.tmp.20333	2003-10-11 12:39:26.000000000 -0400
@@ -2,23 +2,22 @@
 Product: Mono/Runtime
 Version: unspecified
 OS: All
 OS Details: Need windows to compare results
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 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
-OtherBugsDependingOnThis: 49542
 
 Description of Problem:
 
 This code just don't work (or is incomplete) using Mono
 
 using System;
@@ -68,6 +67,39 @@
 Evidence assemblySecurity)
 		which (almost) finally calls into the runtime 
 
 [MethodImplAttribute (MethodImplOptions.InternalCall)]
 private extern Assembly LoadAssembly (AssemblyName assemblyRef, Evidence 
 securityEvidence);
+
+------- Additional Comments From spouliot@videotron.ca  2003-10-11 12:39 -------
+this is from in /mono/mono/metadata/assembly.c
+
+	if (t->rows) {
+		mono_metadata_decode_row (t, 0, cols, 
+MONO_ASSEMBLY_SIZE);
+		
+		ass->aname.hash_len = 0;
+		ass->aname.hash_value = NULL;
+		ass->aname.name = mono_metadata_string_heap (image, 
+cols [MONO_ASSEMBLY_NAME]);
+		ass->aname.culture = mono_metadata_string_heap 
+(image, cols [MONO_ASSEMBLY_CULTURE]);
+		ass->aname.flags = cols [MONO_ASSEMBLY_FLAGS];
+		ass->aname.major = cols 
+[MONO_ASSEMBLY_MAJOR_VERSION];
+		ass->aname.minor = cols 
+[MONO_ASSEMBLY_MINOR_VERSION];
+		ass->aname.build = cols [MONO_ASSEMBLY_BUILD_NUMBER];
+		ass->aname.revision = cols 
+[MONO_ASSEMBLY_REV_NUMBER];
+	}
+
+my guess is that the publickey, or depending on the assembly the 
+publickeytoken, should be loaded at this step to the class library 
+can then use it.
+
+Note: We'll (eventually) need to check the signature (using this 
+public key) and throw an exception if the signature can't be 
+validated. Most of the code for doing so is in the class library. 
+Where should the validation/exception be thrown ? the managed class 
+library or the unmanaged runtime ?