aboutsummaryrefslogtreecommitdiffstats
path: root/lib/curl_sasl.c
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-07-14 15:51:44 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-14 15:51:44 +0000
commit9aa1a64cabedcc41f8be6608e0ee872b56c454a3 (patch)
tree2c3eab943845aec3b36d6ea0e33ce0f5cc412033 /lib/curl_sasl.c
parent0c66739b05f29c81b6a0a6814929e1e6a51c6995 (diff)
parentd82935bad8787715114b546d997bc3e494fb63cc (diff)
downloadexternal_curl-9aa1a64cabedcc41f8be6608e0ee872b56c454a3.tar.gz
external_curl-9aa1a64cabedcc41f8be6608e0ee872b56c454a3.tar.bz2
external_curl-9aa1a64cabedcc41f8be6608e0ee872b56c454a3.zip
Merge "Upgrade curl to curl-7_71_1" am: 23abcba889 am: d82935bad8
Original change: https://android-review.googlesource.com/c/platform/external/curl/+/1360986 Change-Id: If39a57f7925d048081295b1d981399e38ac55e22
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;