aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-09-21 11:05:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-09-21 11:05:31 +0000
commit015d5869d7e3daf81548e4d5d55209adfd4285bf (patch)
tree68ac2015ec29991b3c56ffdb51ecc977c2408437 /src
parent4686adb4331b539dacd065bafc82e31a9eca08e8 (diff)
Mark Davies fixed Negotiate authentication over proxy, and also introduced
the --proxy-negotiate command line option to allow a user to explicitly select it.
Diffstat (limited to 'src')
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 3eca434e0..1fffb9695 100644
--- a/src/main.c
+++ b/src/main.c
@@ -426,6 +426,7 @@ struct Configurable {
bool create_dirs;
bool ftp_create_dirs;
bool ftp_skip_ip;
+ bool proxynegotiate;
bool proxyntlm;
bool proxydigest;
bool proxybasic;
@@ -690,6 +691,7 @@ static void help(void)
" --proxy-anyauth Pick \"any\" proxy authentication method (H)",
" --proxy-basic Use Basic authentication on the proxy (H)",
" --proxy-digest Use Digest authentication on the proxy (H)",
+ " --proxy-negotiate Use Negotiate authentication on the proxy (H)",
" --proxy-ntlm Use NTLM authentication on the proxy (H)",
" -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
" -q If used as the first parameter disables .curlrc",
@@ -1492,6 +1494,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"$g", "retry", TRUE},
{"$h", "retry-delay", TRUE},
{"$i", "retry-max-time", TRUE},
+ {"$k", "proxy-negotiate", FALSE},
{"$m", "ftp-account", TRUE},
{"$n", "proxy-anyauth", FALSE},
{"$o", "trace-time", FALSE},
@@ -1892,6 +1895,12 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
return PARAM_BAD_NUMERIC;
break;
+ case 'k': /* --proxy-negotiate */
+ if(curlinfo->features & CURL_VERSION_GSSNEGOTIATE)
+ config->proxynegotiate ^= TRUE;
+ else
+ return PARAM_LIBCURL_DOESNT_SUPPORT;
+ break;
case 'm': /* --ftp-account */
GetStr(&config->ftp_account, nextarg);
break;
@@ -4302,6 +4311,8 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
config->ftp_create_dirs);
if(config->proxyanyauth)
my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+ else if(config->proxynegotiate)
+ my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_GSSNEGOTIATE);
else if(config->proxyntlm)
my_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
else if(config->proxydigest)