Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import Signing Certificate is Failing

I am attempting to create a certificate with a private key (.pfx) that I can use within my application to create and verify digital signatures. I want to install this certificate into the certificate store (Windows).

I am having issues importing the certificate onto my local machine. The certificate import wizard is always reporting 'The password you entered is incorrect'. This is referring to the password for the private key in the pfx file I have created.

Now I know for a fact that the password is correct, so there must be some other factor in play here.

The script I am using to create the key is with a batch file and contains the following command:

makecert -r -pe -n "CN=%1" -b 01/01/2010 -e 01/01/2060 -sky signature %1.cer -sv %1.pvk
pvk2pfx.exe -pvk %1.pvk -spc %1.cer -pfx %1.pfx

Does anyone know what could be causing the import wizard to tell me 'The password you entered is incorrect'?

like image 912
Mark W Avatar asked Jul 17 '15 10:07

Mark W


People also ask

How do I import a signing certificate?

On the Certificate Store page, select Automatically select the certificate store based on the type of certificate and then click Next. On the Completing the Certificate Import Wizard page, review the settings and then click Finish. When you receive "The import was successful" message, click OK.

How do you fix the certificate is not trusted because it is self signed?

You need to import the root certificate into the trust store for the browser. Once the browser knows you trust this root certificate, all certificates signed by this will show up as trusted.


1 Answers

As MarkW pointed out, try entering the password into the command line instead of typing into the dialog, eg:

pvk2pfx -pvk Test.pvk -pi p4sswd -spc Test.cer -pfx Test.pfx -po p4sswd

like image 139
T800 Avatar answered Sep 23 '22 13:09

T800