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.
This commit is contained in:
Steve Holme 2016-04-09 20:47:05 +01:00
parent 830a4e55a2
commit ccf7a82605
13 changed files with 31 additions and 50 deletions

View file

@ -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
* +----+------+-----+----------------+

View file

@ -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
* +----+------+-----+----------------+

View file

@ -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) || \

View file

@ -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);

View file

@ -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) || \