加载CRLnumber时出现OpenSSL错误

我无法生成CRL。 我可能在configuration文件中丢失了一些东西。 我得到的错误是“加载crl编号时出现openssl错误”。 Crlconfiguration部分:

[ CA_default ] # Directory and file locations. dir = box/ca certs = $dir/certs crl_dir = $dir/crl new_certs_dir = $dir/newcerts database = $dir/index.txt serial = $dir/serial RANDFILE = $dir/private/.rand # For certificate revocation lists. crlnumber = $dir/crlnumber crl = $dir/crl/RcCA.crl crl_extensions = crl_ext default_crl_days = 30 

我使用的命令:

 openssl ca -config full-path-to-openssl.cnf -gencrl -out full-path-to-RcCA.crl 

其中rcCA是crl文件。 文件结构:
根CA

底部三个是文件,上面是文件夹。
我find的答案是指向缺乏索引文件。 但它存在于我的机器上。 我不知道我是否把它放在正确的地方。

编辑:

@StacksOfZtuff帮助。 但是现在我得到了不同的错误。 我不知道这是否被认为是解决的,或者我只是掩盖了以前的错误。

22048:error:2207707B:X509 V3 routines:V2I_AUTHORITY_KEYID:unable to get issuer keyid:.\crypto\x509v3\v3_akey.c:165:

22048:error:22098080:X509 V3 routines:X509V3_EXT_nconf:error in extension:.\crypto\x509v3\v3_conf.c:95:name=authorityKeyIdentifier, value=keyid:always

编辑到第二个评论:

我想强调的是,除了CRL问题,我的CA工作正常。 我能够生成密钥,csr,cer和pkcs12。 我似乎能够添加条目到CRL,但是当我尝试调用gencrl命令时,我得到错误。 我甚至不确定是否重要

也可以看看

后续文章: OpenSSL生成CRL产生的错误:无法获得发行者keyiid

首先初始化crlnumber文件

尝试这个:

 echo 1000 > crlnumber