1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

sasl_gssapi: Fixed honouring of no mutual authentication

This commit is contained in:
Steve Holme 2014-12-04 21:59:20 +00:00
parent 0fcd74b836
commit 750203bde4
6 changed files with 10 additions and 2 deletions

View File

@ -41,9 +41,13 @@ OM_uint32 Curl_gss_init_sec_context(
gss_channel_bindings_t input_chan_bindings,
gss_buffer_t input_token,
gss_buffer_t output_token,
const bool mutual_auth,
OM_uint32 *ret_flags)
{
OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG;
OM_uint32 req_flags = GSS_C_REPLAY_FLAG;
if(mutual_auth)
req_flags |= GSS_C_MUTUAL_FLAG;
if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
#ifdef GSS_C_DELEG_POLICY_FLAG

View File

@ -53,6 +53,7 @@ OM_uint32 Curl_gss_init_sec_context(
gss_channel_bindings_t input_chan_bindings,
gss_buffer_t input_token,
gss_buffer_t output_token,
const bool mutual_auth,
OM_uint32 *ret_flags);
/* Helper to log a GSS - API error status */

View File

@ -107,7 +107,6 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
(void) userp;
(void) passwdp;
(void) mutual_auth;
if(krb5->context == GSS_C_NO_CONTEXT) {
/* Generate our SPN */
@ -155,6 +154,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
GSS_C_NO_CHANNEL_BINDINGS,
&input_token,
&output_token,
mutual_auth,
NULL);
Curl_safefree(input_token.value);

View File

@ -122,6 +122,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
GSS_C_NO_CHANNEL_BINDINGS,
&input_token,
&output_token,
TRUE,
NULL);
Curl_safefree(input_token.value);

View File

@ -236,6 +236,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
&chan,
gssresp,
&output_buffer,
TRUE,
NULL);
if(gssresp) {

View File

@ -185,6 +185,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
NULL,
gss_token,
&gss_send_token,
TRUE,
&gss_ret_flags);
if(gss_token != GSS_C_NO_BUFFER)