>_ IzzyLab

Hands-on task

This task is step 9 of the course “TLS and certificates”

Sign a certificate with your CA

medium~7 min

You have a CA (/root/ca.crt, /root/ca.key) and a CSR (/root/server.csr) for app.local. Sign the CSR with your CA, issuing the certificate /root/server.crt for 365 days.

Browsers match the site name against the SAN field, not the CN, so the certificate must have a subjectAltName with DNS:app.local. Extensions are taken from a file at signing time: add it to /root/server.ext (open it in the Editor tab) and pass that file when signing.

What you'll practise:
  • openssl
  • pki
  • signing a csr
  • issuer

Topic breakdown

Signing a CSR means stepping into the role of a CA and vouching for someone else's request with your own root; that's how all of PKI is built, from Let's Encrypt to corporate authorities. This is done by the openssl x509 subcommand in request-accepting mode: the inputs are the CSR itself, the CA certificate, and its private key, which is what produces the signature. Every issuance needs a unique serial number (a separate flag handles this by creating a counter), and the finished cert inherits the public key and subject from the CSR but gets the issuer of your CA.

What's checked

  1. Certificate issued
  2. Certificate is signed by your CA
  3. the certificate is issued from server.csr
  4. valid for 365 days
  5. the certificate has the SAN DNS:app.local

What it looks like