Windows 上的 openssl 无法识别我的 -extfile

openssl on Windows does not recoginize my -extfile

使用 OpenSSL 1.0.2l 时,我有以下命令行:

openssl ca -out certs\cert.pem -days 1825 -config openssl.cnf -infiles requests\req.pem -extfile "v3.ext"

我在当前目录中有 v3.ext 文件:

>dir v3.ext
 Volume in drive C is OS
 Volume Serial Number is 1E1A-0C21

 Directory of C:\Users\[me]\.openssl

06/12/2017  10:58 AM               205 v3.ext
               1 File(s)            205 bytes
               0 Dir(s)  116,381,810,688 bytes free

当我 运行 它时,我收到此错误消息:

-extfile: No such file or directory 8932:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:406:fopen('-extfile','rb') 8932:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:408:

这是一个 Windows 10 盒。我的 Extfile 选项有什么问题吗?

谢谢

“-extfile”选项应该在选项列表的前面。来自 ca 手册页 (https://www.openssl.org/docs/man3.0/man1/openssl-ca.html):

-infiles
if present this should be the last option, all subsequent arguments are 
assumed to the the names of files containing certificate requests.

所以你的“-extfile”参数被当作一个请求文件。