Pcornel
Linux · Certificates & TLS

Certificates

Cheat sheet · https://pcornel.dk/topic.php?topic=2870

Back to the Topic

Answer

An X.509 certificate contains subject, issuer, validity dates, public key, subjectAltName (names), key usage and extended key usage, signed by the issuer.

Remember

Clients match the host name against SANs. Expired or not-yet-valid (clock wrong) certificates fail. Extended key usage must include serverAuth for TLS servers.

First checks

  • openssl x509 -in <cert> -noout -subject -issuer -dates -ext subjectAltName — certificate details
  • openssl s_client -connect <host>:443 -servername <name> </dev/null — live chain and verification
  • openssl verify -CAfile <ca> -untrusted <chain> <cert> — chain validation
  • trust list | head / ls /etc/ssl/certs — system trust store

Verify in this order

certificate fields → client checks name, dates, usage, signature by issuer

Where it usually breaks

First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2870

Confirmation

Confirm action

Continue?