summaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-02 00:24:32 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-02 00:35:16 +0000
commitb6821dbb91a7433d7451c1ad4cbd49cc4b8a71a9 (patch)
treeaa55f2ea79191187bd7d93d80618eb802b63b43b /lib/pop3.c
parentb04eef13182dd3d26bf095758d27b13556583fab (diff)
downloadcurl-b6821dbb91a7433d7451c1ad4cbd49cc4b8a71a9.tar.gz
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.
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 13528e3d5..03d737ef2 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1131,7 +1131,7 @@ static CURLcode pop3_state_auth_ntlm_type2msg_resp(struct connectdata *conn,
}
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
/* For AUTH GSSAPI (without initial response) responses */
static CURLcode pop3_state_auth_gssapi_resp(struct connectdata *conn,
int pop3code,
@@ -1591,7 +1591,7 @@ static CURLcode pop3_statemach_act(struct connectdata *conn)
break;
#endif
-#if defined(USE_WINDOWS_SSPI)
+#if defined(USE_KRB5)
case POP3_AUTH_GSSAPI:
result = pop3_state_auth_gssapi_resp(conn, pop3code, pop3c->state);
break;
@@ -2121,7 +2121,7 @@ static CURLcode pop3_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((pop3c->authmechs & SASL_MECH_GSSAPI) &&
(pop3c->prefmech & SASL_MECH_GSSAPI)) {
pop3c->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */