From b6821dbb91a7433d7451c1ad4cbd49cc4b8a71a9 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 2 Nov 2014 00:24:32 +0000 Subject: sasl: Fixed Kerberos V5 inclusion when CURL_DISABLE_CRYPTO_AUTH is used Typically the USE_WINDOWS_SSPI definition would not be used when the CURL_DISABLE_CRYPTO_AUTH define is, however, it is still a valid build configuration and, as such, the SASL Kerberos V5 (GSSAPI) authentication data structures and functions would incorrectly be used when they shouldn't be. Introduced a new USE_KRB5 definition that takes into account the use of CURL_DISABLE_CRYPTO_AUTH like USE_SPNEGO and USE_NTLM do. --- lib/imap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/imap.c') diff --git a/lib/imap.c b/lib/imap.c index ee1bad295..4a0419a18 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -1300,7 +1300,7 @@ static CURLcode imap_state_auth_ntlm_type2msg_resp(struct connectdata *conn, } #endif -#if defined(USE_WINDOWS_SSPI) +#if defined(USE_KRB5) /* For AUTHENTICATE GSSAPI (without initial response) responses */ static CURLcode imap_state_auth_gssapi_resp(struct connectdata *conn, int imapcode, @@ -1911,7 +1911,7 @@ static CURLcode imap_statemach_act(struct connectdata *conn) break; #endif -#if defined(USE_WINDOWS_SSPI) +#if defined(USE_KRB5) case IMAP_AUTHENTICATE_GSSAPI: result = imap_state_auth_gssapi_resp(conn, imapcode, imapc->state); break; @@ -2803,7 +2803,7 @@ static CURLcode imap_calc_sasl_details(struct connectdata *conn, /* Calculate the supported authentication mechanism, by decreasing order of security, as well as the initial response where appropriate */ -#if defined(USE_WINDOWS_SSPI) +#if defined(USE_KRB5) if((imapc->authmechs & SASL_MECH_GSSAPI) && (imapc->prefmech & SASL_MECH_GSSAPI)) { imapc->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ -- cgit v1.2.3