| |

Internet Backend 07 ๐ŸŒ HTTPS and Certificate Authorities

โฑ๏ธ Estimated read: 12 min | |

HTTPS is not a protocol in its own right. It is HTTP carried over a TLS connection, and the TLS connection is what provides the three properties that plain HTTP does not: authenticity, confidentiality, and integrity . The authenticity is the property that the client is talking to the real server and not to an impersonator; the confidentiality is the property that the data is encrypted in transit; the integrity is the property that the data has not been modified. The TLS handshake provides all three, but the authenticity depends on a third party that both the client and the server trust: the Certificate Authority.

The CA is the entity that issues the certificate. The certificate binds the server’s public key to its identityโ€”the domain nameโ€”and the CA signs the certificate with its own private key. The client’s browser has a store of the CA’s public keys, and it uses them to verify the signature. If the signature is valid and the certificate is for the domain the client is connecting to, the client trusts that the public key belongs to the server . The chain of trust is the mechanism: the browser trusts the root CA, the root CA signs the intermediate CA, the intermediate CA signs the server certificate, and the chain is verified from the server up to the root.

Key point: HTTPS is HTTP over TLS. The certificate authority issues the certificate that binds the server’s public key to its domain, and the browser verifies the certificate against its trusted root store. The validation levelโ€”DV, OV, or EVโ€”determines how thoroughly the CA checks the identity behind the domain. The certificate revocation is the mechanism that removes the trust when the private key is compromised, and it is implemented with the CRLs, the OCSP, and the OCSP stapling.


Why the certificate authority is the trust anchor

The authentication problem. The Diffie-Hellman key exchange establishes a shared secret between the client and the server, but it does not prove who the server is. An attacker who intercepts the connection can perform the key exchange with the client and pretend to be the server. The certificate is the mechanism that prevents the impersonation: the server presents the certificate, the client verifies the CA’s signature, and the client checks that the certificate’s domain matches the domain it is connecting to . The CA is the trust anchor, and the browser’s root store is the list of anchors it trusts.

The chain of trust problem. The root CA’s private key is kept offline, and the root certificate is embedded in the browser. The root CA does not sign the server certificates directly. It signs the intermediate CA certificates, and the intermediate CAs sign the server certificates. The chain is the mechanism that protects the root key: a compromise of an intermediate CA does not compromise the root, and the intermediate can be revoked . The browser verifies the chain from the server certificate up to the root, checking the signature at each step and the validity period at each certificate.

The validation levels. The CA does not check the same things for every certificate. The Domain Validation (DV) checks only that the applicant controls the domain, usually through an email or a DNS record. The Organization Validation (OV) checks the domain and the organization’s identity. The Extended Validation (EV) checks the domain and performs an extensive vetting of the organization’s legal existence . The validation level does not change the encryption strength; it changes the amount of identity verification the CA performs before it issues the certificate .

The trade-off. The certificate is a single point of trust. If the CA is compromised or misissues a certificate, the attacker can impersonate any domain the CA signs. The Certificate Transparency logs are the mechanism that makes the misissuance detectable: every certificate is logged in a public append-only ledger, and the domain owners can monitor the logs for the certificates they did not request. The revocation is the mechanism that removes the trust after the fact, but it is imperfect because the browsers do not always check it reliably .


a. The certificate types and the validation levels

The certificates are categorized by what they cover and by how thoroughly the CA verifies the identity. The coverage is the domain scope, and the validation level is the identity check.

The domain scope determines which hostnames the certificate is valid for. A single-domain certificate covers one Fully Qualified Domain Name and all its pages. A wildcard certificate covers the domain and all its first-level subdomains (*.example.com). A Subject Alternative Name (SAN) certificate covers multiple distinct domain names in a single certificate . The wildcard and the SAN are the coverage mechanisms, and they are independent of the validation level.

Single domain: example.com and example.com/*
Wildcard: *.example.com (www, app, blog, but not example.com itself)
SAN: example.com, example.net, example.org

The validation level determines how thoroughly the CA checks the applicant’s identity. The DV is the lowest level: the CA checks only the domain control, and the certificate is issued in minutes. The OV checks the organization’s registration and the contact details, and the certificate is issued in one to four business days. The EV performs a comprehensive review of the legal, operational, and domain ownership, and it is issued in one to seven business days . The validation level is the trust indicator, and it is the choice that depends on the site’s risk profile.

DV: The blog, the landing page, the internal tool.
OV: The business site with the login and the customer data.
EV: The e-commerce, the financial service, the high-trust platform.

The Let’s Encrypt CA issues only the DV certificates, and it is the free option that made the HTTPS ubiquitous . The commercial CAs issue the OV and the EV certificates, and they charge for the identity verification. The self-signed certificate is the fourth option: it does not have a CA signature, and the browser treats it as untrusted unless the user manually adds it to the trust store. The self-signed certificate is for the internal environments and the development, not for the production .


b. The revocation and the OCSP

The certificate revocation is the mechanism that removes the trust before the certificate expires. The private key can be compromised, the domain can change ownership, or the certificate can be misissued. The CA revokes the certificate, and the revocation is communicated to the clients through the Certificate Revocation Lists (CRLs) or the Online Certificate Status Protocol (OCSP) .

The CRL is a list of the revoked certificate serial numbers. The client downloads the list and checks whether the certificate’s serial number is in it. The CRL is simple, but it is inefficient: the list can be large, and the client must download the entire list to check a single certificate . The browser vendors have introduced the summarized CRLsโ€”the CRLite in Firefox and the CRLSets in Chromeโ€”which compress the lists into a smaller format and push the updates to the browsers, avoiding the per-site download .

The OCSP is the alternative. The client sends a query to the CA’s OCSP responder, and the responder returns the status of the single certificate. The OCSP is more efficient than the CRL, but it has the privacy problem: the CA can observe the client’s browsing behavior by monitoring the OCSP requests. The OCSP also has the availability problem: if the responder is down, the client may treat the certificate as valid, which is the soft-fail behavior that the attackers can exploit .

The OCSP stapling is the improvement. The server obtains the OCSP response from the CA ahead of time and staples it to the certificate during the TLS handshake. The client receives the response with the certificate, and it does not need to contact the CA. The OCSP stapling improves the privacy and the performance, but it does not solve the soft-fail problem: the client still accepts the certificate if the stapled response is missing . The OCSP Must-Staple extension is the fix: it tells the client to expect the stapled response, and to reject the certificate if it is missing .


Complete Example Session

// ============================================
// PART 1: THE HTTPS HANDSHAKE
// ============================================

// The client connects to the server on port 443.
// The server presents the certificate.
// The client verifies the certificate chain up to the trusted root.
// The client checks the domain name and the validity period.
// The client and the server establish the session key.
// The application data is encrypted with the session key.

// ============================================
// PART 2: THE CERTIFICATE CHAIN
// ============================================

// The server certificate (leaf) is signed by the intermediate CA.
// The intermediate CA certificate is signed by the root CA.
// The root CA certificate is in the browser's trust store.
// The client verifies each signature in the chain.

// ============================================
// PART 3: THE VALIDATION LEVELS
// ============================================

// DV: The CA checks the domain control.
// OV: The CA checks the domain and the organization.
// EV: The CA checks the domain, the organization, and the legal existence.

// ============================================
// PART 4: THE CERTIFICATE TYPES
// ============================================

// Single domain: example.com.
// Wildcard: *.example.com.
// SAN: example.com, example.net, example.org.

// ============================================
// PART 5: THE REVOCATION
// ============================================

// The private key is compromised โ†’ the certificate is revoked.
// The CRL: the list of the revoked serial numbers.
// The OCSP: the query for the single certificate.
// The OCSP stapling: the server staples the response.

// ============================================
// PART 6: THE OCSP MUST-STAPLE
// ============================================

// The extension tells the client to expect the stapled response.
// The client rejects the certificate if the response is missing.
// It solves the soft-fail problem.

// ============================================
// PART 7: THE CERTIFICATE TRANSPARENCY
// ============================================

// Every certificate is logged in a public append-only ledger.
// The domain owner can monitor the logs for the unexpected certificates.
// The misissuance is detectable.

// ============================================
// PART 8: THE COMMON FAILURES
// ============================================

// The certificate is expired โ†’ renew it.
// The chain is incomplete โ†’ add the intermediate certificates.
// The hostname mismatch โ†’ use the correct certificate.
// The private key is missing โ†’ restore it or reissue the certificate.
// The certificate is revoked โ†’ obtain a new certificate.

// ============================================
// PART 9: THE SERVER CONFIGURATION
// ============================================

// The server sends the leaf certificate and the intermediates.
// The server enables the OCSP stapling.
// The server sets the HSTS header.
// The server uses the TLS 1.2 and 1.3.

// ============================================
// PART 10: THE CHECKLIST
// ============================================

// [ ] The certificate is issued by a trusted CA.
// [ ] The certificate covers the correct domain names.
// [ ] The certificate chain is complete.
// [ ] The certificate is not expired.
// [ ] The OCSP stapling is enabled.
// [ ] The HSTS header is set.
// [ ] The certificate is monitored for the expiration.

The ten parts covered the HTTPS handshake, the certificate chain, the validation levels, the certificate types, the revocation, the OCSP Must-Staple, the Certificate Transparency, the common failures, the server configuration, and the checklist. The through-line is that the CA is the trust anchor, and the certificate is the binding between the public key and the identity.


Quick Reference

The validation levels

LevelWhat the CA checksIssuance timeUse case
DVThe domain controlMinutesThe blog, the landing page, the internal tool
OVThe domain and the organization1โ€“4 daysThe business site with the login
EVThe domain, the organization, and the legal existence1โ€“7 daysThe e-commerce, the financial service

The certificate types

TypeCoverageExample
Single domainOne FQDNexample.com
WildcardThe domain and the first-level subdomains*.example.com
SANMultiple distinct domainsexample.com, example.net

The revocation mechanisms

MechanismHow it worksLimitation
CRLThe list of the revoked serial numbersLarge, inefficient
OCSPThe query for the single certificateThe privacy, the availability
OCSP staplingThe server staples the responseThe soft-fail
OCSP Must-StapleThe client rejects the missing responseThe deployment

Best Practices

โœ… Do This:

// Use the certificate from a trusted CA.
// Use the wildcard or the SAN for the multiple domains.
// Complete the certificate chain with the intermediates.
// Enable the OCSP stapling.
// Monitor the certificate expiration.

โŒ Don’t Do This:

// Use the self-signed certificate in production.
// Ignore the certificate expiration.
// Use the DV certificate for the high-trust site.
// Disable the revocation checking.

Common Pitfalls

PitfallWhy It HappensFix
The browser shows the “not secure” warningThe certificate is self-signed or expiredUse the trusted CA and renew
The handshake failsThe chain is incompleteAdd the intermediate certificates
The certificate is rejectedThe hostname does not matchUse the correct certificate
The revocation is not checkedThe OCSP responder is downUse the OCSP stapling or the CRL
The certificate expires unexpectedlyThe renewal is not automatedUse the ACME and the monitoring

Summary

ItemValue
HTTPSHTTP over TLS, providing the authenticity, confidentiality, and integrity
CAThe trust anchor that signs the certificate
CertificateThe binding between the public key and the domain
Chain of trustThe root โ†’ the intermediate โ†’ the server
Validation levelsDV, OV, EV
Certificate typesSingle domain, wildcard, SAN
RevocationCRL, OCSP, OCSP stapling, OCSP Must-Staple
Certificate TransparencyThe public log of the issued certificates

Key takeaways:

  • HTTPS is HTTP over TLS, and the CA is the trust anchor. The certificate binds the server’s public key to the domain, and the browser verifies the CA’s signature against its trusted root store. The chain of trust is the mechanism that protects the root key and allows the revocation of the intermediates .
  • The validation level determines the identity verification, not the encryption strength. The DV checks the domain control, the OV checks the organization, and the EV checks the legal existence. The encryption is the same for all three .
  • The certificate coverage is the domain scope. The single-domain covers one FQDN, the wildcard covers the first-level subdomains, and the SAN covers the multiple distinct domains .
  • The revocation is the mechanism that removes the trust. The CRL is the list of the revoked serial numbers, the OCSP is the query for the single certificate, and the OCSP stapling is the server-provided response. The OCSP Must-Staple is the fix for the soft-fail problem .
  • The Certificate Transparency makes the misissuance detectable. Every certificate is logged in a public append-only ledger, and the domain owner can monitor the logs for the unexpected certificates.

Remember: HTTPS is HTTP over TLS, and the TLS connection is only as trustworthy as the certificate. The certificate is issued by the CA, and the CA is the trust anchor that the browser’s root store lists. The validation level is the identity check, and the certificate type is the domain coverage. The revocation is the mechanism that removes the trust when the key is compromised, and it is imperfect because the browsers do not always check it. The certificate is the binding, the CA is the anchor, and the chain is the verification.

Was this helpful?


Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!