Bug 316493 (MONO69721) - [PATCH] Add /key switch to ilasm
Summary: [PATCH] Add /key switch to ilasm
Status: RESOLVED FIXED
Alias: MONO69721
Product: Mono: Compilers
Classification: Mono
Component: IL assembler (show other bugs)
Version: 1.0
Hardware: Other All
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Jackson Harper
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-20 00:03 UTC by Kamil Skalski
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
ilasm patch (4.92 KB, patch)
2004-12-07 23:21 UTC, Thomas Wiest
Details | Diff
peapi.dll patch (6.65 KB, patch)
2004-12-07 23:21 UTC, Thomas Wiest
Details | Diff
ilasm 1.0.x patch (7.62 KB, patch)
2004-12-08 15:56 UTC, Thomas Wiest
Details | Diff
peapi.dll 1.0.x patch (16.86 KB, patch)
2004-12-08 15:56 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:59:17 UTC


---- Reported by nazgul@omega.pl 2004-11-19 17:03:33 MST ----

Description of Problem:
It would be good to have /key switch in ilasm (just like the MS.NET ilasm
tool) to be able to sign assemblies generated from IL.
It would allow us to fully reassemble Nemerle dlls from 1.1 to 2.0 runtime
versions without even loosing keyfile information.

Additional Information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconmsilassemblerilasmexe.asp



---- Additional Comments From sebastien@ximian.com 2004-11-22 15:42:27 MST ----

Mono's Ilasm doesn't use AssemblyBuilder so it can't use corlib
built-in code to strongname an assembly. So it must either:

(a) link Mono.Security.dll assembly; or
(b) copy the CryptoConvert and StrongName classes from Mono.Security;

and sign the generated assembly once it's saved to disk.



---- Additional Comments From sebastien@ximian.com 2004-12-02 22:02:59 MST ----

Notes
* Delay signing "works" [*] right now (using the .publickey directive);

* Using /key=unexistingfile.snk doesn't report any error, nor any
warning, using ilasm if the assembly to be signed doesn't already have
it's public key embedded (.publickey).

* Using /key=valid.snk doesn't sign the assembly if it doesn't have
the .publickey within (i.e. the public key embedded).


[*] I say "works" because SN cannot sign the assembly. Well it can
sign it but the assembly becomes unusable afterward. Maybe the space
for the signature isn't reserved ?



---- Additional Comments From sebastien@ximian.com 2004-12-06 22:52:21 MST ----

PEAPI.cs line 3329 (in BuildTextSection)

// strongNameSig = metaData.GetStrongNameSig();


I guess that's a good reason. Sadly the neither the variable nor the
method are declared.



---- Additional Comments From sebastien@ximian.com 2004-12-07 16:21:07 MST ----

Created an attachment (id=167068)
ilasm patch




---- Additional Comments From sebastien@ximian.com 2004-12-07 16:21:37 MST ----

Created an attachment (id=167069)
peapi.dll patch




---- Additional Comments From sebastien@ximian.com 2004-12-07 16:24:20 MST ----

Ready for review / testing.



---- Additional Comments From sebastien@ximian.com 2004-12-08 08:55:35 MST ----

Commited to HEAD.



---- Additional Comments From sebastien@ximian.com 2004-12-08 08:56:21 MST ----

Created an attachment (id=167070)
ilasm 1.0.x patch




---- Additional Comments From sebastien@ximian.com 2004-12-08 08:56:49 MST ----

Created an attachment (id=167071)
peapi.dll 1.0.x patch




---- Additional Comments From sebastien@ximian.com 2004-12-08 08:57:54 MST ----

MONO-1-0 ILASM/PEAPI isn't up to date with HEAD. So I've attached a
new set of patch which brings MONO-1-0 up to HEAD status. 

Jackson could you look if part of it shouldn't go in MONO-1-0 or if
it's ok to bring it all down ?



---- Additional Comments From jankit@novell.com 2005-08-02 03:24:01 MST ----

Closing this as we no longer support mono 1.0.x branch.

Imported an attachment (id=167068)
Imported an attachment (id=167069)
Imported an attachment (id=167070)
Imported an attachment (id=167071)