Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error while generating Certificate Signing Request

3,013 views
Skip to first unread message

PRIYARANJAN NAYAK

unread,
Oct 23, 2012, 5:03:05 AM10/23/12
to
Hi ALL,

--> First I generate private key i.e  my_key.key,then I am trying to Generate a Certificate Signing Request:
while generating .csr file I faced this error .

C:\>C:\tmp_open_ssl\bin\openssl.exe req -new -key my_key.key -out my_request.csr -config C:\tmp_open_ssl\ssl\openssl.cnf
WARNING: can't open config file: c:/tmp_open_ssl;/ssl/openssl.cnf
Error opening Private Key my_key.key
3464:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:398:fopen('my_key.key','rb')
3464:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:400:unable to load Private Key


Can any one help me about this error


Thanks
Priyaranjan

Sanford Staab

unread,
Oct 23, 2012, 10:22:09 AM10/23/12
to
It looks like your missing the openssl.cnf file or maybe the my_key.key file.  Double check your config file and command line parameters.

robert harris

unread,
Oct 23, 2012, 10:59:53 AM10/23/12
to
Hello, 

Not sure this will help, but at first glance it seems that you have made a mistake is setup; 

 c:/tmp_open_ssl;/ssl/openssl.cnf

=> Try this instead 
 c:/tmp_open_ssl/ssl/openssl.cnf

and ofc, check that that's where your config file is. 

Regards

2012/10/23 Sanford Staab <sanf...@gmail.com>

Thomas J. Hruska

unread,
Oct 23, 2012, 11:04:53 AM10/23/12
to
On 10/23/2012 7:22 AM, Sanford Staab wrote:
> It looks like your missing the openssl.cnf file or maybe the my_key.key file. Double check your config file and command line parameters.
>
> From: PRIYARANJAN NAYAK
> Sent: Tuesday, October 23, 2012 3:03 AM
> To: openss...@openssl.org
> Subject: error while generating Certificate Signing Request
>
> Hi ALL,
>
> --> First I generate private key i.e my_key.key,then I am trying to Generate a Certificate Signing Request:
> while generating .csr file I faced this error .
>
> C:\>C:\tmp_open_ssl\bin\openssl.exe req -new -key my_key.key -out my_request.csr -config C:\tmp_open_ssl\ssl\openssl.cnf
> WARNING: can't open config file: c:/tmp_open_ssl;/ssl/openssl.cnf

If you are running the Windows binaries - openssl.cnf is renamed to
openssl.cfg because Windows thinks .cnf files are some weird dial-up
modem configuration file.

I'm not sure why there is a semi-colon in the path above. If that is a
legitimate copy-paste, then there might be a bug in OpenSSL.


> Error opening Private Key my_key.key
> 3464:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:398:fopen('my_key.key','rb')
> 3464:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:400:unable to load Private Key

This error means OpenSSL can't find the file 'my_key.key' in the current
directory. You wouldn't want a private key file in the root of the
primary hard drive anyway because putting files into the root is a great
way to hose your OS such that it won't boot.

--
Thomas Hruska
Shining Light Productions

Home of BMP2AVI and Win32 OpenSSL.
http://www.slproweb.com/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

Vladimir Belov

unread,
Oct 23, 2012, 11:25:44 AM10/23/12
to
 
Don’t use ‘-config’ option for CSR, let the default configuration file be used, it’s enough or maybe not needed at all for CSRs.
 
openssl req -newkey rsa:2048 -keyout my_key.key -keyform PEM –out my_request.csr -outform PEM
 
 
 
Sent: Tuesday, October 23, 2012 1:03 PM
Subject: error while generating Certificate Signing Request
Hi ALL,

--> First I generate private key i.e  my_key.key,then I am trying to Generate a Certificate Signing Request:
while generating .csr file I faced this error .

C:\>C:\tmp_open_ssl\bin\openssl.exe req -new -key my_key.key -out my_request.csr -config C:\tmp_open_ssl\ssl\openssl.cnf
WARNING: can't open config file: c:/tmp_open_ssl;/ssl/openssl.cnf
Error opening Private Key my_key.key
3464:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:398:fopen('my_key.key','rb')
3464:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:400:unable to load Private Key


Dave Thompson

unread,
Oct 23, 2012, 3:29:07 PM10/23/12
to
>From: owner-ope...@openssl.org On Behalf Of Sanford Staab
>Sent: Tuesday, 23 October, 2012 10:22

>It looks like your missing the openssl.cnf file or maybe the my_key.key
file.
>Double check your config file and command line parameters.

He is definitely missing the my_key.key file; the error message says so.

If the file specified as -config can't be opened, that's an error.
The warning is when the *default* config file $OPENSSLDIR/openssl.cnf
can't be opened. If you compare the pathname in the warning to the
pathname he used that worked, it's clear OPENSSLDIR incorrectly has
a semicolon in it, I'll guess due to a mistake in the configure step.

>From: PRIYARANJAN NAYAK <mailto:priyara...@gmail.com>
>Sent: Tuesday, October 23, 2012 3:03 AM

>C:\>C:\tmp_open_ssl\bin\openssl.exe req -new -key my_key.key
>-out my_request.csr -config C:\tmp_open_ssl\ssl\openssl.cnf
>WARNING: can't open config file: c:/tmp_open_ssl;/ssl/openssl.cnf
>Error opening Private Key my_key.key
>3464:error:02001002:system library:fopen:No such file or directory:
>.\crypto\bio\bss_file.c:398:fopen('my_key.key','rb')
>3464:error:20074002:BIO routines:FILE_CTRL:system lib:
>.\crypto\bio\bss_file.c:400:unable to load Private Key

0 new messages