1
/***************************************************************************
3
* Project ___| | | | _ \| |
5
* | (__| |_| | _ <| |___
6
* \___|\___/|_| \_\_____|
8
* Copyright (C) 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
10
* This software is licensed as described in the file COPYING, which
11
* you should have received as part of this distribution. The terms
12
* are also available at http://curl.haxx.se/docs/copyright.html.
14
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
15
* copies of the Software, and permit persons to whom the Software is
16
* furnished to do so, under the terms of the COPYING file.
18
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
* KIND, either express or implied.
21
***************************************************************************/
27
#include "curl_gssapi.h"
30
OM_uint32 Curl_gss_init_sec_context(
31
struct SessionHandle *data,
32
OM_uint32 * minor_status,
33
gss_ctx_id_t * context,
34
gss_name_t target_name,
35
gss_channel_bindings_t input_chan_bindings,
36
gss_buffer_t input_token,
37
gss_buffer_t output_token,
38
OM_uint32 * ret_flags)
40
OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG;
42
if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
43
#ifdef GSS_C_DELEG_POLICY_FLAG
44
req_flags |= GSS_C_DELEG_POLICY_FLAG;
46
infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not "
51
if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG)
52
req_flags |= GSS_C_DELEG_FLAG;
54
return gss_init_sec_context(minor_status,
55
GSS_C_NO_CREDENTIAL, /* cred_handle */
58
GSS_C_NO_OID, /* mech_type */
63
NULL, /* actual_mech_type */
69
#endif /* HAVE_GSSAPI */