openssl TXT_DB error number 2

在安装openvpn时遇到的错误,openvpn使用了openssl 所以转载一下

使用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然后重建,解决问题。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值