Reputation: 703
I need a self-signed certificate to create a ClickOnce application in C++. I'm a real novice at deployment, so I'm following Stack Overflow question 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).
Upvotes: 3
Views: 2281
Reputation: 285
This blog helped me a lot : How to create certificates for development
The last step in signing the manifest - which is not mentioned in the blog - was straightforward: in your case
mage -s Alpine.exe.manifest -CertFile WsSPC.pfx
Upvotes: 0
Reputation: 11877
I would just run Visual Studio, go to the project properties, go to the Signing tab, and click Create Test Certificate. Be sure to check the box to sign the application, and to go to Security and turn on the ClickOnce security settings.
Upvotes: 1