Microsoft "certutil -store CA 0 first.crt" - Export Certificate


How to export a certificate from a certificate store into a certificate file with Microsoft "certutil" tool?



If you want to export a certificate from a certificate store into a certificate file, you can use the Microsoft "certutil -store storename certificate_index file_name" command as shown in this tutorial:

C:\fyicenter>del first.crt

C:\fyicenter>\windows\system32\certutil -store -user CA 0 first.crt

================ Certificate 0 ================
Serial Number: 07276202
Issuer: CN=GTE CyberTrust Global Root, OU=GTE CyberTrust Solutions, Inc., O=GTE
Corporation, C=US
 NotBefore: 4/14/2010 1:12 PM
 NotAfter: 4/14/2018 1:12 PM
Subject: CN=Microsoft Internet Authority
Non-root Certificate
Cert Hash(sha1): e5 95 8d 48 fe 10 d7 34 03 11 e8 c0 3b b2 29 40 da ba 2d a3
No key provider information
Cannot find the certificate and private key for decryption.
CertUtil: -store command completed successfully.

As you can see from the output, the command works successfully:

  • "del first.crt" command deletes the old certificate file before running the "certutil -store" command.
  • The first certificate entry in the "CA" certificate store at the current user store location is exported to the file "first.crt".
  • "-user CA" option specifies the certificate store name in the "Current User" certificate store location.
  • "-store" option indicates a specified certificate in the specified certificate store to be dumped.
  • "0" option specifies the index value of the certificate to be dumped.
  • "first.crt" option specifies the name of the certificate file where the specified certificate to be dumped to.

2013-02-27, 11008👍, 0💬