Microsoft > Forums Home > Using Forums Forums > Off-Topic Posts (Do Not Post Here) > The password is incorrect when import pfx certificate into certificate store

Answered The password is incorrect when import pfx certificate into certificate store

  • Friday, September 04, 2009 3:47 AM
     
     
    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 07, 2009 4:04 AM (From:Visual C# General)
    •  

Answers

  • Wednesday, February 24, 2010 7:01 AM
     
     Answered

    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
    •  

All Replies

  • Monday, September 07, 2009 4:04 AM
     
     
    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.
  • Tuesday, January 12, 2010 5:13 PM
     
     
    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.
  • Friday, January 15, 2010 2:18 AM
     
     
    Hi, bsayatovic

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

    I will reply this later!
  • Wednesday, February 24, 2010 7:01 AM
     
     Answered

    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
    •  
  • Saturday, March 20, 2010 8:54 AM
     
     

    Thank you very muchhhh Agung, that works!

    You rock, buddy!