isquantumsafe Check a domain

isquantumsafe / Guides / Apache httpd (mod_ssl)

Post-quantum TLS on Apache httpd (mod_ssl)

Turn on X25519MLKEM768 hybrid post-quantum key exchange (ML-KEM) in Apache httpd with mod_ssl and OpenSSL 3.5, using SSLOpenSSLConfCmd Groups, then test it.

Default
Partly on by default
You need
httpd 2.4 with mod_ssl linked against OpenSSL 3.5.0 or newer
Updated
4 December 2026 · 4 sources

Apache httpd uses the OpenSSL default group list unless you override it, so it offers X25519MLKEM768 automatically when mod_ssl is linked against OpenSSL 3.5 or newer. With OpenSSL 3.4 or older there is no ML-KEM support, and you need a newer OpenSSL build before any setting will help.

Requirements

  • Apache httpd 2.4 with mod_ssl. SSLOpenSSLConfCmd is available in httpd 2.4.8 and later.
  • OpenSSL 3.5.0 or newer linked into mod_ssl. OpenSSL 3.5 changed the default groups to include and prefer hybrid PQC groups, and the default key shares to X25519MLKEM768 and X25519.
  • TLS 1.3 enabled in SSLProtocol.
  • Check the linked library in the error log at startup, or with httpd -V and ldd $(which httpd) on Linux. The system openssl version can differ from the library httpd loads.

Enable it

To set the order explicitly, add this to the <VirtualHost *:443> block or to the server config:

SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1

Groups is passed straight to OpenSSL's SSL_CONF API. Curves is a synonym in the OpenSSL manual, so older configs that use SSLOpenSSLConfCmd Curves work the same way. Hybrid comes first, and X25519 and P-256 stay as fallback for older clients.

If you serve an ECDSA certificate on P-384, add secp384r1 to the list. Restart with apachectl configtest && apachectl graceful.

Check it worked

From a machine with an OpenSSL 3.5 or newer client:

openssl s_client -connect example.com:443 -servername example.com \
  -groups X25519MLKEM768 -tls1_3 </dev/null 2>/dev/null | grep -i "group"

You should see Negotiated TLS1.3 group: X25519MLKEM768.

Run a free check at https://isquantumsafe.net/ to see the negotiated group and your grade.

Common problems

  • Old OpenSSL linked. On OpenSSL older than 3.5, X25519MLKEM768 is an unknown name and httpd refuses the config. Upgrade the OS or rebuild httpd against OpenSSL 3.5+.
  • EC parameters inside the certificate file. mod_ssl reads an EC curve name appended to the first SSLCertificateFile and, on OpenSSL 3, limits the server to that single curve. Remove an EC PARAMETERS block from the PEM file, or set SSLOpenSSLConfCmd Groups explicitly.
  • A hardening snippet pins classical groups. Lines such as SSLOpenSSLConfCmd Curves X25519:prime256v1 replace the default list and switch ML-KEM off. Put X25519MLKEM768 first.
  • TLS 1.2 only. Hybrid groups are TLS 1.3 only. If SSLProtocol excludes TLS 1.3, clients fall back to classical key exchange.

Sources

  1. Apache Module mod_ssl: SSLOpenSSLConfCmd
  2. SSL_CONF_cmd (OpenSSL 3.5 manual)
  3. OpenSSL 3.5 Series Release Notes
  4. SSL_CTX_set1_groups (OpenSSL 3.5 manual)

Other guides: Web servers