diff options
author | Kamil Dudka <kdudka@redhat.com> | 2011-07-25 11:49:26 +0200 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2011-08-03 10:56:41 +0200 |
commit | a7864c41db6ac12a1b67f2646f837174f75a240b (patch) | |
tree | 7419b11b1cbdac81bba4725c1ee9a62d246c1553 /lib/curl_gssapi.c | |
parent | ebf42c4be76df40ec6d3bf32f229bbb274e2c32f (diff) | |
download | curl-a7864c41db6ac12a1b67f2646f837174f75a240b.tar.gz |
curl_gssapi: refine the handling of CURLOPT_GSSAPI_DELEGATION
Suggested by Richard Silverman.
Diffstat (limited to 'lib/curl_gssapi.c')
-rw-r--r-- | lib/curl_gssapi.c | 14 |
1 files changed, 11 insertions, 3 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, |