StartSSL Free Certificate: Difference between revisions
mNo edit summary |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Warning | |||
== StartSSL | |1=Deprecated Information! | ||
|2=StartSSL no longer provides free SSL certificates as of January 1st, 2018. Use Let's Encrypt instead. | |||
}} | |||
StartSSL provides free SSL certificates (StartSSL Free) which is a great alternative to self-signed certificates. The only restrictions with StartSSL Free is that: | StartSSL provides free SSL certificates (StartSSL Free) which is a great alternative to self-signed certificates. The only restrictions with StartSSL Free is that: | ||
| Line 9: | Line 11: | ||
The guide below outlines the necessary steps to create and install a certificate from StartSSL. | The guide below outlines the necessary steps to create and install a certificate from StartSSL. | ||
== Getting Started == | |||
Sign-up for an account at http://www.startssl.com/. The registration process will require your name, address, phone number, and email. You will be emailed a verification code to verify your account. | Sign-up for an account at http://www.startssl.com/. The registration process will require your name, address, phone number, and email. You will be emailed a verification code to verify your account. | ||
| Line 16: | Line 18: | ||
Before you can sign a certificate, you will need to validate your email address and domain name under the 'Validations Wizard'. Once completed, you may sign a certificate under the 'Certificates Wizard' tab. | Before you can sign a certificate, you will need to validate your email address and domain name under the 'Validations Wizard'. Once completed, you may sign a certificate under the 'Certificates Wizard' tab. | ||
== Requesting a Server Certificate == | |||
Generate a certificate signing request by running: | Generate a certificate signing request by running: | ||
{{highlight|lang=terminal|code= | |||
# cd ~ | |||
# mkdir ssl | |||
# openssl genrsa -des3 -out steamr.com.key 4096 | |||
# openssl req -new -key steamr.com.key -out steamr.com.csr | |||
}} | |||
As part of your key generation process, you may enter any passphrase. (We can create an 'insecure' key without the passphrase later once the certificate is signed) The steps above will create a .key and a .csr file. | As part of your key generation process, you may enter any passphrase. (We can create an 'insecure' key without the passphrase later once the certificate is signed) The steps above will create a .key and a .csr file. | ||
| Line 37: | Line 41: | ||
# Save the root CA certificate (https://www.startssl.com/certs/ca.pem) | # Save the root CA certificate (https://www.startssl.com/certs/ca.pem) | ||
== Installing Server Certificate == | |||
From the steps above, should have: | From the steps above, should have: | ||
* steamr.com.key (your certificate's private key) | * steamr.com.key (your certificate's private key) | ||
| Line 50: | Line 54: | ||
# Toolbox -> StartCom CA Certificates -> Class 1 Intermediate Server CA | # Toolbox -> StartCom CA Certificates -> Class 1 Intermediate Server CA | ||
=== Certificate Chain === | |||
With the five files listed above, you will need to combine the intermediate / root CA certificate into a chain certificate: | With the five files listed above, you will need to combine the intermediate / root CA certificate into a chain certificate: | ||
{{highlight|lang=terminal|code= | |||
# cat ca.pem sub.class1.server.ca.pem > startssl.chain.class1.server.crt | |||
}} | |||
You will need to combine your private/certificate and the certificate chain above: | |||
{{highlight|lang=terminal|code= | |||
# cat steamr.com.crt steamr.com.key startssl.chain.class1.server.crt > steamr.com.pem | |||
# mv steamr.com.pem /etc/pki/tls/cert.pem | |||
}} | |||
Copy the following 2 certificate files to | === Installing Certificates === | ||
Copy the following 2 certificate files to {{code|/etc/pki/tls/certs}} (Assuming you're on RedHat based distros. This location may vary): | |||
# startssl.chaina.class1.server.crt | # startssl.chaina.class1.server.crt | ||
# steamr.com.crt | # steamr.com.crt | ||
| Line 59: | Line 73: | ||
Chmod the certificates to 640. | Chmod the certificates to 640. | ||
Copy the private key to | === Installing Private Key === | ||
Copy the private key to {{code|/etc/pki/tls/private}} | |||
# steamr.com.key | # steamr.com.key | ||
chmod the key to 600. | |||
=== Enable Apache SSL === | |||
Edit your Apache SSL config, ensuring that you have at least the following lines: | Edit your Apache SSL config, ensuring that you have at least the following lines: | ||
{{highlight|lang=text|code= | |||
# SSLEngine On | |||
# SSLCertificateFile /etc/pki/tls/certs/steamr.com.crt | |||
# SSLCertificateKeyFile /etc/pki/tls/private/steamr.com.key | |||
# SSLCertificateChainFile /etc/pki/tls/certs/startssl.chain.class1.server.crt | |||
}} | |||
Configure your virtual hosts as needed, and reload/restart apache. | Configure your virtual hosts as needed, and reload/restart apache. | ||
== Removing Passphrase from Certificate == | |||
If you had entered a passphrase as part of the certificate creation process, you may remove it (such that restarting apache won't prompt you for a paassword) by: | If you had entered a passphrase as part of the certificate creation process, you may remove it (such that restarting apache won't prompt you for a paassword) by: | ||
{{highlight|lang=terminal|code= | |||
# cd /etc/pki/tls/private | |||
# openssl rsa -in steamr.com.key -out steamr.com.key.insecure | |||
# mv steamr.out.key.insecure steamr.com.key | |||
# chmod 600 *.key | |||
}} | |||
== Troubleshooting == | |||
=== Verifying SSL Certificates === | |||
You may test out whether you have set apache up properly by checking the certificates manually: | |||
{{highlight|lang=terminal|code= | |||
# echo HEAD / | openssl s_client -connect localhost:443 -quiet > /dev/null | |||
}} | |||
{{Navbox Linux}}[[Category:Linux]] | |||
[[Category: | [[Category:Deprecated]] | ||
[[Category: | {{Navbox Certificates}}[[Category:Certificates]] | ||
Latest revision as of 06:23, 1 September 2019
Deprecated Information!
StartSSL no longer provides free SSL certificates as of January 1st, 2018. Use Let's Encrypt instead.
StartSSL provides free SSL certificates (StartSSL Free) which is a great alternative to self-signed certificates. The only restrictions with StartSSL Free is that:
- Valid only up to 1 year
- One domain per certificate (no wild cards)
- Non commercial use only
The guide below outlines the necessary steps to create and install a certificate from StartSSL.
Getting Started
Sign-up for an account at http://www.startssl.com/. The registration process will require your name, address, phone number, and email. You will be emailed a verification code to verify your account.
Once you authenticate, you will be asked to install a new client certificate. It's a good idea to back this certificate up as well (along with the private key as a .p12 file).
Before you can sign a certificate, you will need to validate your email address and domain name under the 'Validations Wizard'. Once completed, you may sign a certificate under the 'Certificates Wizard' tab.
Requesting a Server Certificate
Generate a certificate signing request by running:
# cd ~
# mkdir ssl
# openssl genrsa -des3 -out steamr.com.key 4096
# openssl req -new -key steamr.com.key -out steamr.com.csr
As part of your key generation process, you may enter any passphrase. (We can create an 'insecure' key without the passphrase later once the certificate is signed) The steps above will create a .key and a .csr file.
Under your StartSSL account:
- Click on 'Certificates Wizard', and select 'Web Server SSL/TLS Certificate' as the Certificate Target.
- Since we already have a .csr file (made above), we can skip the 'Generate Private Key' step.
- Submit your certificate signing request by pasting in the contents of the .csr file.
- Select your top level domain, and enter the domain of the certificate that you wish to sign.
- Verify your data and proceed to sign the certificate
Once completed, you will be given the signed certificate. You must:
- Save the contents to 'domain.com.crt' (in this case, steamr.com.crt)
- Save the intermediate CA certificate (https://www.startssl.com/certs/sub.class1.server.ca.pem)
- Save the root CA certificate (https://www.startssl.com/certs/ca.pem)
Installing Server Certificate
From the steps above, should have:
- steamr.com.key (your certificate's private key)
- steamr.com.csr (your signing request)
- steamr.com.crt (signed certificate from StartCom)
- ca.pem (root CA certificate from StartCom)
- sub.class1.server.ca.pem (intermediate CA certificate from StartCom)
If you are missing your signed certificate, or need access to the intermediate / root CA certificate from StartCom, you can retrieve them at:
- Toolbox -> Retrieve Certificate -> select your domain
- Toolbox -> StartCom CA Certificates -> StartCom CA Certificates (PEM encoded)
- Toolbox -> StartCom CA Certificates -> Class 1 Intermediate Server CA
Certificate Chain
With the five files listed above, you will need to combine the intermediate / root CA certificate into a chain certificate:
# cat ca.pem sub.class1.server.ca.pem > startssl.chain.class1.server.crt
You will need to combine your private/certificate and the certificate chain above:
# cat steamr.com.crt steamr.com.key startssl.chain.class1.server.crt > steamr.com.pem
# mv steamr.com.pem /etc/pki/tls/cert.pem
Installing Certificates
Copy the following 2 certificate files to /etc/pki/tls/certs (Assuming you're on RedHat based distros. This location may vary):
- startssl.chaina.class1.server.crt
- steamr.com.crt
Chmod the certificates to 640.
Installing Private Key
Copy the private key to /etc/pki/tls/private
- steamr.com.key
chmod the key to 600.
Enable Apache SSL
Edit your Apache SSL config, ensuring that you have at least the following lines:
# SSLEngine On
# SSLCertificateFile /etc/pki/tls/certs/steamr.com.crt
# SSLCertificateKeyFile /etc/pki/tls/private/steamr.com.key
# SSLCertificateChainFile /etc/pki/tls/certs/startssl.chain.class1.server.crt
Configure your virtual hosts as needed, and reload/restart apache.
Removing Passphrase from Certificate
If you had entered a passphrase as part of the certificate creation process, you may remove it (such that restarting apache won't prompt you for a paassword) by:
# cd /etc/pki/tls/private
# openssl rsa -in steamr.com.key -out steamr.com.key.insecure
# mv steamr.out.key.insecure steamr.com.key
# chmod 600 *.key
Troubleshooting
Verifying SSL Certificates
You may test out whether you have set apache up properly by checking the certificates manually:
# echo HEAD /
| ||||||