summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEivind Næss <eivnaes@yahoo.com>2023-03-10 00:20:03 +0000
committerEivind Næss <eivnaes@yahoo.com>2023-03-17 14:17:41 +0000
commitef95263d74a26edf08061b940db722189b441e9c (patch)
treec1315e1fb4fc8f1a00ce66aa720311dae9856bc4
parent11febba74597dc22b1f2611db14537e3e81a11bc (diff)
downloadppp-ef95263d74a26edf08061b940db722189b441e9c.tar.gz
Compiling with --enable-mslanman is broken
Correcting the call to DesEncrypt() where needed. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
-rw-r--r--pppd/chap_ms.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pppd/chap_ms.c b/pppd/chap_ms.c
index 6b2a026..e3d808f 100644
--- a/pppd/chap_ms.c
+++ b/pppd/chap_ms.c
@@ -654,11 +654,12 @@ ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len,
BZERO(UcasePassword, sizeof(UcasePassword));
for (i = 0; i < secret_len; i++)
UcasePassword[i] = (u_char)toupper(secret[i]);
- (void) DesSetkey(UcasePassword + 0);
- DesEncrypt( StdText, PasswordHash + 0 );
- (void) DesSetkey(UcasePassword + 7);
- DesEncrypt( StdText, PasswordHash + 8 );
- ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]);
+
+ if (DesEncrypt(StdText, UcasePassword + 0, PasswordHash + 0) &&
+ DesEncrypt(StdText, UcasePassword + 7, PasswordHash + 8)) {
+
+ ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]);
+ }
}
#endif