From 59f3f92ba6150e9a5a57f71b6e781802148916d0 Mon Sep 17 00:00:00 2001 From: Grant Pannell Date: Sun, 26 Apr 2015 16:12:23 +0200 Subject: sasl_sspi: Populate domain from the realm in the challenge Without this, SSPI based digest auth was broken. Bug: https://github.com/bagder/curl/pull/141.patch --- lib/curl_sasl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/curl_sasl.h') diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h index 0dc73770f..117d60e32 100644 --- a/lib/curl_sasl.h +++ b/lib/curl_sasl.h @@ -65,6 +65,11 @@ struct kerberos5data; #define SASL_MECH_STRING_NTLM "NTLM" #define SASL_MECH_STRING_XOAUTH2 "XOAUTH2" +#if !defined(CURL_DISABLE_CRYPTO_AUTH) +#define DIGEST_MAX_VALUE_LENGTH 256 +#define DIGEST_MAX_CONTENT_LENGTH 1024 +#endif + enum { CURLDIGESTALGO_MD5, CURLDIGESTALGO_MD5SESS @@ -136,6 +141,10 @@ char *Curl_sasl_build_spn(const char *service, const char *instance); TCHAR *Curl_sasl_build_spn(const char *service, const char *instance); #endif +/* This is used to extract the realm from a challenge message */ +int Curl_sasl_digest_get_pair(const char *str, char *value, char *content, + const char **endptr); + #if defined(HAVE_GSSAPI) char *Curl_sasl_build_gssapi_spn(const char *service, const char *host); #endif -- cgit v1.2.3