aboutsummaryrefslogtreecommitdiff
path: root/lib/vauth/digest_sspi.c
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2019-05-11 02:23:09 -0400
committerJay Satiro <raysatiro@yahoo.com>2019-08-14 03:14:01 -0400
commitdca6f73613d8b578687bd4aeeedd198f9644bb53 (patch)
treebe2274068f71d0fae6b7211181f0f10d5dfe936a /lib/vauth/digest_sspi.c
parentaae490229b733a41223d8b806103cedf6bd757a0 (diff)
vauth: Use CURLE_AUTH_ERROR for auth function errors
- Add new error code CURLE_AUTH_ERROR. Prior to this change auth function errors were signaled by CURLE_OUT_OF_MEMORY and CURLE_RECV_ERROR, and neither one was technically correct. Ref: https://github.com/curl/curl/pull/3848 Co-authored-by: Dominik Hölzl Closes https://github.com/curl/curl/pull/3864
Diffstat (limited to 'lib/vauth/digest_sspi.c')
-rw-r--r--lib/vauth/digest_sspi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/vauth/digest_sspi.c b/lib/vauth/digest_sspi.c
index fe8093e8b..850d6262b 100644
--- a/lib/vauth/digest_sspi.c
+++ b/lib/vauth/digest_sspi.c
@@ -220,7 +220,10 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
free(output_token);
free(input_token);
- return CURLE_RECV_ERROR;
+ if(status == SEC_E_INSUFFICIENT_MEMORY)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_AUTH_ERROR;
}
/* Base64 encode the response */
@@ -607,7 +610,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
Curl_safefree(digest->http_context);
- return CURLE_OUT_OF_MEMORY;
+ if(status == SEC_E_INSUFFICIENT_MEMORY)
+ return CURLE_OUT_OF_MEMORY;
+
+ return CURLE_AUTH_ERROR;
}
output_token_len = resp_buf.cbBuffer;