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/curl_ntlm_core.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/curl_ntlm_core.c') diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index e7060eb29..b6df38f71 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -57,6 +57,8 @@ # include # ifndef OPENSSL_NO_MD4 # include +# else +# include "curl_md4.h" # endif # include # include @@ -568,10 +570,14 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, { /* Create NT hashed password. */ #ifdef USE_OPENSSL +#if !defined(OPENSSL_NO_MD4) MD4_CTX MD4pw; MD4_Init(&MD4pw); MD4_Update(&MD4pw, pw, 2 * len); MD4_Final(ntbuffer, &MD4pw); +#else + Curl_md4it(ntbuffer, pw, 2 * len); +#endif #elif defined(USE_GNUTLS_NETTLE) struct md4_ctx MD4pw; md4_init(&MD4pw); -- cgit v1.2.3