HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Generating SSL Cert question (http://www.howtoforge.com/forums/showthread.php?t=20629)

satimis 22nd February 2008 14:17

Generating SSL Cert question
 
Hi folks,


Archlinux 86_64 2007-08-2


On running
$ sudo openssl rsa -in server.key -out server.key
Code:

Error opening Private Key server.key
6879:error:02001002:system library:fopen:No such file or directory:bss_file.c:352:fopen('server.key','r')
6879:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:
unable to load Private Key

Please advise where shall I check and how to fix this problem. Thanks


On runniing;
Code:

$ sudo openssl req -new -x509 -newkey rsa:1024 -days 365 -keyout server,key -out server.crt
/etc/ssl/certs/

What FQDN shall I use on "Common Name"?


On googling I found;
TIP Setup Your FQDN
http://gentoo-wiki.com/TIP_Setup_Your_FQDN


Do I need to do the same on Arch? TIA


B.R.
satimis

falko 23rd February 2008 17:01

Quote:

Originally Posted by satimis
On running
$ sudo openssl rsa -in server.key -out server.key
Code:

Error opening Private Key server.key
6879:error:02001002:system library:fopen:No such file or directory:bss_file.c:352:fopen('server.key','r')
6879:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:
unable to load Private Key

Please advise where shall I check and how to fix this problem. Thanks

There's no server.key file. Please check if you are in the correct directory.

satimis 23rd February 2008 17:15

Quote:

Originally Posted by falko
There's no server.key file. Please check if you are in the correct directory.

$ locate server.key
$ sudo find / -name server.key
both no printout

$ locate .key
/usr/share/mime-infor/gnome-vfs.keys
/var/abs/extra/network/nxclient/nomachine.key

$ sudo find / -name *.key
/var/abs/extra/network/nxclient/nomachine.key


Where can I find/download this file? Thanks


satimis

falko 24th February 2008 14:03

I think you need to create it yourself.

satimis 25th February 2008 15:15

(solved)
 
Quote:

Originally Posted by falko
I think you need to create it yourself.

Problem solved as follow;


Run;
$ hostname --fqdn
Code:

arch.satimis.com

$ cd /etc/ssl/certs/
$ sudo openssl req -new -x509 -newkey rsa:1024 -days 365 -keyout server.key -out server.crt
Code:

....
..
Common Name (eg, YOUR name) []:arch.satimis.com
...
etc

At the end server.key generated


then;
$ sudo openssl rsa -in server.key -out server-no-pass.key
Code:

Enter pass phrase for server.key:
writing RSA key


B.R.
satimis


All times are GMT +2. The time now is 13:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.