CURLOPT_SOCKS5_GSSAPI_NEC.md (1378B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: CURLOPT_SOCKS5_GSSAPI_NEC 5 Section: 3 6 Source: libcurl 7 See-also: 8 - CURLOPT_PROXY (3) 9 - CURLOPT_PROXY_SERVICE_NAME (3) 10 Protocol: 11 - All 12 Added-in: 7.19.4 13 --- 14 15 # NAME 16 17 CURLOPT_SOCKS5_GSSAPI_NEC - SOCKS proxy GSSAPI negotiation protection 18 19 # SYNOPSIS 20 21 ~~~c 22 #include <curl/curl.h> 23 24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec); 25 ~~~ 26 27 # DESCRIPTION 28 29 Pass a long set to 1 to enable or 0 to disable. As part of the GSSAPI 30 negotiation a protection mode is negotiated. The RFC 1961 says in section 31 4.3/4.4 it should be protected, but the NEC reference implementation does not. 32 If enabled, this option allows the unprotected exchange of the protection mode 33 negotiation. 34 35 # DEFAULT 36 37 ? 38 39 # %PROTOCOLS% 40 41 # EXAMPLE 42 43 ~~~c 44 int 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 62 curl_easy_setopt(3) returns a CURLcode indicating success or error. 63 64 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see 65 libcurl-errors(3).