Tag Archives: Safety related

Error generating Ca in OpenSSL: TXT_ DB error number 2

from: http://zhoujuxi.blog.163.com/blog/static/56607590201192571745629

Sign the certificate?[y/n]:y

failed to update database

TXT_DB error number 2

occurs because

This thing happens when certificates share common data. You cannot have two
certificates that look the same.

method 1 :

modify demoCA under index.txt.attr

Java code
  

  1. unique_subject = yes

    to

    Java code
      

    1. unique_subject = no

      method 2 :

      delete demoCA under the index. TXT, and then touch

      Java code
        

      1. rm index. TXT
      2. touch index. TXT

        method three :

        sets the common name to a different

        the second method I use when I encounter such situations;

        ref: blog.sina.com.cn/s/blog_6151984a0100f0q4.html