[PATCH] OpenSSL: Configure classical default ECDHE groups on BoringSSL

Sunil Ravi sunilravi at google.com
Tue Nov 17 21:54:18 PST 2026


BoringSSL added post-quantum group X25519MLKEM768 to its default
supported groups list. Because wpa_supplicant links against libssl.so,
this caused the TLS 1.3 ClientHello for tunnelled EAP methods (PEAP and
TTLS) to expand to 1,450 bytes (due to the 1,216-byte ML-KEM-768 key
share). This exceeds the default EAP fragment size (1,398 bytes),
forcing multi-fragment EAP-Response packets.

Legacy enterprise RADIUS servers (such as Windows Server NPS) do not
support or improperly handle multi-fragment EAP ClientHello requests,
failing to send fragment acknowledgments and causing EAP authentication
to stall and time out after 30 seconds (Event 6274, Reason Code 96).

When openssl_ecdh_curves is not explicitly configured, explicitly set
classical ECDHE default groups (X25519, P-256, P-384) via
SSL_set1_groups() on BoringSSL. This reduces the TLS 1.3 ClientHello
back to ~228 bytes (wire size ~370 bytes), eliminating EAP fragmentation
completely while preserving TLS 1.3 support for enterprise networks.

Signed-off-by: Sunil Ravi <sunilravi at google.com>
---
 src/crypto/tls_openssl.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 032bf05..3804b5f 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -5924,7 +5924,23 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
 	}
 
 	if (!params->openssl_ecdh_curves) {
-#ifndef OPENSSL_IS_BORINGSSL
+#ifdef OPENSSL_IS_BORINGSSL
+		if (!(params->flags &
+		      (TLS_CONN_SUITEB | TLS_CONN_SUITEB_NO_ECDH))) {
+			static const int default_groups[] = {
+				NID_X25519,
+				NID_X9_62_prime256v1,
+				NID_secp384r1,
+			};
+
+			if (SSL_set1_groups(conn->ssl, default_groups,
+					    ARRAY_SIZE(default_groups)) != 1) {
+				wpa_printf(MSG_INFO,
+					   "OpenSSL: Failed to set default classical ECDHE groups");
+				return -1;
+			}
+		}
+#else /* !OPENSSL_IS_BORINGSSL */
 #ifndef OPENSSL_NO_EC
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 		if (SSL_set_ecdh_auto(conn->ssl, 1) != 1) {
-- 
2.56.1.750.gf70dc682cf-goog




More information about the Hostap mailing list