Enable X25519MLKEM768 on HAProxy
HAProxy terminates TLS with the library it was built with. With OpenSSL 3.5 or later, X25519MLKEM768 is available; set it as the first curve on your TLS listeners.
Before you start
- HAProxy built with OpenSSL 3.5 or later:
haproxy -vv | grep -i "SSL library". - TLS 1.3 allowed on your
bindlines (it is unlessssl-max-versays otherwise).
Option 1: for every listener
- In the
globalsection, set the default curve list with X25519MLKEM768 first:
global
ssl-default-bind-curves X25519MLKEM768:X25519:P-256
- Check and reload:
haproxy -c -f /etc/haproxy/haproxy.cfg && systemctl reload haproxy.
Option 2: on one listener
- Add
curvesto thebindline that terminates TLS:
frontend web
bind :443 ssl crt /etc/haproxy/certs/site.pem curves X25519MLKEM768:X25519:P-256
- Check and reload as above.
Keep X25519MLKEM768 first, or browsers that offer both get classical key exchange.
Then scan your domain below.