*/
#ifndef lint
-static char rcsid[] = "$Id: chap_ms.c,v 1.9 1998/09/04 18:48:12 christos Exp $";
+static char rcsid[] = "$Id: chap_ms.c,v 1.11 1998/11/24 19:30:38 christos Exp $";
#endif
#ifdef CHAPMS
static void Collapse __P((u_char *, u_char *));
#endif
+#ifdef MSLANMAN
+bool ms_lanman = 0; /* Use LanMan password instead of NT */
+ /* Has meaning only with MS-CHAP challenges */
+#endif
+
static void
ChallengeResponse(challenge, pwHash, response)
u_char *challenge; /* IN 8 octets */
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 */
int secret_len;
{
MS_ChapResponse response;
-#ifdef MSLANMAN
- extern int ms_lanman;
-#endif
#if 0
CHAPDEBUG((LOG_INFO, "ChapMS: secret is '%.*s'", secret_len, secret));