Our MD4Update takes number of bytes not bits. This should fix NT authentication
This commit is contained in:
parent
b3ce018f65
commit
dd9db0b0d4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: chap_ms.c,v 1.8 1998/09/04 19:13:04 christos Exp $ */
|
||||
/* $NetBSD: chap_ms.c,v 1.9 1998/10/24 18:14:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* chap_ms.c - Microsoft MS-CHAP compatible implementation.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char rcsid[] = "Id: chap_ms.c,v 1.9 1998/09/04 18:48:12 christos Exp ";
|
||||
#else
|
||||
__RCSID("$NetBSD: chap_ms.c,v 1.8 1998/09/04 19:13:04 christos Exp $");
|
||||
__RCSID("$NetBSD: chap_ms.c,v 1.9 1998/10/24 18:14:13 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -274,8 +274,7 @@ ChapMS_NT(rchallenge, rchallenge_len, secret, secret_len, response)
|
|||
unicodePassword[i * 2] = (u_char)secret[i];
|
||||
|
||||
MD4Init(&md4Context);
|
||||
MD4Update(&md4Context, unicodePassword, secret_len * 2 * 8); /* Unicode is 2 bytes/char, *8 for bit count */
|
||||
|
||||
MD4Update(&md4Context, unicodePassword, secret_len * 2);
|
||||
MD4Final(hash, &md4Context); /* Tell MD4 we're done */
|
||||
|
||||
ChallengeResponse(rchallenge, hash, response->NTResp);
|
||||
|
|
Loading…
Reference in New Issue