WARNING: can’t open config file: /usr/local/ssl/openssl.cnf

This error occurs mainly on windows when you are using openssl package,

The reason is that openssl failed to locate the openssl.cnf file

I will recommend that you do the following (one windows only)

  1. Open your command prompt as Administrator (few openssl commands opens in random state), thus when openssl tries to write stuff on your disk it fails. There could be another workaround but i am not aware of that.
  2. Now before you run any openssl command type the following.

 

 

after you did the above now you are good to go with your openssl stuff.

Remember that everytime you open a command prompt you have to run the above command unless you set this as your environment variable.

 

 

I hope this helps. If it does then don’t forget to leave your comments below.

 

Cheers.

 

.

VN:F [1.9.22_1171]
Rating: 5.0/5 (10 votes cast)
VN:F [1.9.22_1171]
Rating: +5 (from 5 votes)
WARNING: can't open config file: /usr/local/ssl/openssl.cnf, 5.0 out of 5 based on 10 ratings

Comments

  1. xtremexploit says:

    run the openssl as administrator or if you are using visual studio you need to open visual studio as administrator

  2. It is better to make a BAT-file like this.

    @ECHO OFF
    set OPENSSL_CONF=%~dp0openssl.cfg
    openssl.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

  3. Harold Naparst says:

    So literally everyone who downloads this package and runs the installer is going to get this error, have to read this entire post, figure out how to edit his environment and then edit his environment before even being able to issue the openssl.exe prompt without error?

    Why wouldn’t it make more sense to issue a package that doesn’t generate error messages when you install it in the default location? It seems a bit sadistic to make every user go through 30 minutes of hacking to get it to work.

    • It’s hardly 30 minutes of hacking dude… more like an initial 2 minutes of annoyance, with ~30 seconds of annoyance every time you use it. That said, I have to agree with you. I’ve been running into this stupid openssl.cnf issue for a long time now. So I finally found a solution. Use a different version of OpenSSL for Windows. I used v1.0.1e Light from http://slproweb.com/products/Win32OpenSSL.html (Blessed by OpenSSL.org) and it worked without that problem. I did get permission denied errors, which were solved by using an elevated command prompt.

    • Agreed, this is a pretty shitty program if it’s requiring me to go into a shell and then doesn’t even work without a bunch of tweaking.

  4. thanks its work when go to start menu->Accessories->right click on command promot and open it with administrator

  5. It’s unnecessary to open the command prompt as an administrator. You do need to add the path though, and that’s the part that got me. So rather than opening the prompt each time as an admin and then having to add the openssl path each time you just need to edit your system environment variables and add the path as instructed: OPENSSL_CONF=c:\[PATH TO YOUR OPENSSL DIRECTORY]\bin\openssl.cfg

    Each path in the PATH environment variable should be separated by a semicolon. Now each time you open the command prompt to use OpenSSL you won’t have to add the path.

  6. thanks… it’s really help me… =D

  7. It worked quite well.

    @ 2AM now, this extra hand did help… Thanks!

    For those who will use OpenSSL frequently, it may worth putting this path configuration in cmd’s default.

  8. Thanks, helped me #useful

  9. cant open config file : ..\\openssl.c

  10. Vitarix says:

    THANKS A LOT!!!!!!!!!!!!!!!!

  11. efrainlaverde says:

    Hi, I have the next message:

    C:\OpenSSL-Win32\bin>openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj “emailAddress=jir_22@hotmail.com,CN=jiRamirez,C=ES”

    Loading ‘screen’ into random state – done
    Subject does not start with ‘/’.
    problems making Certificate Request

    I don’t understand why subject not start with “/”
    I try to delete it, but doesn’t work.

    help me please

Speak Your Mind

*

CommentLuv badge