1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_SOCKS5_GSSAPI_NEC
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_PROXY (3)
9  - CURLOPT_PROXY_SERVICE_NAME (3)
10Protocol:
11  - All
12Added-in: 7.19.4
13---
14
15# NAME
16
17CURLOPT_SOCKS5_GSSAPI_NEC - SOCKS proxy GSSAPI negotiation protection
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec);
25~~~
26
27# DESCRIPTION
28
29Pass a long set to 1 to enable or 0 to disable. As part of the GSSAPI
30negotiation a protection mode is negotiated. The RFC 1961 says in section
314.3/4.4 it should be protected, but the NEC reference implementation does not.
32If enabled, this option allows the unprotected exchange of the protection mode
33negotiation.
34
35# DEFAULT
36
37?
38
39# %PROTOCOLS%
40
41# EXAMPLE
42
43~~~c
44int main(void)
45{
46  CURL *curl = curl_easy_init();
47  if(curl) {
48    CURLcode res;
49    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
50    curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://proxy");
51    curl_easy_setopt(curl, CURLOPT_SOCKS5_GSSAPI_NEC, 1L);
52    res = curl_easy_perform(curl);
53    curl_easy_cleanup(curl);
54  }
55}
56~~~
57
58# %AVAILABILITY%
59
60# RETURN VALUE
61
62Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
63