HowTo import Certificate (pfx) with private key in WinXP

Posted by Gunther on Super User See other posts from Super User or by Gunther
Published on 2010-01-14T16:53:24Z Indexed on 2010/03/27 0:03 UTC
Read the original article Hit count: 675

Filed under:
|
|

Hello,

I tried the whole day just to import a cetrificate in winXP, but I allways failed. I did following:

  1. Create the certificate with private key (no pasword):

    makecert -sr LocalMachine -ss My -pe -sky exchange -n "CN=TestCert" -a sha1 -sv TestCert.pvk TestCert.cer
  2. Then put certificate and private key together into pfx file:

    pvk2pfx.exe -pvk TestCert.pvk -spc TestCert.cer -pfx TestCert.pfx
  3. Import pfx file with commandline tool (German System):

    winhttpcertcfg.exe -i TestCert.pfx -a NT-AUTORITÄT\NETZWERKDIENST -c LOCAL_MACHINE\My
    Error:  Unable to import contents of PFX file.
        Please make sure the filename and path,
        as well as the password, are correct.

    Hint: "NT-AUTORITÄT\NETZWERKDIENST" --> "NT-AUTHORITY\NETWORKSERVICE"
    Filename is ok, password was not set. Even if I set the password (e.g. "MyPassword") in Step 1 and type at the end of step 3:

    ... -p MyPassword

    I got the same error. Then I tried to import in the certificate console (mmc with certificate snap-in). There i got following error: "Der private Schlüssel, den Sie importieren, erfordert möglicherweise einen Dienstanbieter, der nicht installiert ist." --> "The imported private key may requires a service-supplier which is not installed". But the Microsoft Crypto-Service is up and running.

What else can I do?
On Windows Vista and Windows 7 I got this running without these problems.
I need this Certificate to run a WCF Service.

Thanks in advance for any hint.

Regards,
Gunther

© Super User or respective owner

Related posts about windows-xp

Related posts about certificate