From d0cc92a01a5b373c6730acd84009294da9c29e44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Jun 2003 12:49:16 +0000 Subject: Set auth type differently, we use one CURLOPT_HTTPAUTH instead as we plan to add more method in the future. --- src/main.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 0e740f3ed..ef5217280 100644 --- a/src/main.c +++ b/src/main.c @@ -359,9 +359,7 @@ static void help(void) " -d/--data HTTP POST data (H)\n" " --data-ascii HTTP POST ASCII data (H)\n" " --data-binary HTTP POST binary data (H)\n" -#ifdef GSSAPI - " --negotiate Enable HTTP Negotiate Authentication\n" -#endif + " --negotiate Enable HTTP Negotiate Authentication (req GSS-lib)\n" " --digest Enable HTTP Digest Authentication"); puts(" --disable-eprt Prevents curl from using EPRT or LPRT (F)\n" " --disable-epsv Prevents curl from using EPSV (F)\n" @@ -464,9 +462,7 @@ struct Configurable { bool cookiesession; /* new session? */ bool encoding; /* Accept-Encoding please */ bool digest; /* Digest Authentication */ -#ifdef GSSAPI bool negotiate; /* Negotiate Authentication */ -#endif bool use_resume; bool resume_from_current; bool disable_epsv; @@ -1059,9 +1055,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"5i", "limit-rate", TRUE}, {"5j", "compressed", FALSE}, /* might take an arg someday */ {"5k", "digest", FALSE}, -#ifdef GSSAPI {"5l", "negotiate", FALSE}, -#endif {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, @@ -1290,11 +1284,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ config->digest ^= TRUE; break; -#ifdef GSSAPI case 'l': /* --negotiate */ config->negotiate ^= TRUE; break; -#endif default: /* the URL! */ { @@ -2989,12 +2981,11 @@ operate(struct Configurable *config, int argc, char *argv[]) /* disable it */ curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, FALSE); - /* new in libcurl 7.10.6 */ - curl_easy_setopt(curl, CURLOPT_HTTPDIGEST, config->digest); - -#ifdef GSSAPI - curl_easy_setopt(curl, CURLOPT_HTTPNEGOTIATE, config->negotiate); -#endif + /* new in libcurl 7.10.6 (default is Basic) */ + if(config->digest) + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLHTTP_DIGEST); + else if(config->negotiate) + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLHTTP_NEGOTIATE); /* new in curl 7.9.7 */ if(config->trace_dump) { -- cgit v1.2.3