buffer[3] = (char)((value & 0xFF000000) >> 24);
}
+#if (CURL_SIZEOF_CURL_OFF_T > 4)
#if defined(HAVE_LONGLONG)
static void write64_le(const long long value, unsigned char *buffer)
#else
write32_le((int)value, buffer);
write32_le((int)(value >> 32), buffer + 4);
}
+#endif
/*
* Set up nt hashed passwords
return CURLE_OK;
}
-#ifndef USE_WINDOWS_SSPI
+#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI)
/* This returns the HMAC MD5 digest */
CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen,
# ifdef OPENSSL_NO_MD4
# define USE_NTRESPONSES 0
# define USE_NTLM2SESSION 0
+# define USE_NTLM_V2 0
# endif
#endif
#define USE_NTLM2SESSION 1
#endif
+/* Define USE_NTLM_V2 to 1 in order to allow the type-3 message to include the
+ LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1
+ and support for 64-bit integers. */
+#if !defined(USE_NTLM_V2) && USE_NTRESPONSES && (CURL_SIZEOF_CURL_OFF_T > 4)
+#define USE_NTLM_V2 1
+#endif
+
void Curl_ntlm_core_lm_resp(const unsigned char *keys,
const unsigned char *plaintext,
unsigned char *results);
const char *password,
unsigned char *ntbuffer /* 21 bytes */);
-#ifndef USE_WINDOWS_SSPI
+#if USE_NTLM_V2 && !defined(USE_WINDOWS_SSPI)
CURLcode Curl_hmac_md5(const unsigned char *key, unsigned int keylen,
const unsigned char *data, unsigned int datalen,
unsigned char *challenge_server,
unsigned char *lmresp);
-#endif /* !USE_WINDOWS_SSPI */
+#endif /* USE_NTLM_V2 && !USE_WINDOWS_SSPI */
#endif /* USE_NTRESPONSES */