From dd9db0b0d4de4da5ec23721338dbb18a97767df5 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 24 Oct 1998 18:14:13 +0000 Subject: [PATCH] Our MD4Update takes number of bytes not bits. This should fix NT authentication --- usr.sbin/pppd/pppd/chap_ms.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pppd/pppd/chap_ms.c b/usr.sbin/pppd/pppd/chap_ms.c index cdfa9dd72725..eade31c85148 100644 --- a/usr.sbin/pppd/pppd/chap_ms.c +++ b/usr.sbin/pppd/pppd/chap_ms.c @@ -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);