Re: strong naming fails if delay signed

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Nicole Calinoiu (calinoiu)
Date: 02/21/05


Date: Mon, 21 Feb 2005 13:55:50 -0500

David,

What you're seeing is the normal, expected behaviour. When running sn -t on
a key file, the file must contain only the public key (as extracted from a
key pair file using sn -p). The documentation on sn.exe does state this,
even if the statement is rather easy to miss.

HTH,
Nicole

"David Thielen" <thielen@nospam.nospam> wrote in message
news:9A1A728C-0761-454D-B5E4-0E7E0D028A6F@microsoft.com...
> That's what I thought too. So I did sn -Tp on the assembly each step of
> the
> process - and it was always the same token.
>
> One weird thing though - sn -t on my public key matches the token for
> sn -T
> on the dll. But sn -t on the keypair is a different token.
>
> I just ran "sn -p keypair.snk public.snk" and still the different tokens
> between the two files. Is that a problem?
>
> thanks - dave
>
>
> "Steven Cheng[MSFT]" wrote:
>
>> Hi Dave,
>>
>> Thanks for your posting. As for the delaysign/Resign problem you
>> mentioned,
>> I think it is possible that the delaysigned public key is not
>> corresponding
>> to the privatekey when we resign it. Have you tried testing on some other
>> assemblies and key pairs. Or would provide the detailes steps when you
>> generate the key pair, delaysign the assembly , and resigen them with
>> which
>> key file(with private key info)?
>> From my local test, the delaysign/resign works correctly without any
>> problem, so I think the problem is still something with the key pair
>> info.
>>
>> If any other questions or finding, please feel free to post here.
>>
>> Thanks & Regards,
>>
>> Steven Cheng
>> Microsoft Online Support
>>
>> Get Secure! www.microsoft.com/security
>> (This posting is provided "AS IS", with no warranties, and confers no
>> rights.)
>>
>>



Relevant Pages

  • Re: When to use Public/Private Key & when to gen new one?
    ... The key pair is uniquely bound to each other: you can't have one private key ... options for extracting the public key, but not one for 'build new public key ... I was including in assemblies whatever it had spat one ... probably keep the same snk file across various builds of an assembly, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: problem with StrongNameIdentityPermissionAttribute
    ... I suppose this because it doesn't matter If I use the public key ... key blob (the one from my assemblies) or the right one (from Microsoft WSE ... Request for the permission of type ... > not perform any checks at all, it is used to modify stack walk behavior. ...
    (microsoft.public.dotnet.security)
  • Re: how to ensure only strong name assemblies are loaded with matching public key
    ... assembly for introspection, which means that you can inspect its metadata (including the public key), but cannot execute any code. ... >Subject: Re: how to ensure only strong name assemblies are loaded with matching public key ... >assumption is that one would load an assembly to use it, ... >>>special directory containing updates to the client software. ...
    (microsoft.public.dotnet.security)
  • Re: Best ways to manage strongname keys/key files?
    ... We use the same key pair for all projects. ... assemblies (not with BizTalk), we played for a while with delay signing, ... using relative paths to a common key file ...
    (microsoft.public.biztalk.general)
  • Re: Another StrongNameIdentityPermission/LinkDemand question
    ... If you are planning to do this to "keep the honest people honest", ... serve as a mild deterrent. ... public key and achieve my original purpose that way. ... caller only trusted assemblies, and it seems like this should work. ...
    (microsoft.public.dotnet.security)