aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-11-12 09:18:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-11-12 09:18:14 +0000
commit94043b11508b9a4bf1fbee9ea17ef658c6413d9d (patch)
tree48d11ab65947de4a993afa6d4de38327cc3a6f34 /lib/http.c
parent1b02ad5e8a35ccd682429e387ccb63022ca2339a (diff)
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.)
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c14
1 files changed, 10 insertions, 4 deletions
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) {