Converting Verisign certificate (SPC) to strong named key pair (SN

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to be able to use my Verisign certificate to strong name my
..NET assembly. Basically, I am trying to convert my SPC file into a .NET
strong named key pair (snk file).

I have read articles on forums and newsgroups explaining methods to acheive
this but none of them worked. The closest I got from generating a strong
named key pair using my certificate was following these steps:
- use pvkimprt to import my certificate in a store
- save the randomly-generated container name (guid) from the password
window
- export the strong named key pair using: sn.exe –pc <container_name>
mysnkfile.snk

Then I use this SNK file as my assembly key file and I use the following C#
code to get the public key of my assembly at runtime:
Assembly oExecutingAssembly = Assembly.GetExecutingAssembly();
byte[] abPublicKey = oExecutingAssembly.GetName().GetPublicKey();

But the public returned by this code does not match my Verisign certificate
public key.

Is this the way to do that? Is it possible to use a SPC certificate to
strong name Microsoft .NET assemblies?

Thanks,
Math
 
Back
Top