From 94043b11508b9a4bf1fbee9ea17ef658c6413d9d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 12 Nov 2004 09:18:14 +0000 Subject: Dan Fandrich added the --disable-crypto-auth option to configure to allow libcurl to build without Digest support. (I figure it should also explicitly disable Negotiate and NTLM.) --- lib/http.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index cdc3e1d8c..20cd1c15f 100644 --- a/lib/http.c +++ b/lib/http.c @@ -330,6 +330,7 @@ Curl_http_output_auth(struct connectdata *conn, } data->state.authproxy.done = TRUE; } +#ifndef CURL_DISABLE_CRYPTO_AUTH else if(data->state.authproxy.want == CURLAUTH_DIGEST) { auth=(char *)"Digest"; result = Curl_output_digest(conn, @@ -339,7 +340,7 @@ Curl_http_output_auth(struct connectdata *conn, if(result) return result; } - +#endif infof(data, "Proxy auth using %s with user '%s'\n", auth, conn->proxyuser?conn->proxyuser:""); } @@ -373,6 +374,7 @@ Curl_http_output_auth(struct connectdata *conn, else #endif { +#ifndef CURL_DISABLE_CRYPTO_AUTH if(data->state.authhost.picked == CURLAUTH_DIGEST) { auth=(char *)"Digest"; result = Curl_output_digest(conn, @@ -381,8 +383,9 @@ Curl_http_output_auth(struct connectdata *conn, (unsigned char *)path); if(result) return result; - } - else if(data->state.authhost.picked == CURLAUTH_BASIC) { + } else +#endif + if(data->state.authhost.picked == CURLAUTH_BASIC) { if(conn->bits.user_passwd && !checkheaders(data, "Authorization:")) { auth=(char *)"Basic"; @@ -489,6 +492,7 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, } else #endif +#ifndef CURL_DISABLE_CRYPTO_AUTH if(checkprefix("Digest", start)) { CURLdigest dig; *availp |= CURLAUTH_DIGEST; @@ -504,7 +508,9 @@ CURLcode Curl_http_input_auth(struct connectdata *conn, data->state.authproblem = TRUE; } } - else if(checkprefix("Basic", start)) { + else +#endif + if(checkprefix("Basic", start)) { *availp |= CURLAUTH_BASIC; authp->avail |= CURLAUTH_BASIC; if(authp->picked == CURLAUTH_BASIC) { -- cgit v1.2.3