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.
This commit is contained in:
Steve Holme
2014-11-02 00:24:32 +00:00
parent b04eef1318
commit b6821dbb91
8 changed files with 27 additions and 18 deletions

View File

@@ -44,7 +44,9 @@
/* The last #include file should be: */
#include "memdebug.h"
#if defined(USE_KRB5)
void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5);
#endif
/*
* Curl_sasl_build_spn()
@@ -269,9 +271,9 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
return result;
}
#endif /* !CURL_DISABLE_CRYPTO_AUTH */
#if defined(USE_KRB5)
/*
* Curl_sasl_create_gssapi_user_message()
*
@@ -703,5 +705,6 @@ void Curl_sasl_gssapi_cleanup(struct kerberos5data *krb5)
/* Reset any variables */
krb5->token_max = 0;
}
#endif /* USE_KRB5 */
#endif /* USE_WINDOWS_SSPI */