#595 signing satellite resource assemblies

closed-fixed
Tasks (408)
5
2007-01-12
2006-10-31
No

When the attribute "keyfile" is used for the csc task
it won't be applied to the call to the "al" command
line tool for building satellite resource assemblies.

The attached file contains a patch
for "CompilerBase.cs" in its current version.

Discussion

  • Gert Driesen

    Gert Driesen - 2006-10-31

    Logged In: YES
    user_id=707851

    Correct me if I'm wrong, but we pass the built assembly as template to al. So the satellite assembly should automatically
    obtain the complete identity from it.

    Do you have a small repro for this ?

     
  • Volker Schoenharting

    Logged In: YES
    user_id=211423

    Using templates one can only supply information such as
    version numbers etc.
    On general principles it must not be possible to extract the
    information necessary to sign an assembly (i.e. the private
    key) from another assembly.

     
  • Gert Driesen

    Gert Driesen - 2006-10-31
    • assigned_to: nobody --> drieseng
    • status: open --> closed-works-for-me
     
  • Gert Driesen

    Gert Driesen - 2006-10-31

    Logged In: YES
    user_id=707851

    I cannot reproduce this here. In the test case I used, the satellite assembly gets signed just fine.

    Please reopen the bug report if you have a repro you can share.

     
  • Volker Schoenharting

    Logged In: YES
    user_id=211423

    I have attached a small project that produces the error.

    The following shows the output of nant (see also the
    "nant.output.txt" file):

    E:\Projects\SignTest>nant
    NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006)
    Copyright (C) 2001-2006 Gerry Shaw
    http://nant.sourceforge.net

    Buildfile: file:///E:/Projects/SignTest/SignTest.build
    Target framework: Microsoft .NET Framework 2.0
    Target(s) specified: build

    prepare:

    [mkdir] Creating directory 'E:\Projects\SignTest\build'.

    build:

    [csc] Compiling 3 files to
    'E:\Projects\SignTest\build\SignTest.dll'.
    [resgen] Read in 1 resources from
    "E:\Projects\SignTest\Resources\Resource.resx"
    [resgen] Writing resource file... Done.
    [resgen] Read in 1 resources from
    "E:\Projects\SignTest\Resources\Resources.de.resx"
    [resgen] Writing resource file... Done.
    [al] Compiling 1 files to
    'E:\Projects\SignTest\build\de\SignTest.resources.dll'.

    BUILD SUCCEEDED

    Total time: 0.9 seconds.

    E:\Projects\SignTest>sn -T build\SignTest.dll

    Microsoft (R) .NET Framework Strong Name Utility Version
    2.0.50727.42
    Copyright (c) Microsoft Corporation. All rights reserved.

    Public key token is 8bfff3725ef78b4d

    E:\Projects\SignTest>sn -T build\de\SignTest.resources.dll

    Microsoft (R) .NET Framework Strong Name Utility Version
    2.0.50727.42
    Copyright (c) Microsoft Corporation. All rights reserved.

    build\de\SignTest.resources.dll does not represent a
    strongly named assembly

    E:\Projects\SignTest>

     
  • Volker Schoenharting

    • status: closed-works-for-me --> open-works-for-me
     
  • Gert Driesen

    Gert Driesen - 2007-01-07

    Logged In: YES
    user_id=707851
    Originator: NO

    I finally had time to look into this a little further, and this is what I noticed:

    If the keyfile is specified using an AssemblyKeyFileAttribute, then the assembly linker (al.exe) will use the filename that was specified there for signing the satellite assembly.

    So, you're correct in stating that we need to pass the /keyfile option to al.exe to sign satellite assemblies (that were signed using /keyfile option). I'll fix this asap.

     
  • Gert Driesen

    Gert Driesen - 2007-01-07
    • status: open-works-for-me --> open-accepted
     
  • Gert Driesen

    Gert Driesen - 2007-01-12

    Logged In: YES
    user_id=707851
    Originator: NO

    Fixed in cvs.

    Thanks for the report !

     
  • Gert Driesen

    Gert Driesen - 2007-01-12
    • status: open-accepted --> closed-fixed
     
  • Goodwill

    Goodwill - 2007-03-03

    Logged In: YES
    user_id=1091620
    Originator: NO

    Is that being included in the latest nightly? I tried and it still fails somehow. I verified again and the satellite assembly are still not signed.

     
  • Gert Driesen

    Gert Driesen - 2007-03-11

    Logged In: YES
    user_id=707851
    Originator: NO

    It should indeed work fine with a recent nightly build. Do you have a repro you can share ?

     
  • Goodwill

    Goodwill - 2007-03-11

    Logged In: YES
    user_id=1091620
    Originator: NO

    I am building castle project. I think this simple issue could be tested with a simple project though... Have you ever tried to build a really simple project and then use sn.exe to verify the signature?

     
  • Gert Driesen

    Gert Driesen - 2007-03-11

    Logged In: YES
    user_id=707851
    Originator: NO

    Yeah, of course. I have a local test for this issue which works just fine (and verifies using sn).

    Can you attach a "simple project" ?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks