summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-10-11 19:40:38 +0000
committerjdp <jdp@FreeBSD.org>1998-10-11 19:40:38 +0000
commit329eb7ae8e5c06bbefd21bcded42eff3cdb63769 (patch)
tree9907d72d0cd507a689d2dea63c5025cf0d6dd727 /usr.sbin/pppd
parenta5dd15773c47e8a6a2ec846998993d1b506ee8e5 (diff)
downloadFreeBSD-src-329eb7ae8e5c06bbefd21bcded42eff3cdb63769.zip
FreeBSD-src-329eb7ae8e5c06bbefd21bcded42eff3cdb63769.tar.gz
Fix the MS-CHAP support. The code was passing a bit count to
MD4Update(), but our version in libmd expects a byte count. This code is not currently compiled or linked into pppd, so I'm reasonably sure I didn't break anything. :-) I added the necessary statements to the Makefile, but left them commented out because we are in feature freeze. When the code is enabled, we must be careful to build it only if the DES library is available.
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/Makefile8
-rw-r--r--usr.sbin/pppd/chap_ms.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/pppd/Makefile b/usr.sbin/pppd/Makefile
index 1e6b85e..323cc0d 100644
--- a/usr.sbin/pppd/Makefile
+++ b/usr.sbin/pppd/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.10 1997/10/10 11:59:02 peter Exp $
+# $Id: Makefile,v 1.11 1998/09/19 22:42:11 obrien Exp $
CFLAGS+= -DHAVE_PATHS_H
@@ -27,4 +27,10 @@ CFLAGS+=-DPPP_FILTER
LDADD+= -lpcap
DPADD+= ${LIBPCAP}
+# MS-CHAP support. Requires the DES library.
+#CFLAGS+=-DCHAPMS
+#SRCS+= chap_ms.c
+#LDADD+= -ldes
+#DPADD+= ${LIBDES}
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/pppd/chap_ms.c b/usr.sbin/pppd/chap_ms.c
index 343f462..3b2ed89 100644
--- a/usr.sbin/pppd/chap_ms.c
+++ b/usr.sbin/pppd/chap_ms.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: chap_ms.c,v 1.4 1998/03/22 05:32:48 peter Exp $";
+static char rcsid[] = "$Id: chap_ms.c,v 1.5 1998/06/20 18:02:09 peter Exp $";
#endif
#ifdef CHAPMS
@@ -266,7 +266,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); /* Unicode is 2 bytes/char */
MD4Final(hash, &md4Context); /* Tell MD4 we're done */
OpenPOWER on IntegriCloud