I am running windows xp 32bit
I just downloaded Openssl from the following URL and installed it. http://www.slproweb.com/products/Win32OpenSSL.html
and then i tried to create a self signed certificate by using the following command
openssl req -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem
then it started giving the following error
Unable to load config info from /usr/local/ssl/openssl.cnf
Then after googling sometime i changed the above command to
openssl req -config C:\OpenSSL\bin\openssl.conf -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem
But now i get the following error in the command prompt
error on line -1 of C:\OpenSSL\bin\openssl.conf
4220:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:126:fopen('C:\OpenSSL\bin\openssl.conf','rb') 4220:error:2006D080:BIO routines:BIO_new_file:no such file:.\crypto\bio\bss_file.c:129:
4220:error:0E078072:configuration file routines:DEF_LOAD:no such file:.\crypto\conf\conf_def.c:197:
Please help. Thanks in advance.
https://github.com/xgqfrms-gildata/App001/issues/3
openssl.cnf
file in the right path;If you are seeing an error something like
try changing from back slash to front slash in the -config.
Just create an openssl.cnf file yourself like this in step 4: http://www.flatmtn.com/article/setting-openssl-create-certificates
Edit after link stopped working The content of the openssl.cnf file was the following:
You can still find the page using Waybackmachine: https://web.archive.org/web/20171108102046/http://www.flatmtn.com/article/setting-openssl-create-certificates
If openssl installation was successfull, search for "OPENSSL" in c drive to locate the config file and set the path.
It worked out for me.
The problem here is that there ISN'T an openssl.cnf file given with the GnuWin32 openssl stuff. You have to create it. You can find out HOW to create an openssl.cnf file by going here:
http://www.flatmtn.com/article/setting-ssl-certificates-apache
Where it lays it all out for you on how to do it.
PLEASE NOTE: The openssl command given with the backslash at the end is for UNIX. For Windows : 1)Remove the backslash, and 2)Move the second line up so it is at the end of the first line. (So you get just one command.)
ALSO: It is VERY important to read through the comments. There are some changes you might want to make based upon them.
Run the command as administrator and copy the config file to somewhere where you have read rights and specify the path with the -config parameter.