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)
- 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.
- Now before you run any openssl command type the following.
1 |
set OPENSSL_CONF=c:\[PATH TO YOUR OPENSSL DIRECTORY]\bin\openssl.cfg |
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.
.
I tried many process but still gets the error.. This one works!!!!!!
Wonderful. Thanks. Worked perfectly.
run the openssl as administrator or if you are using visual studio you need to open visual studio as administrator
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
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.
thanks its work when go to start menu->Accessories->right click on command promot and open it with administrator
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.
thanks… it’s really help me… =D
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.
Thanks, helped me #useful
cant open config file : ..\\openssl.c
THANKS A LOT!!!!!!!!!!!!!!!!
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
Try this
Copy paste exactly like that with keeping whitespaces intact
openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=jir_22@hotmail.com, CN=jiRamirez, C=ES"
Let me know if that worked for you
Cheers!
http://twitter.com/jschahal
thank you a lot, it works!
Worked great. Thanks a lot
It worked for me too. Thank you.
Thank you a lot. 😀
…make way for the n00b – I see what I did wrong!
Installed the lite package… Error: ‘set’ is an invalid command
Lol. What on earth.
and what was it that you did to correct this? i am new to this program as well.
Thanks a lot, this saved me some time today. SSL can be so frustrating!
What worked for me was creating a permanent Windows environment variable called OPENSSL_CONF and giving it the value C:OpenSSL-Win32binopenssl.cfg
Thanks pointing me in the right direction,
Andy
Thanks for this, worked for me!
It worked for me, thank you very much !!
Worked like a charm. Thank you.
Well done. Good tip!
The default install of the win32 version of OpenSSL was c:\OpenSSL-Win32.
Thus, I needed to use the command: set OPENSSL_CONF=c:\openssl-win32\bin\openssl.cfg to get this to work
Gracias
Worked great. Thanks!
Thanks. That info isn’t on documentation… neither the variable name.
Thanks, Jaspreet. It worked for me.
This package didn’t contain a openssl.cnf file. I also ran the set statement but still get the same error. 🙁
Get the Installer from here http://www.slproweb.com/products/Win32OpenSSL.html try the Lite version. You will find the openssl.cfg in bin folder of your default Installed path.
Thank you very much for the solution!
Great tip!
Worked for me with Win32OpenSSL_Light-1_0_0e.exe on Win2K3.
—
mkb
thanks a lot,
it worked for me…..