{"canonical_url":"https://engineer.company/glossary/tls/","content_markdown":"# TLS\n\n## What it is\n\nTransport Layer Security, TLS for short, is the protocol a client and a server\nuse to protect their application data from eavesdropping and unnoticed changes,\nand to authenticate the other end. Usually the client authenticates the server;\nclient authentication is optional. Product menus and certificate shops still\ncall it SSL, after the Secure Sockets Layer protocol it replaced. RFC 7568\ndeprecated the last SSL version in June 2015, so anything labelled SSL today is\nTLS underneath, or ought to be.\n\nTLS sits between an application protocol and the transport below it. HTTPS is\nHTTP carried inside a TLS connection, and the same layer protects mail\nsubmission, IMAP, database connections and the Gemini protocol. HTTP/3 goes\nfurther: it runs over QUIC, which builds the TLS 1.3 handshake into the\ntransport itself instead of layering it on TCP, as RFC 9001 describes.\n\nThe current version is TLS 1.3. RFC 9846, published in July 2026, updates its\nspecification without changing the version number; it replaces RFC 8446 from\nAugust 2018. A normal certificate-based connection opens with a handshake. The\nclient sends a ClientHello listing the versions, cipher suites and key shares it\nsupports, usually with Server Name Indication (SNI), the host name it wants, so\nthat one address can serve many sites. The server chooses and sends its\nServerHello. The handshake messages that follow are encrypted, including the\ncertificate it presents. That certificate chain ties the server's key to a\ncertificate authority the client already trusts. The client checks the chain,\nthe name and the dates, and the server proves it holds the matching private key\nby signing the handshake. A resumed connection can instead authenticate through\na pre-shared key established earlier.\n\nThree things set 1.3 apart from 1.2. An ordinary full handshake takes one\nround trip instead of two, although a retry can add another. Public-key-based\nkey establishment provides forward secrecy: a recording of today's traffic\nstays sealed even if the server's long-term private key leaks next year.\nThe pre-shared-key-only mode is an exception and does not provide forward\nsecrecy. And a returning client may send “early data” with its very first\nmessage, known as 0-RTT, before the handshake finishes, at a price the RFC spells\nout: early data is neither forward secret nor protected against being replayed\non another connection.\n\n## Why it matters\n\nUsing TLS is settled. The decisions that remain are which versions to accept\nand where the encrypted connection ends.\n\nVersions first. RFC 8996, published in March 2021, says TLS 1.0 and 1.1 must not\nbe used. BCP 195 includes RFC 9325 and its July 2026 updates. RFC 9852 requires\nnew protocols using TLS to support and default to 1.3; it allows 1.2 as an\nadditional, non-default option for interoperability. That is not a universal\nrequirement for 1.3-only deployment. RFC 10015 also prohibits RSA key exchange\nand finite-field Diffie–Hellman key exchange in TLS 1.2, including ephemeral\nfinite-field DH; this does not prohibit RSA signatures on certificates.\nFor an existing service that needs older clients, retain only securely\nconfigured 1.2 alongside 1.3, with ECDHE and authenticated encryption such as\nAES-GCM. A 1.3-only service has a smaller attack surface and a shorter\nconfiguration, and it shuts out every client that speaks 1.2 at most: an older\nphone, a card terminal, a partner's integration on an old Java runtime.\nLog the negotiated version for a few weeks, then decide on the numbers rather\nthan on what sounds modern.\n\nTermination second. Wherever TLS ends, the private key lives there and the\ntraffic turns back into plain text. There are three common places for it:\n\n- **A CDN or a cloud load balancer.** The provider holds the key, or a\n  certificate it issued itself, absorbs the handshake load, and sees every\n  request in the clear. The hop from there to the origin needs TLS of its own,\n  or it crosses the network unencrypted.\n- **A reverse proxy on the host,** such as Nginx, Apache, HAProxy or Caddy. One\n  process holds the keys for every site on the machine and passes plain requests\n  to the applications behind it over loopback or a local socket.\n- **The application itself.** Each service holds its own key. That suits\n  traffic between services and mutual TLS, where the client presents a\n  certificate as well, and it multiplies the places where a certificate has to\n  be renewed.\n\nMost estates mix all three. What counts is that someone can say, for each hop,\nwhere the plain text is and who could read it.\n\n## What it looks like in practice\n\nThe company's September 2026 public-services implementation shows how little\nTLS termination needs. It used a single-core cloud instance with 512 MB of\nmemory, about 464 MB of it usable, and 10 GB of disk. On it\n[the web server terminated TLS for seven domains](/portfolio/a-whole-company-on-one-small-server/)\nalongside the git forge, a Tor onion service, a Gemini server, a Gopher server\nand intrusion banning. Backup automation was implemented separately; that did\nnot establish that encrypted backups were active. That was termination on the\nhost at its plainest: one web server answered for all seven sites, and their\nencryption cost no extra machine and no extra service. The design treated\nmemory as the binding constraint, and the recorded deployment ran inside those\n464 MB.\n\nThe rule the company works to is written on its\n[security page](/security/): encryption in transit everywhere, with\ncertificates issued and renewed automatically and the renewal monitored. The\nreason given there is that TLS most often fails through a certificate nobody\nwas watching. The failures below are the ones left once renewal runs by itself.\n\n## Where it goes wrong\n\n**Some clients drop with a handshake failure while browsers connect fine.** The\ntwo ends share no version or cipher suite. Someone narrowed the server to 1.3\nonly, or to a short list of suites, and an older client offers nothing on it;\nor a server still offering only CBC suites meets a client that dropped them.\nThe alert says “handshake failure” or “protocol version” and little else. Test\neach version from outside:\n\n```sh\nopenssl s_client -connect example.com:443 \\\n    -servername example.com -tls1_2 \u003c/dev/null\n```\n\nLog the negotiated version and suite before narrowing anything. On an existing\nservice whose clients still need 1.2, keep securely configured 1.2 with ECDHE and\nAES-GCM next to 1.3 while planning the migration. For a new protocol using TLS,\nsupport and default to 1.3; enable 1.2 only when interoperability requires it.\n\n**Browsers trust the certificate, and scripts, curl and mobile apps reject it.**\nThe server sends its own certificate without the intermediate that links it to\nthe root. Browsers often fill the gap from intermediates they have met before\nor fetch the missing one themselves; most TLS libraries do neither and report\nan unknown issuer. Configure the full chain file, the server's certificate\nfirst and then the intermediates, and test with a client that keeps no cache:\nthe `openssl s_client` line above prints the chain the server actually sent.\n\n**Certificate checking is switched off “for now”, and the setting ships.** A\ntest server with a self-signed certificate, or a corporate proxy that re-signs\ntraffic, and someone adds `verify=False`, `curl -k`, `InsecureSkipVerify` or\n`NODE_TLS_REJECT_UNAUTHORIZED=0`. The connection stays encrypted, to whoever\nanswers it: anyone in between can present a certificate of their own and read\neverything. Put the right CA certificate in the client's trust store, or point\nthe client at it explicitly, and make CI fail on those flags.\n\n**Some visitors get a certificate for a different site.** The server presents\nits default certificate whenever a ClientHello names a host it has no\nconfiguration for, or names none at all. That happens when a new domain is\npointed at the address before its server block exists, and when a monitoring\nprobe or an old client sends no SNI. The browser shows a name mismatch, and\non a shared host it also tells the visitor which other sites live there. Give\nevery public name its own block and a certificate that covers it, and make the\ndefault block refuse the handshake rather than offer a stranger's certificate.\n\n**A payment, or any other request, is carried out twice.** The terminator\naccepts 0-RTT early data, a POST arrives inside it, and an attacker or a\nnetwork retry sends the same bytes again on a new connection. TLS 1.3 permits\nearly data but cannot guarantee protection against replay between connections.\nEither disable early data, defer acting on it until the handshake completes,\nor reject requests that cannot safely be replayed with 425 Too Early, as RFC\n8470 specifies. A gateway must also pass on the Early-Data indication and know\nthat its origin understands it: waiting on a later hop does not erase the\nreplay risk from an earlier one.\n\n## Further reading\n\n- [RFC 9846: The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc9846)\n  — the July 2026 specification, replacing RFC 8446 without changing the\n  protocol's 1.3 version number; handshake, records and early-data limitations.\n- [RFC 9325: Recommendations for Secure Use of TLS and DTLS](https://www.rfc-editor.org/rfc/rfc9325)\n  — the deployment recommendations in BCP 195, read with the following updates.\n- [RFC 9852: New Protocols Using TLS Must Require TLS 1.3](https://www.rfc-editor.org/rfc/rfc9852)\n  — mandatory 1.3 support and default for new protocols, with optional 1.2\n  interoperability; the update does not apply to DTLS.\n- [RFC 10015: Deprecating Obsolete Key Exchange Methods in TLS 1.2 and DTLS 1.2](https://www.rfc-editor.org/rfc/rfc10015)\n  — prohibited RSA and finite-field DH key exchanges, distinguished from\n  certificate signatures and from TLS 1.3 key establishment.\n- [RFC 8996: Deprecating TLS 1.0 and TLS 1.1](https://www.rfc-editor.org/rfc/rfc8996)\n  — the formal end of the two older versions and the reasons behind it.\n- [RFC 8470: Using Early Data in HTTP](https://www.rfc-editor.org/rfc/rfc8470)\n  — the Early-Data header, gateway coordination and the 425 status.\n\n\u003chttps://engineer.company/glossary/tls/\u003e\n","date_modified":"2026-11-09T21:50:25Z","description":"What TLS does to a connection, which versions to accept in 2026, where to terminate it, and the mistakes that surface as handshake failures.","formats":{"gemtext":"https://engineer.company/glossary/tls/index.gmi","gopher":"https://engineer.company/glossary/tls/gophermap","html":"https://engineer.company/glossary/tls/","json":"https://engineer.company/glossary/tls/index.json","markdown":"https://engineer.company/glossary/tls/index.md","pdf":"https://engineer.company/glossary/tls/index.pdf"},"kind":"page","language":"en","title":"What is TLS?","url":"https://engineer.company/glossary/tls/","version":1}