diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-27 11:51:34 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-30 23:18:16 +0200 |
commit | f3d501dc678d80a93325bd93ab05c48855e1c0d1 (patch) | |
tree | f1f63712798510398d6e7aebc30f24afb27ed15c /lib/curl_sasl.c | |
parent | c4e6968127e876b01e5e0b4b7cdbc49d5267530c (diff) | |
download | curl-f3d501dc678d80a93325bd93ab05c48855e1c0d1.tar.gz |
build: disable more code/data when built without proxy support
Added build to travis to verify
Closes #5466
Diffstat (limited to 'lib/curl_sasl.c')
-rw-r--r-- | lib/curl_sasl.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index 8c1c86623..83fe896e3 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -264,9 +264,14 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, size_t len = 0; saslstate state1 = SASL_STOP; saslstate state2 = SASL_FINAL; +#ifndef CURL_DISABLE_PROXY const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; +#else + const char * const hostname = conn->host.name; + const long int port = conn->remote_port; +#endif #if defined(USE_KERBEROS5) || defined(USE_NTLM) const char *service = data->set.str[STRING_SERVICE_NAME] ? data->set.str[STRING_SERVICE_NAME] : @@ -417,18 +422,23 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, struct Curl_easy *data = conn->data; saslstate newstate = SASL_FINAL; char *resp = NULL; +#ifndef CURL_DISABLE_PROXY const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : conn->host.name; const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; +#else + const char * const hostname = conn->host.name; + const long int port = conn->remote_port; +#endif #if !defined(CURL_DISABLE_CRYPTO_AUTH) char *chlg = NULL; size_t chlglen = 0; #endif -#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ - defined(USE_NTLM) +#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ + defined(USE_NTLM) const char *service = data->set.str[STRING_SERVICE_NAME] ? - data->set.str[STRING_SERVICE_NAME] : - sasl->params->service; + data->set.str[STRING_SERVICE_NAME] : + sasl->params->service; char *serverdata; #endif size_t len = 0; |