aboutsummaryrefslogtreecommitdiff
path: root/lib/vauth/krb5_sspi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vauth/krb5_sspi.c')
-rw-r--r--lib/vauth/krb5_sspi.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/lib/vauth/krb5_sspi.c b/lib/vauth/krb5_sspi.c
index 98041d915..cb11ed901 100644
--- a/lib/vauth/krb5_sspi.c
+++ b/lib/vauth/krb5_sspi.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2014 - 2019, Steve Holme, <steve_holme@hotmail.com>.
+ * Copyright (C) 2014 - 2017, Steve Holme, <steve_holme@hotmail.com>.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -58,11 +58,6 @@ bool Curl_auth_is_gssapi_supported(void)
TEXT(SP_NAME_KERBEROS),
&SecurityPackage);
- /* Release the package buffer as it is not required anymore */
- if(status == SEC_E_OK) {
- s_pSecFn->FreeContextBuffer(SecurityPackage);
- }
-
return (status == SEC_E_OK ? TRUE : FALSE);
}
@@ -222,12 +217,8 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data,
/* Free the decoded challenge as it is not required anymore */
free(chlg);
- if(status == SEC_E_INSUFFICIENT_MEMORY) {
- return CURLE_OUT_OF_MEMORY;
- }
-
if(status != SEC_E_OK && status != SEC_I_CONTINUE_NEEDED) {
- return CURLE_AUTH_ERROR;
+ return CURLE_RECV_ERROR;
}
if(memcmp(&context, krb5->context, sizeof(context))) {
@@ -318,10 +309,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
if(status != SEC_E_OK) {
free(chlg);
- if(status == SEC_E_INSUFFICIENT_MEMORY)
- return CURLE_OUT_OF_MEMORY;
-
- return CURLE_AUTH_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
/* Get the fully qualified username back from the context */
@@ -331,10 +319,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
if(status != SEC_E_OK) {
free(chlg);
- if(status == SEC_E_INSUFFICIENT_MEMORY)
- return CURLE_OUT_OF_MEMORY;
-
- return CURLE_AUTH_ERROR;
+ return CURLE_RECV_ERROR;
}
/* Setup the "input" security buffer */
@@ -453,10 +438,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
free(message);
free(trailer);
- if(status == SEC_E_INSUFFICIENT_MEMORY)
- return CURLE_OUT_OF_MEMORY;
-
- return CURLE_AUTH_ERROR;
+ return CURLE_OUT_OF_MEMORY;
}
/* Allocate the encryption (wrap) buffer */
@@ -492,7 +474,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
}
/*
- * Curl_auth_cleanup_gssapi()
+ * Curl_auth_gssapi_cleanup()
*
* This is used to clean up the GSSAPI (Kerberos V5) specific data.
*
@@ -501,7 +483,7 @@ CURLcode Curl_auth_create_gssapi_security_message(struct Curl_easy *data,
* krb5 [in/out] - The Kerberos 5 data struct being cleaned up.
*
*/
-void Curl_auth_cleanup_gssapi(struct kerberos5data *krb5)
+void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5)
{
/* Free our security context */
if(krb5->context) {