certmgr.exe - Create Certificate Store Files

Q

How to create my own certificate store file using "certmgr.exe" tool?

✍: FYIcenter.com

A

You can your own certificate store file using "certmgr.exe" tool as shown in this tutorial.

C:\fyicenter>
"\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\certmgr.exe" 
-put -c -s CA Microsoft_Expired.crt

==============Certificate # 1 ==========
...
==============Certificate # 12 ==========
Subject::
[0,0] 2.5.4.11 (OU) Copyright (c) 1997 Microsoft Corp.
[1,0] 2.5.4.11 (OU) Microsoft Windows Hardware Compatibility Intermediate CA
[2,0] 2.5.4.11 (OU) Microsoft Corporation
[3,0] 2.5.4.3 (CN) Microsoft Windows Hardware Compatibility
Issuer::
  [0,0] 2.5.4.11 (OU) Copyright (c) 1997 Microsoft Corp.
  [1,0] 2.5.4.11 (OU) Microsoft Corporation
  [2,0] 2.5.4.3 (CN) Microsoft Root Authority
SerialNumber::
   19 8B 11 D1 3F 9A 8F FE 69 A0
SHA1 Thumbprint:: 
      109F1CAE D645BB78 B3EA2B94 C0697C74 0733031C 
MD5 Thumbprint:: 
      09C254BD E4EA50F2 6D1497F2 9C51AF6D 
Key MD5 Thumbprint:: 
      BB77D6CE 04FFF6B2 0F8315B9 40C20461 
NotBefore:: 
  Wed Oct 01 03:00:00 1997
NotAfter:: 
  Tue Dec 31 03:00:00 2002
==============Certificate # 13 ==========
...
Enter cert # from the above list to put-->12
CertMgr Succeeded

C:\fyicenter>
"\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\certmgr.exe" 
-add -c Microsoft_Expired.crt StoreFile.str

CertMgr Succeeded

C:\fyicenter>
"\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\certmgr.exe" 
StoreFile.str

==============Certificate # 1 ==========
...
CertMgr Succeeded

What you are getting from this tutorial:

  • The first command 'certmgr.exe -put -c -s CA Microsoft_Expired.crt' exports a certificate from the "CA" (the "Intermediate Certification Authorities) system store to a certificate file.
  • The second command 'certmgr.exe -add -c Microsoft_Expired.crt StoreFile.str' imports a certificate from a certificate file to a certificate store file called "StoreFile.str".
  • The third command 'certmgr.exe StoreFile.str' lists all certificates in the certificate store file "StoreFile.str".

 

Certificate Generation Tool "makecrt.exe" on Windows

"certmgr.exe -add -c" - Import a Certificate

Certificate Manager Command "certmgr.exe" on Windows

⇑⇑ Windows Certificates Tutorials

2012-08-08, 15419👍, 0💬