mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:27:17 +03:00
ntlm: update selection of type 3 response
NTLM2 did not work i.e. no NTLMv2 response was created. Changing the check seems to work. Ref: https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-NLMP/[MS-NLMP].pdf Fixes https://github.com/curl/curl/issues/3286 Closes https://github.com/curl/curl/pull/3287 Closes https://github.com/curl/curl/pull/3415
This commit is contained in:
parent
47e95c89b7
commit
7bcca93459
38 changed files with 150 additions and 148 deletions
|
|
@ -562,7 +562,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
#if defined(USE_NTRESPONSES) && defined(USE_NTLM_V2)
|
||||
if(ntlm->target_info_len) {
|
||||
if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
|
||||
unsigned char ntbuffer[0x18];
|
||||
unsigned char entropy[8];
|
||||
unsigned char ntlmv2hash[0x18];
|
||||
|
|
@ -599,7 +599,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
|
||||
#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION)
|
||||
/* We don't support NTLM2 if we don't have USE_NTRESPONSES */
|
||||
if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM2_KEY) {
|
||||
if(ntlm->flags & NTLMFLAG_NEGOTIATE_NTLM_KEY) {
|
||||
unsigned char ntbuffer[0x18];
|
||||
unsigned char tmp[0x18];
|
||||
unsigned char md5sum[MD5_DIGEST_LENGTH];
|
||||
|
|
@ -631,7 +631,9 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp);
|
||||
|
||||
/* End of NTLM2 Session code */
|
||||
|
||||
/* NTLM v2 session security is a misnomer because it is not NTLM v2.
|
||||
It is NTLM v1 using the extended session security that is also
|
||||
in NTLM v2 */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue