TXT_DB error number 2 failed to update database

As I m completly unaware of the openssl use, I only write here some observations I made :

If after the command :
openssl ca -out cert.pem -infiles req.pem
you got the following error message :
failed to update database
TXT_DB error number 2
This is probably because you have generated your own signing certificate with the same Common Name (CN) information that the CA certificate that you've generated before.

Simply input a different Common Name each time you are asked should do the trick.

Credit : 1

Comments

Rakesh said…
ERROR Messages
===================
failed to update database TXT_DB error number 2
Solution 1:
Here's the line I added to the openssl.conf file:
[ CA_default ]
unique_subject = no
This may or may not work

Solution 2 :
Change the attribute to /etc/ssl/index.txt.attr "unique_subject = no"
Refer: http://rt.openssl.org/Ticket/Display.html?id=502&user=guest&pass=guest

Solution 3: Remove entry from etc/ssl/index.txt and etc/ssl/serial
Very less likely you need to do that.

Solution 4: Always create Certs with new subject , COMMAN NAME.
Unknown said…
I don't want to create a new common name because I'm just "renewing" (creating a new one) for an expired certificate.

What is the correct procedure in this case?

Thank you.

Popular posts from this blog

Connect the Xiaomi Yi Ants Cam to your Synology Surveillance Station

Resolve "Cannot download packages whilst offline" issue in Deja-Dup backup software