Import Private Keys

B

BobS

I need a way to import a private key pair from a PFX file from either a
script, or from a command line. Anybody have any suggestions.

Bob
 
T

Torgeir Bakken \(MVP\)

BobS said:
I need a way to import a private key pair from a PFX file from either
a script, or from a command line. Anybody have any suggestions.
Hi

You can use the command line utility certmgr.exe for this, a
cryptoAPI/Authenticode tool from MS.

To add a certificate to the "Trusted Root Certification Authorities"
in localMachine:

certmgr.exe -add -c "<cert-file>" -s -r localMachine root

where <cert-file> is the path to the certificate file.


Current users personal certificate store command line:
http://groups.google.com/[email protected]


Download certmgr.exe from:

Authenticode for Internet Explorer 5.0
http://www.microsoft.com/downloads/...95-d0f0-4a66-b27f-22a95fcd3425&displaylang=en


More information can be found here:

Certificate Manager Tool (Certmgr.exe)
http://msdn.microsoft.com/library/d...tml/cpgrfcertificatemanagertoolcertmgrexe.asp

Using CertMgr
http://msdn.microsoft.com/library/en-us/security/security/using_certmgr.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top