questions about TLS certificates

Hello! Here are some questions & answers. The goal isn't to get all the questions "right". Instead, the goal is to learn something! If you find a topic you're interested in learning more about, I'd encourage you to look it up and learn more.

does every TLS server certificate have a hostname (like mail.google.com) on it?

almost always, yes!

the point of a certificate is to prove that a server is the "real" server for a name. Usually the identity it's trying to prove (the SAN) is a hostname, like mail.google.com, but occasionally it's an IP address (like 1.1.1.1)

do certificates you pay for use better cryptography than free certificates (like the ones from Let's Encrypt)?

no!

you can pay a certificate authority extra for an EV ("extended validation") certificate, but that won't give you better cryptography.

can only servers have certificates?

no, there are client certificates too!

server certificates prove a server's identity (like mail.google.com). You can also use client certificates to prove a client's identity. For example, you could issue every employee their own client certificate to prove that a request is coming from a specific employee's laptop).

if you have the google.com certificate, can you trick someone into thinking you're google.com?

nope!

the certificate itself only contains the public key -- it's not secret at all. To actually establish a TLS connection for google.com, you also need a separate private key. The private key is the secret part.

can you use the same TLS certificate forever?

no!

every certificate has an expiration date, usually 3 months to a year after it was issued. This means that even in the worst case where a Bad Guy steals your certificate's private key, it will only be useful to them for a limited amount of time.

what do you need to do to get a certificate signed?

prove that you own the website

with Let's Encrypt, you prove you own the website the certificate is for by setting a DNS record or uploading a file

can you use the same certificate for more than one hostname?

yes!

there are 2 ways to do this:

  1. use a "wildcard" certificate, like "*.google.com"
  2. list multiple hostnames that the certificate is valid for when you create it, like apple.com and apple.com.cn

do you need a certificate authority (like Let's Encrypt or Symantec) to create a TLS certificate?

no!

you can make a "self-signed" TLS certificate on your computer in 2 minutes. But because that certificate isn't signed by a trusted certificate authority, browsers won't accept it.

how does a browser check that your certificate is signed by someone it trusts?

it has a hardcoded list

your browser (or sometimes your OS) has a hardcoded list of trusted certificate authorities.

can anybody create a certificate authority?

yes!

you can create certificate authority and start signing certificates with it on your laptop in 10 minutes. But no browser will trust your certificate authority unless you explicitly configure the browser to trust it yourself.

more reading