From: Daniel Stenberg Date: Tue, 23 Dec 2025 21:22:37 +0000 (+0100) Subject: curl_ntlm_core: fix DES_* symbols for some wolfSSL builds X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=ca46112991f30bc79d4e6e9c74ba569f15677b74;p=0xmirror%2Fcurl.git curl_ntlm_core: fix DES_* symbols for some wolfSSL builds Recent wolfSSL with OPENSSL_COEXIST enabled does not provide the DES_* symbols, so we do. Reported-by: Daniel Pouzzner Closes #20083 --- diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index 36778ecae7..b34d42f6bf 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -76,6 +76,7 @@ #else # include # include +# include # ifdef OPENSSL_COEXIST # define DES_key_schedule WOLFSSL_DES_key_schedule # define DES_cblock WOLFSSL_DES_cblock @@ -84,6 +85,13 @@ # define DES_set_key_unchecked wolfSSL_DES_set_key_unchecked # define DES_ecb_encrypt wolfSSL_DES_ecb_encrypt # define DESKEY(x) ((WOLFSSL_DES_key_schedule *)(x)) + +# if defined(LIBWOLFSSL_VERSION_HEX) && \ + (LIBWOLFSSL_VERSION_HEX >= 0x05007006) +# define DES_ENCRYPT WC_DES_ENCRYPT +# define DES_DECRYPT WC_DES_DECRYPT +# endif + # else # define DESKEY(x) &x # endif