aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-04-09 20:47:05 +0100
committerSteve Holme <steve_holme@hotmail.com>2016-04-09 20:47:05 +0100
commitccf7a826050fe33aace329b86d77895bdb7dd4c3 (patch)
treef5376feddba49724c6903c30e136b8639e983801 /lib
parent830a4e55a278cfd003906140a52a9680be87d3f7 (diff)
CURLOPT_SOCKS5_GSSAPI_SERVICE: Merged with CURLOPT_PROXY_SERVICE_NAME
As these two options provide identical functionality, the former for SOCK5 proxies and the latter for HTTP proxies, merged the two options together. As such CURLOPT_SOCKS5_GSSAPI_SERVICE is marked as deprecated as of 7.49.0.
Diffstat (limited to 'lib')
-rw-r--r--lib/socks_gssapi.c3
-rw-r--r--lib/socks_sspi.c3
-rw-r--r--lib/url.c22
-rw-r--r--lib/url.h2
-rw-r--r--lib/urldata.h1
5 files changed, 9 insertions, 22 deletions
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
index 09457aecd..e3fc260cb 100644
--- a/lib/socks_gssapi.c
+++ b/lib/socks_gssapi.c
@@ -120,7 +120,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
unsigned short us_length;
char *user=NULL;
unsigned char socksreq[4]; /* room for GSS-API exchange header only */
- char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
+ const char *serviceptr = data->set.str[STRING_PROXY_SERVICE_NAME] ?
+ data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd";
/* GSS-API request looks like
* +----+------+-----+----------------+
diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c
index 5f650be67..c5f25b66f 100644
--- a/lib/socks_sspi.c
+++ b/lib/socks_sspi.c
@@ -83,7 +83,8 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
unsigned short us_length;
unsigned long qop;
unsigned char socksreq[4]; /* room for GSS-API exchange header only */
- char *service = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
+ const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ?
+ data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd";
/* GSS-API request looks like
* +----+------+-----+----------------+
diff --git a/lib/url.c b/lib/url.c
index 468e14330..b597becb2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -571,11 +571,6 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
* seem not to follow rfc1961 section 4.3/4.4
*/
set->socks5_gssapi_nec = FALSE;
- /* set default GSS-API service name */
- result = setstropt(&set->str[STRING_SOCKS5_GSSAPI_SERVICE],
- CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE);
- if(result)
- return result;
#endif
/* This is our preferred CA cert bundle/path since install time */
@@ -1478,28 +1473,21 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
#endif /* CURL_DISABLE_PROXY */
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- case CURLOPT_SOCKS5_GSSAPI_SERVICE:
+ case CURLOPT_SOCKS5_GSSAPI_NEC:
/*
- * Set GSS-API service name
+ * Set flag for NEC SOCK5 support
*/
- result = setstropt(&data->set.str[STRING_SOCKS5_GSSAPI_SERVICE],
- va_arg(param, char *));
+ data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE;
break;
+ case CURLOPT_SOCKS5_GSSAPI_SERVICE:
case CURLOPT_PROXY_SERVICE_NAME:
/*
- * Set negotiate proxy service name
+ * Set proxy authentication service name for Kerberos 5 and SPNEGO
*/
result = setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME],
va_arg(param, char *));
break;
-
- case CURLOPT_SOCKS5_GSSAPI_NEC:
- /*
- * set flag for nec socks5 support
- */
- data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE;
- break;
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
diff --git a/lib/url.h b/lib/url.h
index e7a9ddf08..2b25731ea 100644
--- a/lib/url.h
+++ b/lib/url.h
@@ -67,8 +67,6 @@ void Curl_getoff_all_pipelines(struct SessionHandle *data,
void Curl_close_connections(struct SessionHandle *data);
#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
-#define CURL_DEFAULT_SOCKS5_GSSAPI_SERVICE "rcmd" /* default socks5 gssapi
- service */
CURLcode Curl_connected_proxy(struct connectdata *conn, int sockindex);
diff --git a/lib/urldata.h b/lib/urldata.h
index 402a1970d..78593eecc 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1407,7 +1407,6 @@ enum dupstring {
STRING_SSH_KNOWNHOSTS, /* file name of knownhosts file */
#endif
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
- STRING_SOCKS5_GSSAPI_SERVICE, /* GSSAPI service name */
STRING_PROXY_SERVICE_NAME, /* Proxy service name */
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \