views:

406

answers:

2

I need a self-signed certificate to create a clickonce app in C++. I'm a real novice at deployment, so I'm following: How to create a self signed certificate

Here's the command sequence I've used

makecert -r -pe -n "CN=Watersteward" -ss CA -sr CurrentUser -sky signature -sv WaterSteward.pvk WaterSteward.cer
makecert -pe -n "CN=Watersteward" -sky signature -ic WaterSteward.cer -iv WaterSteward.pvk -sv WsSPC.pvk WsSPC.cer
pvk2pfx -pvk WsSPC.pvk -spc WsSPC.cer -pfx WsSPC.pfx
mage -s Alpine.exe.manifest -CertFile WsSPC.pfx

The last command to sign the manifest fails with the message:

Unable to open certificate "WsSPC.pfx": The specified network password is not correct.

I added WaterSteward.cer to the Trusted Root Certificate Authorities after creation and before going on to the next step.

During each step above, a dialog popped up asking for a password. In each case I clicked 'None' (I've also tried it with -n "CN=mydomain\mylogin" and giving my password in the dialogs.)

Thanks for any help.

A: 

did you find answer to this

Thanks Mohit s26f84 at gmail

No. I finally solved my problem another way.
Jon
A: 

Use the -pi option in pvk2pfx to provide a password for the .pfx file and then enter that password when prompted. Looks like some tools don't know how to deal with a private key without a password.

Gonzalo