summaryrefslogtreecommitdiff
path: root/lib/curl_sasl.h
diff options
context:
space:
mode:
authorGrant Pannell <grant@pannell.net.au>2015-04-26 16:12:23 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-04-26 16:12:23 +0200
commit59f3f92ba6150e9a5a57f71b6e781802148916d0 (patch)
tree61f20d9de4e2732a9b73f0feaf4c1938b7cf79ce /lib/curl_sasl.h
parent6a7261359b4c7ebddff0c096468047077e7d06ef (diff)
downloadgnurl-59f3f92ba6150e9a5a57f71b6e781802148916d0.tar.gz
gnurl-59f3f92ba6150e9a5a57f71b6e781802148916d0.tar.bz2
gnurl-59f3f92ba6150e9a5a57f71b6e781802148916d0.zip
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
Diffstat (limited to 'lib/curl_sasl.h')
-rw-r--r--lib/curl_sasl.h9
1 files changed, 9 insertions, 0 deletions
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