diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-08-17 22:36:22 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-08-17 22:38:25 +0100 |
commit | f6e15d25a38d285932016486a33a44515faa6ebc (patch) | |
tree | cd3ced548f6d6a62f447bcd6532f7bf8d7742e01 /lib | |
parent | 75be5a6681df6aa0d1bb90d20339ea3b25123d6e (diff) |
sasl_sspi: Corrected some of the GSSAPI security message error codes
Corrected a number of the error codes that can be returned from the
Curl_sasl_create_gssapi_security_message() function when things go
wrong.
It makes more sense to return CURLE_BAD_CONTENT_ENCODING when the
inbound security challenge can't be decoded correctly or doesn't
contain the KERB_WRAP_NO_ENCRYPT flag and CURLE_OUT_OF_MEMORY when
EncryptMessage() fails. Unfortunately the previous error code of
CURLE_RECV_ERROR was a copy and paste mistakes on my part and should
have been correct in commit 4b491c675f :(
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_sasl_sspi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/curl_sasl_sspi.c b/lib/curl_sasl_sspi.c index 95f5d90aa..e1c8a57dc 100644 --- a/lib/curl_sasl_sspi.c +++ b/lib/curl_sasl_sspi.c @@ -528,14 +528,14 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data, if(status != SEC_E_OK) { Curl_safefree(chlg); - return CURLE_RECV_ERROR; + return CURLE_BAD_CONTENT_ENCODING; } /* Not 4 octets long to fail as per RFC4752 Section 3.1 */ if(input_buf[1].cbBuffer != 4) { Curl_safefree(chlg); - return CURLE_RECV_ERROR; + return CURLE_BAD_CONTENT_ENCODING; } /* Copy the data out into a coinput_bufnvenient variable and free the SSPI @@ -548,7 +548,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data, if(!(sec_layer & KERB_WRAP_NO_ENCRYPT)) { Curl_safefree(chlg); - return CURLE_RECV_ERROR; + return CURLE_BAD_CONTENT_ENCODING; } /* Extract the maximum message size the server can receive */ @@ -621,7 +621,7 @@ CURLcode Curl_sasl_create_gssapi_security_message(struct SessionHandle *data, Curl_safefree(trailer); Curl_safefree(chlg); - return CURLE_RECV_ERROR; + return CURLE_OUT_OF_MEMORY; } /* Allocate the encryption (wrap) buffer */ |