OpenSSL error: can’t open config file: /usr/local/ssl/openssl.cnf on Windows

When you use OpenSSL on Windows, you receive the error: can’t open config file: /usr/local/ssl/openssl.cnf


C:\Users\Administrator>openssl version
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
OpenSSL 1.0.2g  1 Mar 2016

openssl error on windows

How to fix it?

Step 1: Find the location of file openssl.conf

This’s my case: D:\AppServ\Apache2.2\conf\openssl.cnf
apache openssl conf

Step 2: set the variable OPENSSL_CONF

set OPENSSL_CONF=D:\AppServ\Apache2.2\conf\openssl.cnf

Now, you can use OpenSSL well

C:\Users\Administrator>openssl s_client -connect
no peer certificate available
No client certificate CA names sent
SSL handshake has read 7 bytes and written 307 bytes
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
    Protocol  : TLSv1.2
    Cipher    : 0000
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1458708752
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

Recent search terms:

  • safe-mode off windows 1251 drwxr
  • safe mode off windows 1251 drwxr xr
  • open config file
  • Safe mode off cwd drwxr xr x [ home ]
  • linux can\t open config file: /usr/lib/ssl/openssl cnf
  • openssl can\t open config file
  • safe-mode off windows-1251 drwxr-xr

Leave a Reply