For several years, I’ve been using StartSSL already to create my personal website’s SSL certificate. Just recently, the Israel-based CA has revamped their website not only with a more modern and fresher look, but also improved usability by implementing new wizards. In this little howto I’ll show you how to create your own web server SSL certificate in just a couple of minutes.
The steps involved are actually not that complicated, especially since the StartSSL website finally has a shiny new look. ;-)
Class of 1, 2, 3
I assume you have already signed up and validated your identity. If not, the process is quite straightforward – fill in your personal data on their website, confirm your e-mail address by following the instructions sent to you and get validated as Class 1 for free. Depending on your actual needs, e.g. showing your organizational details or be able to use wildcard certificates, you might want to upgrade to Class 2 validation or higher which comes with a little fee attached, but the basic functionality shown in this howto is pretty much the same. That being said, StartSSL doesn’t charge per certificate for most validation classes, but for the annual validation – the fee stays the same independent of how many domain names you issue certificates for.
Validate your domain
With your e-mail address validated, it’s now time to add domains to your account portfolio to begin creating SSL certificates for them.
- Go to the StartSSL website and click Login in the upper right part of the screen.
- Depending on your browser’s configuration, you will be asked which client certificate to use for authentication. Should you have multiple certificates installed, e.g. one for your personal use and one for your organization, double-check you login with the proper one to not mix up accounts.
- Click Validations Wizard.
- Choose Domain Validation and click Continue.
- Enter your domain name, without www or any other subdomain parts, and click Continue.
- Choose amongst one of the available e-mail addresses for validation, and ensure e-mails to this address are only delivered to your inbox. If in doubt, update your WHOIS record or ask your provider to do so. StartSSL offers some well-known addresses like webmaster@, and lists the WHOIS records’ e-mail address as well. When you have chosen, click Send verification code.
- Check your inbox for an e-mail from StartSSL, which should arrive within a few seconds. If it doesn’t please double-check your spam folder. If that doesn’t help either, wait 30 minutes and try again – chances are your mail server makes use of a mechanism called Greylisting and delays incoming e-mails for antispam purposes.
- Enter the code in the web interface and click Validate. If this isn’t successful please double-check, as copy & paste sometimes adds unwanted white spaces after the text.
Create your certificate
- Click To “Order SSL certificate”.
- The next page shows all validated domain names available for certificates.
- StartSSL allows to add multiple domain names per certificate, e.g. variants with and without hypens, or different domain endings (TLDs).
- You can add any of your validated domains or any of its subdomains like www or mail to the list.
- The first line becomes the so called Common Name, which is sometimes prominently shown in client software, and acts as fallback name for old or broken clients.
- The sample below uses my personal domain name effenberger.org as Common Name and has a wildcard *.effenberger.org covering all subdomains to the first level (e.g. www.effenberger.org, but not test.www.effenberger.org). Wildcard certificates are reserved for Class 2 validations and higher and when you use them, remember they only cover subdomains, so – as in the sample above- add the domain name as well to the list of names.
- To create a certificate, you need a so called Certificate Signing Request and I recommend choosing the Generated by yourself variant. Here’s how I created it:
openssl req -sha512 -new -newkey rsa:4096 -keyout site.pem -out site.csr -passout pass:YourPassword -subj "/C=YourCountry/ST=YourState/L=YourTown/O=YourName/CN=*.your.domain/emailAddressfirstname.lastname@example.org"
openssl rsa -passin pass:YourPassword -in site.pem -out site.key
- You end up with several files:
- site.csr is your Certificate Signing Request
- site.key is your unencrypted private key
- site.pem is your encrypted private key
- Paste the content of the site.csr file into the respective form on the StartSSL website and click on Submit. Keep the other files private and don’t share them with anyone!
- If your request has been successful, you’ll soon be presented with a confirmation message and a download link to a ZIP file, containing your certificate and StartSSL’s intermediate and root certificate.
- Congratulations! You have just had your certificate signed by StartSSL! The next steps depend on your server software:
- Usually, you want to copy your unencrypted private key, your certificate and the intermediate certificate to your server,
- create a certificate chain (certificate and intermediate in one file, in this particular order)
- and configure your software accordingly.
- You might also want to add Diffie-Hellman parameters, make use of OCSP Stapling, HSTS and HPKP, but more on that in a later blogpost. ;-)
- Depending on your validation class, your certificate expires within 6 months to two years. Make yourself a note about the expiration date, which e.g. is shown in any browser you use to access your SSL-protected site, and renew in time.
- As a final step, in order to test if your server has been successfully set up and the certificate chain is in order, you can run a SSL Server Test.