当我使用 openSSL 和配置文件签署中间证书时,我经常遇到同样的错误。错误是:
140736005481480:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Volumes/Project - Encrypted/Security/root/ca/index.txt.attr','rb')
140736005481480:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:
140736005481480:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:195:
140736005481480:error:0E06D06C:configuration file routines:NCONF_get_string:no value:conf_lib.c:324:group=CA_default name=email_in_dn
我了解有关找不到文件的第一个错误,但我不明白的是为什么它要查找的文件不是我在配置中定义的文件。这是我在配置中放置的内容:
database = $dir/index.txt # database index file.
我使用的命令是 sudo openssl ca -config openssl.cnf -extensions v3_intermediate_ca -days 3650 -notext -md sha256 -keyfile private/ca.key.pem -cert certs/ca.cert.pem -in intermediate/csr/intermediate.csr.pem -out intermediate/certs/intermediate.cert.pem
有没有人了解导致这些错误的原因以及如何修复它们?
openssl ca
不仅使用数据库索引文件(您已正确设置为index.txt
),而且还使用数据库属性文件。它始终与索引文件位于同一位置,其名称是后缀为.attr的索引的名称。这个属性文件(据我所知并没有真正记录下来)只包含一个信息:配置行
unique_subject = yes/no
Run Code Online (Sandbox Code Playgroud)
那么你需要做什么?index.txt.attr
在存储 CA 的文件夹中创建文件(似乎是/Volumes/Project - Encrypted/Security/root/ca)并将我上面提到的单行添加到其中。
归档时间: |
|
查看次数: |
10139 次 |
最近记录: |