openssl生成CA的时候出错:TXT_DB error number 2

来源:互联网 发布:大数据企业盈利模式 编辑:程序博客网 时间:2024/06/06 12:59

转自:http://zhoujuxi.blog.163.com/blog/static/56607590201192571745629


Sign the certificate? [y/n]:y

failed to update database

TXT_DB error number 2


产生的原因是:

 

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

 

方法一:

 

修改demoCA下 index.txt.attr

 

Java代码  
  1. unique_subject = yes  

 改为

Java代码  
  1. unique_subject = no  

 方法二:

 

删除demoCA下的index.txt,并再touch下

 

Java代码  
  1. rm index.txt  
  2.   
  3. touch index.txt  

 方法三:

将 common name设置成不同的


我在遇到此类情况的时候采用的第二种方法;


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

0 0