Post-quantum TLS readiness
Enable hybrid PQC on HAProxy
HAProxy uses the TLS groups provided by the SSL library it was built with. With OpenSSL 3.5 or later, set X25519MLKEM768 first on bind curves and keep a classical fallback.
Minimum versions
HAProxy built with OpenSSL 3.5 or later. Confirm with `haproxy -vv` (look at the SSL library line). PQC support comes from the library, not from a separate HAProxy feature flag; a maintainer confirmed this on haproxy/haproxy#3171.
Configuration
haproxy.cfg
global
# Applies to every bind line that does not set its own curves.
ssl-default-bind-curves X25519MLKEM768:X25519:P-256
ssl-default-bind-options ssl-min-ver TLSv1.2
# Or per listener:
frontend https
bind :443 ssl crt /etc/haproxy/certs/site.pem curves X25519MLKEM768:X25519:P-256
How to verify
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null 2>&1 | grep -E "Negotiated TLS1.3 group|Server Temp Key|handshake failure"
# Expect: Negotiated TLS1.3 group: X25519MLKEM768
# Needs OpenSSL 3.5+ on the machine running the command (otherwise a failure is a false negative).
# Or: pqcscan HOST
Notes
- The official HAProxy manual documents `ssl-default-bind-curves` and the per-bind `curves` option as a colon-delimited list of curve/group names. The names themselves come from OpenSSL (IANA TLS Supported Groups).
- Keep at least one classical group (`X25519` or `P-256`) so older clients can still connect. Hybrid groups are TLS 1.3 only.
- Validate with `haproxy -c -f /etc/haproxy/haproxy.cfg` before a reload. `ssl_fc_curve` can log the negotiated group.
Fix with your agent
Paste this into Cursor, Claude Code or Codex in the repo that terminates TLS. Review the PR, and test in staging first. The packaged skill is not published yet.
You are fixing TLS key exchange for post-quantum readiness (hybrid X25519MLKEM768).
1. If I have a pqc-report.json, read it. Otherwise run:
openssl s_client -tls1_3 -groups X25519MLKEM768 -connect HOST:443 </dev/null
(needs OpenSSL 3.5+; a handshake failure means the server does not offer hybrid).
2. Find TLS config in this repo: nginx (ssl_ecdh_curve), Caddy (tls { curves }), HAProxy (ssl-default-bind-curves),
Node (ecdhCurve), Go (tls.Config.CurvePreferences), Dockerfile base images.
3. Enable X25519MLKEM768 FIRST with classic fallback (X25519, secp256r1). Never remove the fallback.
4. Flag anything pinned to OpenSSL < 3.5, Go < 1.24 or an old Node, and propose a version bump. Do not bump silently.
5. If TLS terminates at Cloudflare or an AWS ALB/CloudFront, tell me to change that service's TLS policy instead of editing origin config.
6. Grep for RSA/ECDH/ECDSA usage in code and add `// TODO(crypto-agility)` comments only. Do not change certificates or key types.
7. Open a PR that explains each change, how to verify it, and how to roll back.
Sources
- HAProxy 3.2 configuration manual: ssl-default-bind-curves and bind curves
- OpenSSL 3.5: hybrid groups and default list
- haproxy/haproxy#3171: PQC is provided by the SSL library
Reviewed 4 Dec 2026 against the official pages linked above. If a vendor page has since changed, follow the vendor page. Other stacks: nginx · Caddy · Node.js · Go · OpenSSL · Cloudflare · AWS Application Load Balancer · Java (JDK)