英文:
I am trying to generate a https certificate from openssl but getting error
问题
无法打开 C:/OpenSSL/SSL/openssl.cnf 以进行读取,没有这个文件或目录
1332:error:02001003:system library:fopen:No such process:crypto/bio/bss_file.c:69:fopen('C:/OpenSSL/SSL/openssl.cnf','r')
英文:
When i am trying to generate an https certificate for my express app using below command i am getting error
openssl req -new -key privateKey.pem -out request.pem
Can't open C:/OpenSSL/SSL/openssl.cnf for reading, No such file or directory
1332:error:02001003:system library:fopen:No such process:crypto/bio/bss_file.c:69:fopen('C:/OpenSSL/SSL/openssl.cnf','r')
答案1
得分: 1
首先,我已经为openssl.conf设置了环境变量:
set OPENSSL_CONF=c:/program%20files/openssl/openssl.cnf // 或者是openssl.conf的位置
然后运行以下命令:
openssl req -new -key privateKey.pem -out request.pem
// 请记住,我已经使用命令 openssl genrsa -out privateKey.pem 1024
生成了私钥
它会要求回答一些问题,然后在文件夹位置生成证书。
英文:
First i had set the environment varaiable for openssl.conf
set OPENSSL_CONF=c:/program%20files/openssl/openssl.cnf // or what erver the location for openssl.conf
Then run gain the command,
openssl req -new -key privateKey.pem -out request.pem
// keep in mind i already generated the
// private key using command openssl genrsa -out privateKey.pem 1024
It asks for a couple of quesitions and then generate the certificate at the folder location.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论