2017-06-13 109 views
-1

当使用OpenSSL 1.0.2l,我有以下命令行:OpenSSL的Windows上不recoginize我-extfile

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选项有什么问题吗?

谢谢

+0

Stack Overflow是编程和开发问题的网站。这个问题似乎与题目无关,因为它不涉及编程或开发。请参阅帮助中心的[我可以询问哪些主题](http://stackoverflow.com/help/on-topic)。也许[超级用户](http://superuser.com/)或[Unix&Linux堆栈交换](http://unix.stackexchange.com/)会是一个更好的地方。如果您觉得它在其他地方的话题,然后[请求迁移](http://meta.stackoverflow.com/q/254851) – jww

+0

您提供给本网站的参考资料包括适当的以下内容:“常用软件工具由程序员提供;“。这肯定会包含openssl。你还会注意到这个网站上的各种标签用于SSL,openssl等。这里的openssl标签已经包含了今天的8829个问题。我相信这在这里是适当的。 –

回答

2

“-extfile”选项应该在选项列表的前面。从CA手册页(https://www.openssl.org/docs/man1.0.2/apps/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”的说法被视为申请文件。

+1

当命令遇到一个前导短划线('-')作为文件名称的一部分时,它应该会发出警告。它很不寻常地看到以这种方式命名的文件,特别是在Windows上。或者,也许更好,为新选项启动参数。 – jww

相关问题