mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 14:35:03 -05:00
ntlm: We prefer 'CURLcode result'
This commit is contained in:
parent
5f3824a5aa
commit
7faaca7118
@ -276,17 +276,17 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
|
|||||||
(*) -> Optional
|
(*) -> Optional
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
CURLcode result = CURLE_OK;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
unsigned char *buffer = NULL;
|
unsigned char *buffer = NULL;
|
||||||
CURLcode error;
|
|
||||||
|
|
||||||
#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI)
|
#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI)
|
||||||
(void)data;
|
(void)data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
error = Curl_base64_decode(header, &buffer, &size);
|
result = Curl_base64_decode(header, &buffer, &size);
|
||||||
if(error)
|
if(result)
|
||||||
return error;
|
return result;
|
||||||
|
|
||||||
if(!buffer) {
|
if(!buffer) {
|
||||||
infof(data, "NTLM handshake failure (empty type-2 message)\n");
|
infof(data, "NTLM handshake failure (empty type-2 message)\n");
|
||||||
@ -312,11 +312,11 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
|
|||||||
memcpy(ntlm->nonce, &buffer[24], 8);
|
memcpy(ntlm->nonce, &buffer[24], 8);
|
||||||
|
|
||||||
if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
|
if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) {
|
||||||
error = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm);
|
result = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm);
|
||||||
if(error) {
|
if(result) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
infof(data, "NTLM handshake failure (bad type-2 message)\n");
|
infof(data, "NTLM handshake failure (bad type-2 message)\n");
|
||||||
return error;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
|
|||||||
free(buffer);
|
free(buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return CURLE_OK;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef USE_WINDOWS_SSPI
|
#ifndef USE_WINDOWS_SSPI
|
||||||
|
Loading…
Reference in New Issue
Block a user