Skip to the workspace
Pebellslearn by building
Networking & Protocols  ›  Lesson

SSL and TLS — Certificates and Trust

SSL / TLS 12 minTLS encrypts and protects a connection and a CA-signed certificate proves the server's identity, so every certificate error comes down to trust, name or date.

devops / SSL and TLS — Certificates and Trust

Explore each scene at your own pace.

01 · The rule

The rule

SSL and TLS — Certificates and Trust

At midnight every browser starts showing "Your connection is not private" for notes.example.com. No code changed. The certificate simply expired. Understanding what a certificate proves, and automating its renewal, prevents one of the most common outages there is.

The rule

TLS encrypts the connection, and a trusted certificate proves who is at the other end.

TLS (Transport Layer Security) protects a connection in three ways: encryption so nobody can read it, integrity so nobody can alter it unnoticed, and authentication so you know you reached the real server. SSL is the name of its older predecessor; every SSL version and early TLS versions are now considered insecure, and servers should offer only TLS 1.2 and 1.3. People still say "SSL certificate" out of habit.

A certificate binds a public key to one or more domain names, with validity dates, and is signed by a certificate authority (CA). Your browser or operating system ships a list of trusted root CAs. The server sends its certificate plus any intermediate certificates, forming a chain from the site up to a trusted root.

The browser checks three things: is the chain signed by a root it trusts, does the name match the host it asked for, and is today inside the validity dates?

Certificates are deliberately short-lived, measured in months at most, and getting shorter. Free CAs such as Let's Encrypt are designed for automatic renewal with a client such as certbot, which renews well before expiry.

openssl s_client -connect notes.example.com:443 -servername notes.example.com </dev/null
openssl s_client -connect notes.example.com:443 -servername notes.example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.