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
This commit is contained in:
Viktor Szakats 2025-03-20 02:03:38 +01:00
parent 7d313e603b
commit 08553aba97
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -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