diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-11-09 11:25:10 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-11-09 11:47:40 +0000 |
commit | 40ee1ba0dcda5dcae7fceeeb3550456819c683a1 (patch) | |
tree | e5197d9f0bd0a6e609e829062e57742c7667c1c2 /lib/curl_ntlm_msgs.c | |
parent | 474442dd564cab52d7732403eba5cd630764ba26 (diff) |
ntlm: Moved the native Target Info clean-up from HTTP specific function
Diffstat (limited to 'lib/curl_ntlm_msgs.c')
-rw-r--r-- | lib/curl_ntlm_msgs.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index ae433af01..437536ab7 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -401,6 +401,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, unsigned long attrs; TimeStamp expiry; /* For Windows 9x compatibility of SSPI calls */ + /* Clean up any former leftovers and initialise to defaults */ Curl_sasl_ntlm_cleanup(ntlm); /* Query the security package for NTLM */ @@ -493,7 +494,9 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp, domain are empty */ (void)userp; (void)passwdp; - (void)ntlm; + + /* Clean up any former leftovers and initialise to defaults */ + Curl_sasl_ntlm_cleanup(ntlm); #if USE_NTLM2SESSION #define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY @@ -993,7 +996,11 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data, return CURLE_CONV_FAILED; /* Return with binary blob encoded into base64 */ - return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); + result = Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen); + + Curl_sasl_ntlm_cleanup(ntlm); + + return result; #endif } |