aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_ntlm_msgs.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-11-16 12:58:04 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-11-16 13:59:11 +0000
commita3fead9706f2344d934e67cf4cb8ec434bc9a2e6 (patch)
tree792371013067f7a0064b856023741f4f0c74d3cb /lib/curl_ntlm_msgs.c
parent201d0df50bb32b1d22539a43d511ebd98d52f575 (diff)
ntlm: Moved the SSPI based Type-2 message decoding into the SASL module
Diffstat (limited to 'lib/curl_ntlm_msgs.c')
-rw-r--r--lib/curl_ntlm_msgs.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c
index e874f3265..3f4d86bd3 100644
--- a/lib/curl_ntlm_msgs.c
+++ b/lib/curl_ntlm_msgs.c
@@ -217,8 +217,6 @@ CURLcode Curl_ntlm_decode_type2_target(struct SessionHandle *data,
return CURLE_OK;
}
-#endif
-
/*
NTLM message structure notes:
@@ -256,9 +254,7 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
const char *header,
struct ntlmdata *ntlm)
{
-#ifndef USE_WINDOWS_SSPI
static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
-#endif
/* NTLM type-2 message structure:
@@ -280,7 +276,7 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
unsigned char *type2 = NULL;
size_t type2_len = 0;
-#if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI)
+#if defined(CURL_DISABLE_VERBOSE_STRINGS)
(void)data;
#endif
@@ -297,10 +293,6 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
return CURLE_BAD_CONTENT_ENCODING;
}
-#ifdef USE_WINDOWS_SSPI
- ntlm->input_token = type2;
- ntlm->input_token_len = type2_len;
-#else
ntlm->flags = 0;
if((type2_len < 32) ||
@@ -334,12 +326,10 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data,
});
free(type2);
-#endif
return result;
}
-#ifndef USE_WINDOWS_SSPI
/* copy the source to the destination and fill in zeroes in every
other destination byte! */
static void unicodecpy(unsigned char *dest, const char *src, size_t length)
@@ -350,7 +340,6 @@ static void unicodecpy(unsigned char *dest, const char *src, size_t length)
dest[2 * i + 1] = '\0';
}
}
-#endif
/*
* Curl_ntlm_create_type1_message()
@@ -472,6 +461,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
/* Return with binary blob encoded into base64 */
return Curl_base64_encode(NULL, (char *)ntlmbuf, size, outptr, outlen);
}
+#endif
/*
* Curl_ntlm_create_type3_message()