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

E.x.

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 hashkiller.co.uk:443
CONNECTED(00000198)
---
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
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1458708752
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

Related Post

,

No comments yet.

Leave a Reply