none
The password is incorrect when import pfx certificate into certificate store RRS feed

  • Question

  • Hi everyone

    I used the following command to create a pfx file:

    makecert.exe -r -pe -sky exchange -n "CN=MyTestClient.com" MyTestClient.cer -sv MyTestClient.pvk
    pvk2pfx.exe -pvk MyTestClient.pvk -spc MyTestClient.cer -pfx MyTestClient.pfx

    In the process, I am forced to enter the private key password, and I entered the same password.

    After that, I use mmc to import the pfx file into root store and again, the prompt dialog appeared and forced me to enter private key password, I enter the same password as before, however, a error dialog showed and indicating the password is incorrect.

    What is the problem??
    Can anyone help?

    Thanks~

    Deepblue 
    • Moved by Harry Zhu Monday, September 7, 2009 4:04 AM (From:Visual C# General)
    Friday, September 4, 2009 3:47 AM

Answers

  • Hi,

    My case could be different. However I found the similar issue and it is getting solved. 

    It works properly by passing the password into the command instead of supplying it on the dialog.

    I did these:
    1. makecert -sv MyTestClient.pvk -n "CN=MyTestClient.com" MyTestClient.cer
    2. set the private password, e.g. p4sswd
    3. pvk2pfx -pvk MyTestClient.pvk -pi "p4sswd" -spc MyTestClient.cer -pfx MyTestClient.pfx -po "p4sswd"

    Hopefully it is helpful

    Agung

    • Marked as answer by deepblue2009 Saturday, March 20, 2010 8:54 AM
    Wednesday, February 24, 2010 7:01 AM

All replies

  • Hi,

    The question relating to makecert.exe is beyond the scope of c# forum, I'm going to move the thread to off-topic forum.

    Please try to post to .net framework tool newsgroup , you will get better answer from experts there:
    http://www.microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.dotnet.framework.sdk

    Harry
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, September 7, 2009 4:04 AM
  • DeepBlue, did you ever find a solution?  I'm having this exact same problem, and yours is the ONLY post I could find via Google that describes the same problem.
    Tuesday, January 12, 2010 5:13 PM
  • Hi, bsayatovic

    I will try to figure out this in the weekend,
    I guess I have solved that.

    I will reply this later!
    Friday, January 15, 2010 2:18 AM
  • Hi,

    My case could be different. However I found the similar issue and it is getting solved. 

    It works properly by passing the password into the command instead of supplying it on the dialog.

    I did these:
    1. makecert -sv MyTestClient.pvk -n "CN=MyTestClient.com" MyTestClient.cer
    2. set the private password, e.g. p4sswd
    3. pvk2pfx -pvk MyTestClient.pvk -pi "p4sswd" -spc MyTestClient.cer -pfx MyTestClient.pfx -po "p4sswd"

    Hopefully it is helpful

    Agung

    • Marked as answer by deepblue2009 Saturday, March 20, 2010 8:54 AM
    Wednesday, February 24, 2010 7:01 AM
  • Thank you very muchhhh Agung, that works!

    You rock, buddy!

    Saturday, March 20, 2010 8:54 AM
  • CERTUTIL -f -p somePassword -importpfx "somePfx.pfx"

    works for me on windows server 2008 r2.

    From https://stackoverflow.com/questions/5171117/import-pfx-file-into-particular-certificate-store-from-command-line


    • Edited by GuYuming Monday, April 1, 2019 1:33 PM
    Monday, April 1, 2019 1:33 PM