From 08553aba97d655cf4098c2ced77564f2ba5908ca Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 20 Mar 2025 02:03:38 +0100 Subject: [PATCH] configure: fix ECH detection with MultiSSL Detect OpenSSL and wolfSSL support independently. Pass detection if either of them has support. Before this patch wolfSSL results overwrote OpenSSL detection results when both backends were enabled. Also fix output message when both of them support ECH. Closes #16774 --- configure.ac | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 68adbc998e..aff1b7ca72 100644 --- a/configure.ac +++ b/configure.ac @@ -4893,25 +4893,29 @@ if test "x$want_ech" != "xno"; then dnl assume NOT and look for sufficient condition ECH_ENABLED=0 + ECH_ENABLED_OPENSSL=0 + ECH_ENABLED_WOLFSSL=0 ECH_SUPPORT='' dnl check for OpenSSL equivalent if test "x$OPENSSL_ENABLED" = "x1"; then AC_CHECK_FUNCS(SSL_set1_ech_config_list, - ECH_SUPPORT="ECH support available via BoringSSL with SSL_set1_ech_config_list" - ECH_ENABLED=1) + ECH_SUPPORT="$ECH_SUPPORT OpenSSL" + ECH_ENABLED_OPENSSL=1) fi if test "x$WOLFSSL_ENABLED" = "x1"; then AC_CHECK_FUNCS(wolfSSL_CTX_GenerateEchConfig, - ECH_SUPPORT="ECH support available via wolfSSL with wolfSSL_CTX_GenerateEchConfig" - ECH_ENABLED=1) + ECH_SUPPORT="$ECH_SUPPORT wolfSSL" + ECH_ENABLED_WOLFSSL=1) fi dnl now deal with whatever we found - if test "x$ECH_ENABLED" = "x1"; then + if test "x$ECH_ENABLED_OPENSSL" = "x1" -o \ + "x$ECH_ENABLED_WOLFSSL" = "x1"; then AC_DEFINE(USE_ECH, 1, [if ECH support is available]) - AC_MSG_RESULT($ECH_SUPPORT) + AC_MSG_RESULT(ECH support available via:$ECH_SUPPORT) experimental="$experimental ECH" + ECH_ENABLED=1 dnl ECH wants HTTPSRR want_httpsrr="yes" else