CY5: Network defence and hardening

Lesson 3 of 5 ยท reading 15โ€“25 minutes; practice and project time is on the module page

TLS and certificates

๐ŸŽฏYou'll be able to

Explain what HTTPS protects, check a site's certificate, and avoid common TLS mistakes.

๐Ÿ The everyday picture

A sealed envelope with the sender's verified stamp. Postal staff can see where it's going, but can't read or change the letter, and you can tell who sent it.

๐Ÿ“˜What it really is

๐Ÿ“A worked example

Input: you want to check the certificate of a site you own.

Steps:

  1. In the browser, click the padlock and open the certificate details.
  2. Note the name it was issued for, the issuer, and the expiry date.
  3. Run openssl s_client -connect yoursite.example:443 -servername yoursite.example </dev/null on your own site and look for the protocol line.

Expected output: the site name matches, the expiry is in the future, and the protocol is TLS 1.2 or 1.3.

๐ŸŒWhere it's used

๐Ÿ“Case scenario

A popular food delivery app went down for hours because a certificate on an internal service expired over a weekend. No data was lost, but orders failed. They added expiry alerts at 30, 14 and 7 days, and automated renewal.

๐Ÿ–ฑ๏ธTry it

Open the certificate details for three sites you use. Success: you can name each certificate's issuer and expiry date.

โš ๏ธCommon mistakes

๐Ÿ› ๏ธFor your project

The fixed AarogyaDesk sends Strict-Transport-Security, and the capstone notes say how certificates are renewed and monitored.

โœ…Quick check

What does the browser padlock tell you?

Show the answer

The connection is encrypted and the certificate matches the site's name; not that the site is trustworthy.

Why is HSTS useful?

Show the answer

It makes browsers use HTTPS for the site from then on, preventing downgrades to plain HTTP.

โ† PreviousFirewalls and segmentation
ProLearners Assist