aboutsummaryrefslogtreecommitdiffstats
path: root/lib/curl_sasl.c
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-07-10 20:17:42 -0700
committerHaibo Huang <hhb@google.com>2020-07-13 15:46:10 -0700
commitca2a80266834bba8f490fd9ac51f77d1b8606d93 (patch)
tree2c3eab943845aec3b36d6ea0e33ce0f5cc412033 /lib/curl_sasl.c
parentea155d05e764c6543c0d6be01edf12dda123ed99 (diff)
downloadexternal_curl-ca2a80266834bba8f490fd9ac51f77d1b8606d93.tar.gz
external_curl-ca2a80266834bba8f490fd9ac51f77d1b8606d93.tar.bz2
external_curl-ca2a80266834bba8f490fd9ac51f77d1b8606d93.zip
Upgrade curl to curl-7_71_1
Change-Id: Ief1f908509a0dd7944004e102310c255e42e4803
Diffstat (limited to 'lib/curl_sasl.c')
-rw-r--r--lib/curl_sasl.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 8c1c8662..83fe896e 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;