2004-01-26 Sebastien Pouliot <spouliot@videotron.ca>
authorSebastien Pouliot <sebastien@ximian.com>
Mon, 26 Jan 2004 14:35:45 +0000 (14:35 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Mon, 26 Jan 2004 14:35:45 +0000 (14:35 -0000)
* AssemblyBuilder.cs: Save will now strongname the assembly is (a) a
StrongName is present and (b) the signature isn't delayed.

svn path=/trunk/mcs/; revision=22492

mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ChangeLog

index 39d3af4ff275d92c6c493dc7fc51bbee669e8cd9..cb25d5a229cfee7c2e6ce3e1dc5c2ea6767f7e63 100755 (executable)
@@ -85,6 +85,7 @@ namespace System.Reflection.Emit {
                Win32VersionResource version_res;
                bool created;
                bool is_module_only;
+               private Mono.Security.StrongName sn;
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                private static extern void basic_init (AssemblyBuilder ab);
@@ -574,6 +575,11 @@ namespace System.Reflection.Emit {
                        // contain the hash of the other modules
                        mainModule.Save ();
 
+                       // if not delayed then we directly strongname the assembly
+                       if ((sn != null) && (!delay_sign)) {
+                               sn.Sign (System.IO.Path.Combine (this.AssemblyDir, assemblyFileName));
+                       }
+
                        created = true;
                }
 
@@ -601,7 +607,7 @@ namespace System.Reflection.Emit {
                        string attrname = customBuilder.Ctor.ReflectedType.FullName;
                        byte[] data;
                        int len, pos;
-                       Mono.Security.StrongName sn;
+
                        if (attrname == "System.Reflection.AssemblyVersionAttribute") {
                                version = create_assembly_version (customBuilder.string_arg ());
                                return;
index 74a461fd77a7961d822636b4dd26229bb3d5ff7a..8bc531aacaf6b35af5da6bb44683b28d4769186a 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-26  Sebastien Pouliot  <spouliot@videotron.ca>
+
+       * AssemblyBuilder.cs: Save will now strongname the assembly is (a) a
+       StrongName is present and (b) the signature isn't delayed.
+
 2004-01-24 David Sheldon <dave-mono@earth.li>
 
        * AssemblyBuilder.cs: Added override for GetFiles() that throws