Unable to load config info from /usr/local/ssl/openssl.cnf on Windows

karthik picture karthik · Jan 22, 2013 · Viewed 219.6k times · Source

While using OpenSSL on Windows:

openssl genrsa -out privatekey.pem 1024 -->

Created successfully

openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 365 
---->

Showing error message as

unable to load config info from /usr/local/ssl/openssl.cnf

Answer

lame_coder picture lame_coder · Dec 9, 2013

After installing OpenSSL I was required to create a new environment variable:

  • Name: OPENSSL_CONF
  • Value: C:\Program Files\OpenSSL\openssl.cnf

In powershell:

$env:OPENSSL_CONF = "${env:ProgramFiles}\OpenSSL\openssl.cnf"

This value differs from previous installation versions (as seen in a previous edit of this post). Also, don't forget to add the openssl binary folder ${env:ProgramFiles}\OpenSSL to your Path.