]> git.ipfire.org Git - thirdparty/hostap.git/commit
For MS-CHAP, convert the password from UTF-8 to UCS-2
authorEvan Broder <ebroder@mokafive.com>
Fri, 28 Oct 2011 21:23:54 +0000 (00:23 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2011 21:23:54 +0000 (00:23 +0300)
commitc48183fca2d32cd45763fdbf45144aac856bea93
treef9086e83090faac783b4032cbbd687f720bd26cf
parent767885423bcabc0e7b0a9ae179e49b74435224ec
For MS-CHAP, convert the password from UTF-8 to UCS-2

The MS-CHAPv1 and MS-CHAPv2 RFCs specify that the password is a string
of "Unicode characters", which for Windows means UCS-2; thus the
password could be any even-length string of up to 512 bytes.

Instead of making the incompatible change of requiring the incoming
password to be UCS-2 encoded, assume the password is UTF-8 encoded and
convert it before using it in NtPasswordHash and
EncryptPwBlockWithPasswordHash.

Signed-off-by: Evan Broder <ebroder@mokafive.com>
src/crypto/ms_funcs.c