diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2022-02-16 09:19:58 +0100 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2022-02-17 11:25:03 +0100 |
commit | 049f3765c7016a3f7a92b7f88aae6405c49b84fb (patch) | |
tree | 3f95d0fa4f87fe84a3d79463cd84382c7b24a868 /lib/curl_des.c | |
parent | a9bc534a113bd9944366c7f9694213d22e304a25 (diff) | |
download | curl-049f3765c7016a3f7a92b7f88aae6405c49b84fb.tar.gz |
des: fix compile break for OpenSSL without DES
When `USE_OPENSSL` was defined but OpenSSL had no DES support and a
different crypto library was used for that, `Curl_des_set_odd_parity`
was called but not defined. This could for example happen on Windows
and macOS when using OpenSSL v3 with deprecated features disabled.
Use the same condition for the function definition as used at the
caller side, but leaving out the OpenSSL part to avoid including
OpenSSL headers.
Closes https://github.com/curl/curl/pull/8459
Diffstat (limited to 'lib/curl_des.c')
-rw-r--r-- | lib/curl_des.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/curl_des.c b/lib/curl_des.c index 76185cbf2..8170f488a 100644 --- a/lib/curl_des.c +++ b/lib/curl_des.c @@ -22,7 +22,12 @@ #include "curl_setup.h" -#if defined(USE_NTLM) && !defined(USE_OPENSSL) && !defined(USE_WOLFSSL) +#if defined(USE_CURL_NTLM_CORE) && !defined(USE_WOLFSSL) && \ + (defined(USE_GNUTLS) || \ + defined(USE_NSS) || \ + defined(USE_SECTRANSP) || \ + defined(USE_OS400CRYPTO) || \ + defined(USE_WIN32_CRYPTO)) #include "curl_des.h" @@ -60,4 +65,4 @@ void Curl_des_set_odd_parity(unsigned char *bytes, size_t len) } } -#endif /* USE_NTLM && !USE_OPENSSL */ +#endif |