"makecert.exe -sk" - Specify Private Key Container

Q

How to specify a private key container the "makecert.exe" command? I want to keep the private in my private key container.

✍: FYIcenter.com

A

You can the private key container name using the "-sk name" option as shown in this tutorial.

C:\fyicenter>
"\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\makecert.exe" 
-n "CN=Joe Dews" -sk TestKey joe.crt

Succeeded

C:\fyicenter>
"\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\makecert.exe" 
-n "CN=Jack Dews" -sk TestKey jack.crt

Succeeded

C:\fyicenter>type 
\users\fyicenter\AppData\Roaming\Microsoft\Crypto\RSA\S-1-5-22-602162358-...
8cad2f31f91883d57911489b2e636d_e...

.....................................TestKey.....................RSA1...........
...

What you are getting from this tutorial:

  • The first "makecert.exe" command created a new private key container named as "TestKey" in my home folder to hold a new private key generated by the command.
  • The second "makecert.exe" command reused the private key in the container named as "TestKey".
  • The "type" command was used to show you the container name, "TestKey", in the private key container file.

Knowing where the private key is stored is important. You need to use private key to sign documents or encrypt data files.

 

Certificate Generation Tool "makecrt.exe" on Windows

⇒⇒Windows Certificates Tutorials

2012-08-09, 6480👍, 0💬