Commit a0f21294 authored by Steve Holme's avatar Steve Holme
Browse files

vauth: Introduced Curl_auth_is_<mechansism>_supported() functions

As Windows SSPI authentication calls fail when a particular mechanism
isn't available, introduced these functions for DIGEST, NTLM, Kerberos 5
and Negotiate to allow both HTTP and SASL authentication the opportunity
to query support for a supported mechanism before selecting it.

For now each function returns TRUE to maintain compatability with the
existing code when called.
parent cdd61dc3
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -305,6 +305,20 @@ static CURLcode auth_decode_digest_md5_message(const char *chlg64,
  return CURLE_OK;
}

/*
 * Curl_auth_is_digest_supported()
 *
 * This is used to evaluate if DIGEST is supported.
 *
 * Parameters: None
 *
 * Returns TRUE as DIGEST as handled by libcurl.
 */
bool Curl_auth_is_digest_supported(void)
{
  return TRUE;
}

/*
 * Curl_auth_create_digest_md5_message()
 *
+16 −0
Original line number Diff line number Diff line
@@ -43,6 +43,22 @@
#include "curl_memory.h"
#include "memdebug.h"

/*
* Curl_auth_is_digest_supported()
*
* This is used to evaluate if DIGEST is supported.
*
* Parameters: None
*
* Returns TRUE if DIGEST is supported by Windows SSPI.
*/
bool Curl_auth_is_digest_supported(void)
{
  /* TODO: Return true for now which maintains compatability with the existing
     code */
  return TRUE;
}

/*
 * Curl_auth_create_digest_md5_message()
 *
+14 −0
Original line number Diff line number Diff line
@@ -41,6 +41,20 @@
#include "curl_memory.h"
#include "memdebug.h"

/*
 * Curl_auth_is_gssapi_supported()
 *
 * This is used to evaluate if GSSAPI (Kerberos V5) is supported.
 *
 * Parameters: None
 *
 * Returns TRUE if Kerberos V5 is supported by the GSS-API library.
 */
bool Curl_auth_is_gssapi_supported(void)
{
  return TRUE;
}

/*
 * Curl_auth_create_gssapi_user_message()
 *
+16 −0
Original line number Diff line number Diff line
@@ -39,6 +39,22 @@
#include "curl_memory.h"
#include "memdebug.h"

/*
 * Curl_auth_is_gssapi_supported()
 *
 * This is used to evaluate if GSSAPI (Kerberos V5) is supported.
 *
 * Parameters: None
 *
 * Returns TRUE if Kerberos V5 is supported by Windows SSPI.
 */
bool Curl_auth_is_gssapi_supported(void)
{
  /* TODO: Return true for now which maintains compatability with the existing
     code */
  return TRUE;
}

/*
 * Curl_auth_create_gssapi_user_message()
 *
+14 −0
Original line number Diff line number Diff line
@@ -216,6 +216,20 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
       from the beginning of the NTLM message.
*/

/*
 * Curl_auth_is_ntlm_supported()
 *
 * This is used to evaluate if NTLM is supported.
 *
 * Parameters: None
 *
 * Returns TRUE as NTLM as handled by libcurl.
 */
bool Curl_auth_is_ntlm_supported(void)
{
  return TRUE;
}

/*
 * Curl_auth_decode_ntlm_type2_message()
 *
Loading