From f044cbe6fc9411262a90420e109e23d282a84b62 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 9 Apr 2016 05:57:10 +0100 Subject: sasl: Fixed compilation errors from commit 9d89a0387 ...when GSS-API or Windows SSPI are not used. --- lib/curl_sasl.c | 6 +++++- lib/url.c | 3 +++ lib/urldata.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3