我希望创建带有自签名SSL的restAPI。我安装了openSSl,并希望使用此命令生成密钥
openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365
但我得到了错误。
Can't open "C:\Program Files\OpenSSL-Win64\bin openssl.cfg" for reading, No such file or directory
202E0000:error:80000002:system library:BIO_new_file:No such file or directory:crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\OpenSSL-Win64\bin openssl.cfg, r)
202E0000:error:10000080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c:75:
我尽力了
set OPENSSL_CONF=C:\Program Files\OpenSSL-Win64\bin openssl.cfg
但它不能解决我问题
1条答案
按热度按时间pw9qyyiw1#
如果
openssl.cfg
在....\bin
中,则设置应为set OPENSSL_CONF=C:\Program Files\OpenSSL-Win64\bin\openssl.cfg
,即设置中的最后一个空格应为\