diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-10-26 10:32:34 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-10-26 09:14:46 +0000 |
commit | 980f2b7078a15d8c24f9fbc23796c2a8682c6c73 (patch) | |
tree | 0b2ecb56b0da0809e94dee4ec504474973130cdf /lib | |
parent | 3b738a16eb986bf71e64adbf54bab7c2bed90998 (diff) |
ntlm: Return all errors from Curl_ntlm_core_mk_nt_hash()
For consistency with other areas of the NTLM code propagate all errors
from Curl_ntlm_core_mk_nt_hash() up the call stack rather than just
CURLE_OUT_OF_MEMORY.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_ntlm_msgs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 8f5ed58ee..1edefd7a2 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -805,9 +805,9 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, /* We shall only use the first 8 bytes of md5sum, but the des code in Curl_ntlm_core_lm_resp only encrypt the first 8 bytes */ - if(CURLE_OUT_OF_MEMORY == - Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer)) - return CURLE_OUT_OF_MEMORY; + result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); + if(result) + return result; Curl_ntlm_core_lm_resp(ntbuffer, md5sum, ntresp); @@ -824,9 +824,10 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, unsigned char lmbuffer[0x18]; #if USE_NTRESPONSES - if(CURLE_OUT_OF_MEMORY == - Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer)) - return CURLE_OUT_OF_MEMORY; + result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); + if(result) + return result; + Curl_ntlm_core_lm_resp(ntbuffer, &ntlm->nonce[0], ntresp); #endif |