PDA

View Full Version : Generating SSL Cert question


satimis
22nd February 2008, 14:17
Hi folks,


Archlinux 86_64 2007-08-2


On running
$ sudo openssl rsa -in server.key -out server.keyError 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;$ 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
On running
$ sudo openssl rsa -in server.key -out server.keyError 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
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
I think you need to create it yourself.
Problem solved as follow;


Run;
$ hostname --fqdn
arch.satimis.com



$ cd /etc/ssl/certs/
$ sudo openssl req -new -x509 -newkey rsa:1024 -days 365 -keyout server.key -out server.crt
....
..
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
Enter pass phrase for server.key:
writing RSA key



B.R.
satimis