diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_gssapi.c | 14 | ||||
-rw-r--r-- | lib/url.c | 4 | ||||
-rw-r--r-- | lib/urldata.h | 3 |
3 files changed, 15 insertions, 6 deletions
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c index 6b47987dd..7c6f57ad4 100644 --- a/lib/curl_gssapi.c +++ b/lib/curl_gssapi.c @@ -36,10 +36,18 @@ OM_uint32 Curl_gss_init_sec_context( gss_buffer_t output_token, OM_uint32 * ret_flags) { - OM_uint32 req_flags; + OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG; - req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG; - if (data->set.gssapi_delegation) + if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) { +#ifdef GSS_C_DELEG_POLICY_FLAG + req_flags |= GSS_C_DELEG_POLICY_FLAG; +#else + infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not " + "compiled in\n"); +#endif + } + + if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG) req_flags |= GSS_C_DELEG_FLAG; return gss_init_sec_context(minor_status, @@ -1977,9 +1977,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, break; case CURLOPT_GSSAPI_DELEGATION: /* - * allow GSSAPI credential delegation + * GSSAPI credential delegation */ - data->set.gssapi_delegation = (bool)(0 != va_arg(param, long)); + data->set.gssapi_delegation = va_arg(param, long); break; case CURLOPT_SSL_VERIFYPEER: /* diff --git a/lib/urldata.h b/lib/urldata.h index 3db8e2f13..d244f2113 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -1526,7 +1526,8 @@ struct UserDefined { to pattern (e.g. if WILDCARDMATCH is on) */ void *fnmatch_data; - bool gssapi_delegation; /* allow GSSAPI credential delegation */ + long gssapi_delegation; /* GSSAPI credential delegation, see the + documentation of CURLOPT_GSSAPI_DELEGATION */ }; struct Names { |