Re: Convert .spc and .pvk files into snk file

From: Michel Gallant (neutron_at_istar.ca)
Date: 05/05/04


Date: Wed, 5 May 2004 15:58:41 -0400

By default sn.exe only looks for Machine keycontainers. Check this by executing:
   sn -m

You can force sn.exe to look for CU keys (probably what you have generated) rather
than Machine keys by executing:
  sn -m n

You might also want to reset the default Strong Name CSP by executing:
  sn - c

- Mitch Gallant
   MVP Security

"James Mills" <andre@ipmouse.com> wrote in message
news:466f427b.0405051049.2a444b13@posting.google.com...
> Hello,
>
> I'm trying to use .spc and pvk filse to sign my assemblies. I don't
> want to use codesign utility, instead I'd like to import signing cert
> into container with specific name and specify this conteiner in
> AssemblyKeyName attribute.
> So far, the alghoritm I developed after searching in Google looks
> like one below:
>
> 1) Use pvkimprt.exe to import .spc file in storage with some
> random-named container - done. Generated container name
> 9856E6C5-6819-4c50-94BB-47916DC5BC62
>
> 2) Now I should be able to use command sn.exe -pc
> 9856E6C5-6819-4c50-94BB-47916DC5BC62 mysnkfile.snk to create snk file.
> And this is not working.
> I'm getting error "Keyset dose not exist". Even I know that container
> is exists, because I can call signcode.exe -spc mykey.spc -k
> 9856E6C5-6819-4c50-94BB-47916DC5BC62 myassembly.dll and it works.
>
> What I'm doing wrong? Or may be there is another way to do it that
> I'm not aware of?
>
> Thank you,
> JM



Relevant Pages

  • Re: Complex Problem with AppDomains, Assembly Loading Contexts and COM Interop
    ... ..Net assemblies get loaded by the CLR as the result of interop, ... and this allows us to load the assemblies into the Load context. ... default load context and in another is reachable only via the LoadFrom ... effectively executing LoadFrom? ...
    (microsoft.public.dotnet.framework.clr)
  • Re: ADSI through Win32::OLE
    ... my config and make changes to the existing keys. ... Is the result of executing "Create" twice with the same key name (here ... it a second time but with a different string ie not "NewVDir"? ... I tried to turn warnings on but I still don't get any output ...
    (comp.lang.perl.misc)
  • Re: dynamic reflection from xml file security
    ... > the assembly full permission for executing. ... The only assemblies would be framework assemblies ... page as well as setting properties of that control thru the xml. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Best practices on assembly references?
    ... I could place these other assemblies in the GAC, ... > I cannot use an application configuration file. ... > a path relative to the executing assembly (e.g. the one that got loaded by ... > office addin scenario); if there is a means of loading a managed assembly ...
    (microsoft.public.dotnet.framework)
  • RE: Reflection across all assemblies
    ... return those assemblies that has been loaded into the AppDomain's execution ... referenced assemblies of the current executing assembly(for most ... in the assemblies' static reference list. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework)

Quantcast