1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_GSSAPI_DELEGATION
5Section: 3
6Source: libcurl
7Protocol:
8  - HTTP
9See-also:
10  - CURLOPT_HTTPAUTH (3)
11  - CURLOPT_PROXYAUTH (3)
12Added-in: 7.22.0
13---
14
15# NAME
16
17CURLOPT_GSSAPI_DELEGATION - allowed GSS-API delegation
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);
25~~~
26
27# DESCRIPTION
28
29Set the long parameter *level* to **CURLGSSAPI_DELEGATION_FLAG** to allow
30unconditional GSSAPI credential delegation. The delegation is disabled by
31default since 7.21.7. Set the parameter to
32**CURLGSSAPI_DELEGATION_POLICY_FLAG** to delegate only if the OK-AS-DELEGATE
33flag is set in the service ticket in case this feature is supported by the
34GSS-API implementation and the definition of *GSS_C_DELEG_POLICY_FLAG* was
35available at compile-time.
36
37# DEFAULT
38
39CURLGSSAPI_DELEGATION_NONE
40
41# %PROTOCOLS%
42
43# EXAMPLE
44
45~~~c
46int main(void)
47{
48  CURL *curl = curl_easy_init();
49  if(curl) {
50    CURLcode ret;
51    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
52    /* delegate if okayed by policy */
53    curl_easy_setopt(curl, CURLOPT_GSSAPI_DELEGATION,
54                     (long)CURLGSSAPI_DELEGATION_POLICY_FLAG);
55    ret = curl_easy_perform(curl);
56  }
57}
58~~~
59
60# %AVAILABILITY%
61
62# RETURN VALUE
63
64Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
65