Assay Khan
Assay Khan

Reputation: 86

I am trying to generate a https certificate from openssl but getting error

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')

Upvotes: 2

Views: 1649

Answers (1)

Assay Khan
Assay Khan

Reputation: 86

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.

Upvotes: 1

Related Questions