OpenSSL "ca" - Track CSR Signing History


How to track CSR certificate signing history? I want to know how many CSR I have signed with the OpenSSL "ca" command so far.



OpenSSL "ca" command automatically tacks your CSR signing history for you. Each time you sign a CSR and generate a new certificate, it will:

  • Save a copy of the new certificate to the ".\demoCA\newcerts" directory.
  • Add an entry in the certificate database file ".\demoCA\index.txt".
  • Increment the serial number by 1 in the ".\demoCA\serial" file.

The test below shows you how OpenSSL "ca" command manages CSR signing history:

C:\Users\fyicenter>dir /s demoCA
           115 index.txt
            21 index.txt.attr
             0 index.txt.old
<DIR>          newcerts
             5 serial
             5 serial.old

 Directory of .\demoCA\newcer
         3,279 1000.pem

C:\Users\fyicenter>type demoCA\index.txt
V       170831202401Z           1000    unknown /C=US/ST=NY/L=NY/

C:\Users\fyicenter>type demoCA\serial

As you can see from the test, you can count the number of lines in the .\demoCA\index.txt file to know how many CSR you have signed so far.

If the requester of the CSR want to get a copy of his/her certificate, you can lookup the serial number from the .\demoCA\index.txt file by DN fields. Then use the serial number of the file name to get the certificate in the .\demoCA\newcerts directory.


OpenSSL "ca" Error "failed to update database TXT_DB error number 2"

OpenSSL "ca" - Sign CSR with CA Certificate

OpenSSL "ca" Command

⇑⇑ OpenSSL Tutorials

2016-09-13, 943👍, 0💬