]> granicus.if.org Git - curl/commitdiff
krb5: Fixed missing client response when mutual authentication enabled
authorSteve Holme <steve_holme@hotmail.com>
Sun, 3 Apr 2016 16:02:44 +0000 (17:02 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 3 Apr 2016 16:02:44 +0000 (17:02 +0100)
Although mutual authentication is currently turned off and can only be
enabled by changing libcurl source code, authentication using Kerberos
5 has been broken since commit 79543caf90 in this use case.

lib/vauth/krb5_gssapi.c
lib/vauth/krb5_sspi.c

index 18c6dbb46f43f6fce63d1f2756c8eaad74808c17..888a279c62335911fb9976fe48b6e952682eadb2 100644 (file)
@@ -163,6 +163,11 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
 
     gss_release_buffer(&unused_status, &output_token);
   }
+  else if(mutual_auth) {
+    *outptr = strdup("");
+    if(!*outptr)
+      result = CURLE_OUT_OF_MEMORY;
+  }
 
   return result;
 }
index ee80daee058a1928ace01bb159710fde14a6946e..605933197b65a82ac859778353f930fdfb389cc7 100644 (file)
@@ -212,6 +212,11 @@ CURLcode Curl_auth_create_gssapi_user_message(struct SessionHandle *data,
     result = Curl_base64_encode(data, (char *) resp_buf.pvBuffer,
                                 resp_buf.cbBuffer, outptr, outlen);
   }
+  else if(mutual_auth) {
+    *outptr = strdup("");
+    if(!*outptr)
+      result = CURLE_OUT_OF_MEMORY;
+  }
 
   /* Free the decoded challenge */
   free(chlg);