From cd15acd0ecc19401af0002fb8128b53bdc99bb68 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 13 Apr 2019 21:47:56 +0100 Subject: 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. --- lib/md4.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/md4.c') 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)) */ -- cgit v1.2.1