Web Hosting Talk







View Full Version : Self- Signed Certificates


ebo
01-24-2002, 09:22 PM
How would I go about making and implementing self-signed SSL certificates for a server? I am running RedHat Linux 6.2 with Apache and CPANEL. If someone could point me to a resource of how this is done, or help me with some step by step command lines, I'd really appreciate it. Thanks for the help.

The Prohacker
01-24-2002, 10:08 PM
First you need to generate a key:

openssl genrsa -rand randfile -out key.pem 1024


And to generate a untrusted certificate:

openssl req -new -key key.pem -out cert.pem -x509


cert.pem is the certificate you would install...

ebo
01-24-2002, 10:54 PM
Thanks! Now how do I correctly install it? I have WHM..
This is the output after I did what you said
---------------------
root@univex [/]# openssl genrsa -rand randfile -out key.pem 1024
0 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
...............................................................++++++
...++++++
e is 65537 (0x10001)
root@univex [/]# openssl req -new -key key.pem -out cert.pem -x509
Using configuration from /usr/share/ssl/openssl.cnf
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:UTAH
Locality Name (eg, city) []:SALT LAKE CITY
Organization Name (eg, company) [Internet Widgits Pty Ltd]:DIATONE.NET Inc.
Organizational Unit Name (eg, section) []:Web Hosting
Common Name (eg, your name or your server's hostname) []:UNIVEX
Email Address []:brad@diatone.net
root@univex [/]# locate cert.pem
root@univex [/]#
------------------------------

In WHM it says I need to paste the .key file and the .crt file.. Just a little bit more help.. Thanks alot.

The Prohacker
01-24-2002, 11:36 PM
You now just pico/vi the key.pem, and paste the contents into the WHM .key section, then pico/vi the crt.pem and paste it into the .crt second in WHM, enter the IP, domain, and user of the site, and hit install....

ebo
01-25-2002, 12:16 AM
Duh, ok. Thanks :D
One more thing, do you know if it is possible to make it not display the warnings? Like the security certificate was chosen by a company you do not wish to trust, blah blah. I think it would be possible, because I think I've seen it done before.

Also, when I go to https://www.diatone.net now, it displays the warnings and all, but it won't display the page.. know why?

priyadi
01-25-2002, 01:19 AM
Most probably you are using IE, and the domain on your certificate is not resolvable by DNS.

vegs
01-25-2002, 06:50 AM
it is a self signed certificate, it will display warning on all browser. to remove to warning you will have to purchase the certificate instead of self signing one

Ahmad
01-25-2002, 10:35 AM
You have to have it signed by thawte, verisign or a company that IE is pre-configured to trust.

kcoster
01-25-2002, 12:09 PM
The error is a 404, are you sure the site is pointing to the right directory (talking from an IIS point of view here) ?

ebo
01-25-2002, 06:08 PM
Well, the regular http://www.diatone.net works.. so.. yea, it is pointing to the right directory.