curl-library
Re: [PATCH] NTLM & Astaro & bug 75
Date: Wed, 20 Apr 2011 16:25:25 +0100
On Wed, 2011-04-20 at 16:13 +0200, Daniel Stenberg wrote:
> +/* 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)
> +{
> + size_t i;
> + for(i=0; i<length; i++) {
> + dest[2*i] = (unsigned char)src[i];
> + dest[2*i+1] = '\0';
> + }
That only works for ASCII input. Don't we already have working charset
conversion routines available, to convert to UCS-2 (or is it UTF-16)?
And shouldn't we set NTLMFLAG_NEGOTIATE_UNICODE in our initial Type 1
message now that we support it? That means we will basically never have
to use the legacy 8-bit crap.
(Fixing this code to use the /usr/bin/ntlm_auth helper for
single-sign-on has almost reached the top of my TODO list, btw).
-- David Woodhouse Open Source Technology Centre David.Woodhouse_at_intel.com Intel Corporation ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-04-20