Generating a CSR
# openssl genrsa 1024 > domain.com.key
Generating RSA private key, 1024 bit long modulus
...................++++++
.............++++++
e is 65537 (0x10001)
# openssl req -new -key domain.com.key -out domain.com.csr
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]:CA
State or Province Name (full name) [Some-State]:Ontario
Locality Name (eg, city) []:Ottawa
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Company & Co.
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:*.domain.com
Email Address []:sslcert@domain.comPlease enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:Company & Co.
The important line is:
Common Name (eg, YOUR name) []:*.domain.com
This is the name that the SSL server will present on contact. Note that if you need a wildcard (as the example illustrates) your vendor will undoubtedly charge you more.
Reading the content of a .CSR
# openssl req -in domain.com.csr -noout -text
Reading the content of a certificate
# openssl x509 -x509toreq -in domain.com.cert -signkey domain.com.key -noout -text | less
Installing the cert
...is left as an exercise for the reader. You might try reading these pages:
http://www.rapidssl.com/resources/install/index.html
Sources