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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top