summaryrefslogtreecommitdiff
path: root/lib/md4.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2019-04-13 21:47:56 +0100
committerSteve Holme <steve_holme@hotmail.com>2019-04-23 20:00:33 +0100
commitcd15acd0ecc19401af0002fb8128b53bdc99bb68 (patch)
treed94f2729244ee70092c292bfa044f221cc46cf38 /lib/md4.c
parent7794cacf7e1798b1d21ce77273ffe8ea20a40d53 (diff)
downloadcurl-cd15acd0ecc19401af0002fb8128b53bdc99bb68.tar.gz
ntlm: Support the NT response in the type-3 when OpenSSL doesn't include MD4
Just like we do for mbed TLS, use our local implementation of MD4 when OpenSSL doesn't support it. This allows a type-3 message to include the NT response.
Diffstat (limited to 'lib/md4.c')
-rw-r--r--lib/md4.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/md4.c b/lib/md4.c
index dc9228689..9dfaabc22 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -38,9 +38,11 @@
#include "curl_setup.h"
-/* The NSS, OS/400 and sometimes mbed TLS crypto libraries do not provide the
- * MD4 hash algorithm, so we have a local implementation of it */
+/* The NSS, OS/400, and when not included, OpenSSL and mbed TLS crypto
+ * libraries do not provide the MD4 hash algorithm, so we use this
+ * implementation of it */
#if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \
+ (defined(USE_OPENSSL) && defined(OPENSSL_NO_MD4)) || \
(defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C))
#include "curl_md4.h"
@@ -304,5 +306,7 @@ void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
MD4_Update(&ctx, input, curlx_uztoui(len));
MD4_Final(output, &ctx);
}
+
#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) ||
+ (defined(USE_OPENSSL) && defined(OPENSSL_NO_MD4)) ||
(defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */