Enable post-quantum TLS on Apache
Apache's mod_ssl hands key exchange to OpenSSL. With OpenSSL 3.5 or newer it accepts the hybrid group X25519MLKEM768 without any configuration, unless a directive in your config narrows the list.
1. Check the OpenSSL version
openssl versionDistribution packages of Apache use the system library. You need OpenSSL 3.5 or newer. If it is older, see which systems ship OpenSSL 3.5. A bundled or Windows build of httpd may carry its own OpenSSL, so check what that build was linked against.
On RHEL 9, also run sudo update-crypto-policies --set DEFAULT:PQ; its default policy leaves post-quantum groups off.
2. Make sure TLS 1.3 is enabled
SSLProtocol -all +TLSv1.2 +TLSv1.3ML-KEM key exchange only exists in TLS 1.3.
3. Look for a pinned group list
grep -rniE "SSLOpenSSLConfCmd +(Curves|Groups|ECDHParameters)" /etc/apache2 /etc/httpd 2>/dev/nullNo match means mod_ssl uses OpenSSL’s default list, which includes X25519MLKEM768. With OpenSSL 3.5 you are already done.
A match with only classical curves, such as SSLOpenSSLConfCmd Curves X25519:prime256v1, is what keeps the site off. Delete it, or put the hybrid group first:
SSLOpenSSLConfCmd Groups X25519MLKEM768:X25519:prime256v1:secp384r1Groups and Curves are two names for the same OpenSSL setting. Keep the classical curves in the list for clients that don’t support ML-KEM yet.
4. Test the config and reload
sudo apachectl configtest && sudo systemctl reload apache2 # httpd on RHELCheck that it worked
Test the site here. The registry offers only post-quantum key exchange, so a pass means the server accepted it.
Try , , ,
Or from a terminal, with OpenSSL 3.5 or newer on your own machine (the openssl that ships with macOS is LibreSSL and won’t work):
openssl s_client -connect example.com:443 -servername example.com \
-groups X25519MLKEM768 </dev/null 2>&1 | grep "Negotiated TLS1.3 group"A ready server prints Negotiated TLS1.3 group: X25519MLKEM768. One that isn’t ends the handshake with alert handshake failure.
What we tested
We ran these settings on 4 December 2026 against Apache 2.4.71 with OpenSSL 3.5.9 (the official Docker image) and checked each with the command above:
- No
SSLOpenSSLConfCmdline: accepted X25519MLKEM768. - The
Groupsline from step 3: accepted X25519MLKEM768. SSLOpenSSLConfCmd Curves X25519:prime256v1: refused it with a handshake failure.
One case we did not test: Apache’s source shows that if the file given to SSLCertificateFile also contains an EC parameters block, mod_ssl limits key exchange to that one curve. If your site fails with no pinned list, check that file.
Sources
- Apache documentation: SSLOpenSSLConfCmd
- Apache source: ssl_engine_init.c
- OpenSSL 3.5 release notes
- Red Hat: post-quantum cryptography in RHEL
Last reviewed 4 December 2026.