By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
(Zero-fluff, hyper-practical guide for engineers and exam takers)
Digital signatures, certificates, and the chain of trust are the backbone of secure communication in modern IT. Without them: - Your HTTPS website would be flagged as "Not Secure" in browsers. - Software updates could be tampered with (e.g., a malicious actor injecting malware into a Windows update). - Email spoofing would run rampant (e.g., a CEO’s "urgent wire transfer" email actually coming from a hacker).
Real-world scenario: You’re a sysadmin at a healthcare company. A new compliance audit requires all internal servers to use mutual TLS (mTLS) for API communication. If you don’t understand digital signatures and certificate chains, you’ll either: - Break the system (e.g., misconfigured certificates causing outages). - Fail the audit (e.g., using self-signed certs where a trusted CA is required).
This guide will teach you: ? How digital signatures prove authenticity and integrity. ? How certificates bind identities to public keys. ? How the chain of trust prevents man-in-the-middle attacks. ? Hands-on steps to generate, verify, and troubleshoot certificates.
.exe
CN=example.com
CN=Let’s Encrypt
Not Before: 2024-01-01, Not After: 2024-04-01
*.example.com
example.com
/etc/ssl/certs
Keychain Access
openssl version
openssl genpkey -algorithm RSA -out example.key -pkeyopt rsa_keygen_bits:2048
example.key
openssl req -new -key example.key -out example.csr -subj "/CN=example.com"
-addext "subjectAltName=DNS:example.com,DNS:www.example.com"
openssl x509 -req -days 365 -in example.csr -signkey example.key -out example.crt
-days 365
openssl x509 -in example.crt -text -noout
Check for: - Issuer: Should be CN=example.com (self-signed). - Validity: Ensure the dates are correct. - Public Key: Matches the private key (openssl pkey -in example.key -pubout -outform pem | diff - example.crt).
openssl pkey -in example.key -pubout -outform pem | diff - example.crt
bash openssl genpkey -algorithm RSA -out rootCA.key -pkeyopt rsa_keygen_bits:4096 openssl req -x509 -new -key rootCA.key -days 3650 -out rootCA.crt -subj "/CN=MyRootCA"
bash openssl genpkey -algorithm RSA -out intermediateCA.key -pkeyopt rsa_keygen_bits:2048 openssl req -new -key intermediateCA.key -out intermediateCA.csr -subj "/CN=MyIntermediateCA" openssl x509 -req -in intermediateCA.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out intermediateCA.crt -days 365
bash openssl x509 -req -in example.csr -CA intermediateCA.crt -CAkey intermediateCA.key -CAcreateserial -out example.crt -days 365
bash cat example.crt intermediateCA.crt rootCA.crt > fullchain.crt openssl verify -CAfile rootCA.crt -untrusted intermediateCA.crt example.crt
example.crt: OK
bash openssl s_server -cert example.crt -key example.key -accept 443 -www
https://localhost
rootCA.crt
.gitignore
service-environment-type.key
api-prod-rsa.key
ERR_CERT_AUTHORITY_INVALID
cat cert.crt intermediate.crt > fullchain.crt
Exam trap: "Which key is used to verify a digital signature?"-Public key.
Certificate types:
Exam trap: "Which cert is at the top of the chain?"-Root CA.
Revocation methods:
Exam trap: "Which is more efficient for real-time checks?"-OCSP.
Certificate formats:
-----BEGIN CERTIFICATE-----
Q: "Your company’s website shows a certificate error. The error says ‘The certificate is not trusted because it is self-signed.’ What should you do?" - A: Replace the self-signed cert with one from a trusted CA (e.g., Let’s Encrypt).
Q: "An attacker intercepts HTTPS traffic by presenting a fake certificate. How can you prevent this?" - A: Use certificate pinning (hardcode the expected cert in the app).
Q: "A server’s certificate expired yesterday. What’s the quickest way to fix this?" - A: Renew the cert (if using ACM/Let’s Encrypt) or generate a new one.
You’re setting up a new web server. Generate a self-signed certificate for localhost, then verify it using OpenSSL.
localhost
# Generate private key openssl genpkey -algorithm RSA -out localhost.key -pkeyopt rsa_keygen_bits:2048 # Generate self-signed cert openssl req -x509 -new -key localhost.key -days 365 -out localhost.crt -subj "/CN=localhost" # Verify openssl x509 -in localhost.crt -text -noout | grep -A 1 "Subject:"
Why it works: - The -subj "/CN=localhost" ensures the cert is valid for localhost. - The grep command confirms the Common Name (CN) is correct.
-subj "/CN=localhost"
grep
openssl genpkey -algorithm RSA -out key.pem
-pkeyopt rsa_keygen_bits:2048
openssl req -new -key key.pem -out csr.pem
-subj "/CN=example.com"
openssl x509 -req -in csr.pem -signkey key.pem -out cert.pem
openssl verify -CAfile root.crt cert.pem
-untrusted
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.