Labs / Speaking Protocols / HTTP, TLS & mail

Lab 2 of 4 · HTTP, TLS & mail

TLS certificates: chains, trust and what breaks them

Read a certificate chain, see what breaks it, and trust a self-signed one.

Open this lab Pro 5 steps

The idea

A certificate says who a server is and who vouches for it. Read TLS certificates, then see what breaks them: the laptop visits four web servers across officeRouter (shop, blog, forum and staging) and the office printer.

Who vouches for whom
Who vouches for whom
Encrypted is not the same as trusted
Encrypted is not the same as trusted

Steps

  1. What a certificate says, and who signed it

    Encryption alone is not enough: you must also know you reached the real shop, not someone posing as it. https:// is HTTP inside TLS, and the server starts by showing a certificate. Fetch shop's page with -v and read what its certificate says.

    laptop:~# curl -sv https://shop.lab/
  2. SNI and ALPN: what the hello says

    TLS starts with a hello from the client, before anything is encrypted, because the two sides must agree how to encrypt first. Fetch shop's page again while officeRouter prints the bytes passing on Port 443.

    laptop:~# curl -sv https://shop.lab/

Pro

3 more steps in the app

  1. A server that forgets the intermediate
  2. Expired, or the wrong name
  3. Self-signed: the printer's own certificate
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab