aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-04-09 05:57:10 +0100
committerSteve Holme <steve_holme@hotmail.com>2016-04-09 05:57:10 +0100
commitf044cbe6fc9411262a90420e109e23d282a84b62 (patch)
tree87755fb06cecaa57a3df2f48edb5cc3221e0d8df /lib
parent43116218c07d3cce86359afba6c979cdec24a504 (diff)
sasl: Fixed compilation errors from commit 9d89a0387
...when GSS-API or Windows SSPI are not used.
Diffstat (limited to 'lib')
-rw-r--r--lib/curl_sasl.c6
-rw-r--r--lib/url.c3
-rw-r--r--lib/urldata.h3
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c
index 08beda2b9..81b023523 100644
--- a/lib/curl_sasl.c
+++ b/lib/curl_sasl.c
@@ -265,9 +265,11 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
size_t len = 0;
saslstate state1 = SASL_STOP;
saslstate state2 = SASL_FINAL;
+#if defined(USE_KERBEROS5)
const char* service = data->set.str[STRING_SERVICE_NAME] ?
data->set.str[STRING_SERVICE_NAME] :
sasl->params->service;
+#endif
sasl->force_ir = force_ir; /* Latch for future use */
sasl->authused = 0; /* No mechanism used yet */
@@ -412,10 +414,12 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
char *chlg = NULL;
size_t chlglen = 0;
#endif
- size_t len = 0;
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5)
const char *service = data->set.str[STRING_SERVICE_NAME] ?
data->set.str[STRING_SERVICE_NAME] :
sasl->params->service;
+#endif
+ size_t len = 0;
*progress = SASL_INPROGRESS;
diff --git a/lib/url.c b/lib/url.c
index 3439e292a..f31d027eb 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1498,7 +1498,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data->set.socks5_gssapi_nec = (0 != va_arg(param, long))?TRUE:FALSE;
break;
+#endif
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
+ defined(USE_SPNEGO)
case CURLOPT_SERVICE_NAME:
/*
* Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO
diff --git a/lib/urldata.h b/lib/urldata.h
index 5f26054fc..c7af8c037 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1409,6 +1409,9 @@ enum dupstring {
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
STRING_SOCKS5_GSSAPI_SERVICE, /* GSSAPI service name */
STRING_PROXY_SERVICE_NAME, /* Proxy service name */
+#endif
+#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
+ defined(USE_SPNEGO)
STRING_SERVICE_NAME, /* Service name */
#endif
STRING_MAIL_FROM,