在安装openvpn时遇到的错误,openvpn使用了openssl 所以转载一下
http://hi.baidu.com/ychen2/item/b29823c8eaf335c6984aa0f7
使用openssl创建多级继承证书的时候,因为证书创建有问题,想删除重建——于是偷懒,不想重新创建certificate request,使用CA签发原来创建的certificate request,希望创建新的certificate,但不幸报错:
...
Sign the certificate? [y/n]:y
failed to update database
TXT_DB error number 2
unable to write 'random state'
查阅网络解决方案,原因如下:
This thing happens when certificates share common data. You cannot have two
certificates that look otherwise the same.
有多种解决方法,我试图直接修改index.txt,未能成功。
下面是收集到的方法:
1. 修改demoCA下 index.txt.attr
将
unique_subject = yes
改完
unique_subject = no
2. 删除index.txt,然后重新创建一个同名空白文件
rm index.txt
touch index.txt
3. 将 common name设置成不同的 (这个是不是需要重建certificate request?)
最后删除了index.txt然后重建,解决问题。