diff options
author | Brad King <brad.king@kitware.com> | 2017-02-07 16:38:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-07 16:38:00 (GMT) |
commit | 1df9d5f91944e0b5ba00815d55bb7dc545053b4c (patch) | |
tree | 7f3ac8bf78c485cd3254a16754657bd5d43bd561 /Utilities/cmcurl/lib/vauth/ntlm.c | |
parent | f4a3290ae7ae096f8b92f7adfba7088e6918bc0b (diff) | |
parent | 4cc2908fdaaf1ab8afe5c2ae5dbb3401859a9aab (diff) | |
download | CMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.zip CMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.tar.gz CMake-1df9d5f91944e0b5ba00815d55bb7dc545053b4c.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2016-12-22 (44b9b4d4)
Diffstat (limited to 'Utilities/cmcurl/lib/vauth/ntlm.c')
-rw-r--r-- | Utilities/cmcurl/lib/vauth/ntlm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/vauth/ntlm.c b/Utilities/cmcurl/lib/vauth/ntlm.c index b484a01..b4d345d 100644 --- a/Utilities/cmcurl/lib/vauth/ntlm.c +++ b/Utilities/cmcurl/lib/vauth/ntlm.c @@ -41,7 +41,7 @@ #include "curl_gethostname.h" #include "curl_multibyte.h" #include "warnless.h" - +#include "rand.h" #include "vtls/vtls.h" #ifdef USE_NSS @@ -558,8 +558,9 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, unsigned int entropy[2]; unsigned char ntlmv2hash[0x18]; - entropy[0] = Curl_rand(data); - entropy[1] = Curl_rand(data); + result = Curl_rand(data, &entropy[0], 2); + if(result) + return result; result = Curl_ntlm_core_mk_nt_hash(data, passwdp, ntbuffer); if(result) @@ -598,8 +599,9 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, unsigned int entropy[2]; /* Need to create 8 bytes random data */ - entropy[0] = Curl_rand(data); - entropy[1] = Curl_rand(data); + result = Curl_rand(data, &entropy[0], 2); + if(result) + return result; /* 8 bytes random data as challenge in lmresp */ memcpy(lmresp, entropy, 8); |