summaryrefslogtreecommitdiff
path: root/lib/krb5.c
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2010-11-12 08:20:50 -0800
committerJulien Chaffraix <julien.chaffraix@gmail.com>2010-11-12 08:24:32 -0800
commitc79f816c323f5d17f9e45f78fd08df72bd6c5f7a (patch)
tree59094ff269ebda09313717971fb3c88c4c32207c /lib/krb5.c
parentc8a7df108fb216899ad950fe3ff2e3aa7c40fbc0 (diff)
downloadcurl-c79f816c323f5d17f9e45f78fd08df72bd6c5f7a.tar.gz
krb5: Use GSS_ERROR to check for error.
This is the advised way of checking for errors in the GSS-API RFC. Also added some '\n' to the error message so that they are not mixed with other outputs.
Diffstat (limited to 'lib/krb5.c')
-rw-r--r--lib/krb5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 2530395d1..d94ca27bc 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -259,8 +259,8 @@ krb5_auth(void *app_data, struct connectdata *conn)
gssresp = NULL;
}
- if(maj != GSS_S_COMPLETE && maj != GSS_S_CONTINUE_NEEDED) {
- Curl_infof(data, "Error creating security context");
+ if(GSS_ERROR(maj)) {
+ Curl_infof(data, "Error creating security context\n");
ret = AUTH_ERROR;
break;
}
@@ -268,7 +268,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
if(output_buffer.length != 0) {
if(Curl_base64_encode(data, (char *)output_buffer.value,
output_buffer.length, &p) < 1) {
- Curl_infof(data, "Out of memory base64-encoding");
+ Curl_infof(data, "Out of memory base64-encoding\n");
ret = AUTH_CONTINUE;
break;
}
@@ -299,7 +299,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
_gssresp.length = Curl_base64_decode(p + 5, (unsigned char **)
&_gssresp.value);
if(_gssresp.length < 1) {
- Curl_failf(data, "Out of memory base64-encoding");
+ Curl_failf(data, "Out of memory base64-encoding\n");
ret = AUTH_CONTINUE;
break;
}