summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2019-04-14 03:52:16 +0100
committerSteve Holme <steve_holme@hotmail.com>2019-08-04 18:01:28 +0100
commit3d9685ee555ec1131a6fd72f00dd61cc104776d9 (patch)
treeae16620f545cc071153e41038f3fdc0b83ca5419 /lib
parent2ff216f1b01e2b345e1b011ca5f72ef3a2ece954 (diff)
downloadcurl-3d9685ee555ec1131a6fd72f00dd61cc104776d9.tar.gz
md4: No need for the NTLM code to call Curl_md4it() for each TLS library
As the NTLM code no longer calls any of TLS libraries' specific MD4 functions, there is no need to call this function for each #ifdef.
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_ntlm_core.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index c81dce5d3..d9594fa8d 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -561,28 +561,15 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data,
if(result)
return result;
- {
- /* Create NT hashed password. */
-#ifdef USE_OPENSSL
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_GNUTLS_NETTLE)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_GNUTLS)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_NSS)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_MBEDTLS)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_SECTRANSP)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_OS400CRYPTO)
- Curl_md4it(ntbuffer, pw, 2 * len);
-#elif defined(USE_WIN32_CRYPTO)
- Curl_md4it(ntbuffer, pw, 2 * len);
+ /* Create NT hashed password. */
+#if defined(USE_OPENSSL) || defined(USE_GNUTLS_NETTLE) || \
+ defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_MBEDTLS) || \
+ defined(USE_SECTRANSP) || defined(USE_OS400CRYPTO) || \
+ defined(USE_WIN32_CRYPTO)
+ Curl_md4it(ntbuffer, pw, 2 * len);
#endif
- memset(ntbuffer + 16, 0, 21 - 16);
- }
+ memset(ntbuffer + 16, 0, 21 - 16);
free(pw);