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