# How to check if a server uses post-quantum TLS (openssl, curl, browser, CI)

> Four ways to prove a TLS endpoint negotiates X25519MLKEM768: openssl s_client, curl, browser DevTools and a CI job that fails closed.

Source: https://pqshift.dev/learn/test-post-quantum-tls · Published 2026-12-04 · Updated 2026-12-04 · pqshift

Connect with a client that supports the hybrid group and read which group was negotiated. With OpenSSL 3.5+: `openssl s_client -connect host:443 -groups X25519MLKEM768`, then look for `X25519MLKEM768` as the negotiated group. In Chrome or Edge, DevTools → Security shows the key exchange for the page. To keep it from regressing, run the same check in CI and fail the build if the result is missing.

## 1. openssl s_client

Requires OpenSSL 3.5 or later on the machine you test **from** (`openssl version`).

```bash
# Offer only the hybrid group: success proves the server supports it
openssl s_client -connect example.com:443 -servername example.com \
  -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i "group"

# Offer only classical: success proves old clients still connect
openssl s_client -connect example.com:443 -servername example.com \
  -groups X25519 </dev/null 2>/dev/null | grep -i "group"
```

If the first command fails the handshake, the server doesn't support the hybrid group. If it prints `X25519MLKEM768`, it does. Run both: a migration that breaks classical clients is worse than no migration.

On macOS the system `openssl` is LibreSSL; use a Homebrew OpenSSL 3.5+ (`$(brew --prefix openssl@3)/bin/openssl`).

## 2. curl

curl built against OpenSSL 3.5+ accepts a group list and, in recent versions, prints the negotiated group in verbose output:

```bash
curl -sv --curves X25519MLKEM768 https://example.com -o /dev/null 2>&1 | grep -i "SSL connection"
```

## 3. Browser DevTools

Chrome, Edge and Firefox offer `X25519MLKEM768` by default. In Chrome or Edge: open DevTools → **Security** → select the origin. The connection details list the key exchange; `X25519MLKEM768` means the page was loaded over hybrid post-quantum TLS. This tests browser-to-edge only, not your origin or internal services.

## 4. Check your client, not just your server

To test whether **your code** (a Go service, a Node worker, a Java client) offers the hybrid group, point it at a server that requires or reports it. Cloudflare runs `pq.cloudflareresearch.com` for this. Or run a local test server that only accepts the hybrid group:

```bash
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 1 \
  -subj "/CN=localhost" -keyout key.pem -out cert.pem
openssl s_server -accept 8443 -cert cert.pem -key key.pem -groups X25519MLKEM768 -www
```

A client that connects successfully to that server offered `X25519MLKEM768`. One that fails didn't.

## 5. In CI, failing closed

A one-off check proves today's state. A CI job keeps it true when someone later pins `CurvePreferences` or downgrades a base image. The essentials:

- Run the check on every pull request that touches TLS config, Dockerfiles or runtime versions.
- Check both hybrid **and** classical fallback.
- **Fail closed**: if the job can't find a negotiated group in the output (timeout, garbled output, wrong client version), it fails. A check that passes when it can't tell is worse than none.

A minimal GitHub Actions step for a server you start in the job:

```yaml
- name: Prove hybrid post-quantum handshake
  run: |
    out=$(openssl s_client -connect localhost:8443 -groups X25519MLKEM768 </dev/null 2>&1 || true)
    echo "$out" | grep -q "X25519MLKEM768" || { echo "::error::hybrid group not negotiated"; exit 1; }
```

The runner's OpenSSL must be 3.5+. Use a container image that ships it if the runner's doesn't.

This is the check [pqshift](https://pqshift.dev/) adds to every migration PR it opens: a "pqshift proof" workflow that builds your code, performs a real hybrid handshake and a classical-fallback handshake, records the negotiated group and the run URL, and fails closed.

## Language guides

- [Go](https://pqshift.dev/learn/post-quantum-tls-go) · [Node.js](https://pqshift.dev/learn/post-quantum-tls-nodejs) · [Python](https://pqshift.dev/learn/post-quantum-tls-python) · [Java](https://pqshift.dev/learn/post-quantum-tls-java) · [Rust](https://pqshift.dev/learn/post-quantum-tls-rust) · [.NET](https://pqshift.dev/learn/post-quantum-tls-dotnet)
- [nginx, HAProxy, Apache](https://pqshift.dev/learn/post-quantum-tls-nginx) · [Caddy, Traefik](https://pqshift.dev/learn/post-quantum-tls-caddy) · [Cloud load balancers](https://pqshift.dev/learn/post-quantum-tls-cloud-load-balancers) · [Kubernetes](https://pqshift.dev/learn/post-quantum-tls-kubernetes) · [Mobile apps](https://pqshift.dev/learn/post-quantum-tls-mobile-apps) · [OpenSSH](https://pqshift.dev/learn/post-quantum-ssh-openssh)
- [Support table: who has it on by default](https://pqshift.dev/learn/post-quantum-tls-support)

## FAQ

### How can I tell if a website uses post-quantum encryption?

In Chrome or Edge open DevTools, Security tab, and look for X25519MLKEM768 in the connection's key exchange. From a terminal with OpenSSL 3.5+: openssl s_client -connect host:443 -groups X25519MLKEM768 and look for the negotiated group.

### Why does my test client say X25519 instead of X25519MLKEM768?

Either the server does not support the hybrid group, or your client doesn't: OpenSSL older than 3.5 and Go older than 1.24 can't offer it. Check the client version first.

## Sources

- [OpenSSL 3.5 release announcement](https://openssl-library.org/post/2025-03-25-openssl-3.5-beta/)
- [OpenSSL s_client manual](https://docs.openssl.org/3.5/man1/openssl-s_client/)
- [Cloudflare Radar: post-quantum encryption adoption](https://radar.cloudflare.com/adoption-and-usage#post-quantum-encryption)
