[Bug 37063] NTLM EncryptMessage/DecryptMessage failure

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Aug 8 05:36:42 CDT 2014


http://bugs.winehq.org/show_bug.cgi?id=37063

--- Comment #5 from Hans Leidekker <hans at meelstraat.net> ---
(In reply to dwmw2 at infradead.org from comment #4)
> Created attachment 49257 [details]
> Convert from CP_ACP to UTF16 and then to CP_UNIXCP for
> SEC_WINNT_AUTH_IDENTITY_ANSI
> 
> (In reply to Hans Leidekker from comment #2)
> > (In reply to dwmw2 at infradead.org from comment #1)
> > > Created attachment 49254 [details]
> > > Cope with SEC_WINNT_AUTH_IDENTITY_ANSI
> > > 
> > > This fixes the easy part.. the domain seems to be present and correct now
> > > too.
> > 
> > Looks good. Please submit it to wine-patches at winehq.org.
> 
> On further reflection... I realise my patch assumes that CP_ACP ==
> CP_UNIXCP. That's not a valid assumption, is it? This being the 21st
> century, CP_UNIXCP is going to be UTF-8 fairly much everywhere... and the
> win32 side isn't likely to be using UTF-8 as the ANSI code page because
> support for that is so broken under Windows.
> So perhaps I need to convert the ANSI strings from CP_ACP to 'Unicode' and
> then pass them into the (unmolested) ntlm_Get*Arg() functions to be
> converted to CP_UNIXCP as before? Like this...

Yes, that's better. You should use WCHAR instead of wchar_t. Also note that
HeapFree doesn't need the NULL pointer guard.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list