diff options
author | Steve Holme <steve_holme@hotmail.com> | 2016-03-20 12:02:10 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2016-08-20 14:02:44 +0100 |
commit | 00417fd66c2b4bcffb9f7be2cf17e2be9bafafe0 (patch) | |
tree | 5c9dd5990aa5b0c80bfeb331dc4666763b8e64d1 /lib | |
parent | 0796a993171f627d546c42a8fb28e906528cc688 (diff) |
sasl: Added calls to Curl_auth_is_<mechansism>_supported()
Hooked up the SASL authentication layer to query the new 'is mechanism
supported' functions when deciding what mechanism to use.
For now existing functionality is maintained.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_sasl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index 35e9feaac..68a0b9320 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -288,7 +288,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, } else if(conn->bits.user_passwd) { #if defined(USE_KERBEROS5) - if(enabledmechs & SASL_MECH_GSSAPI) { + if((enabledmechs & SASL_MECH_GSSAPI) && Curl_auth_is_gssapi_supported()) { sasl->mutual_auth = FALSE; /* TODO: Calculate mutual authentication */ mech = SASL_MECH_STRING_GSSAPI; state1 = SASL_GSSAPI; @@ -308,7 +308,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, else #endif #ifndef CURL_DISABLE_CRYPTO_AUTH - if(enabledmechs & SASL_MECH_DIGEST_MD5) { + if((enabledmechs & SASL_MECH_DIGEST_MD5) && + Curl_auth_is_digest_supported()) { mech = SASL_MECH_STRING_DIGEST_MD5; state1 = SASL_DIGESTMD5; sasl->authused = SASL_MECH_DIGEST_MD5; @@ -321,7 +322,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, else #endif #ifdef USE_NTLM - if(enabledmechs & SASL_MECH_NTLM) { + if((enabledmechs & SASL_MECH_NTLM) && Curl_auth_is_ntlm_supported()) { mech = SASL_MECH_STRING_NTLM; state1 = SASL_NTLM; state2 = SASL_NTLM_TYPE2MSG; |