1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
--- ./pppd/pppcrypt.c.orig 2014-08-09 07:31:39.000000000 -0500
+++ ./pppd/pppcrypt.c 2018-09-18 18:59:26.393068817 -0500
@@ -110,7 +110,7 @@
}
bool
-DesSetkey(key)
+setkey(key)
u_char *key;
{
u_char des_key[8];
@@ -126,7 +126,7 @@
}
bool
-DesEncrypt(clear, cipher)
+encrypt(clear, cipher)
u_char *clear; /* IN 8 octets */
u_char *cipher; /* OUT 8 octets */
{
@@ -161,7 +161,7 @@
static des_key_schedule key_schedule;
bool
-DesSetkey(key)
+setkey(key)
u_char *key;
{
des_cblock des_key;
@@ -171,7 +171,7 @@
}
bool
-DesEncrypt(clear, key, cipher)
+encrypt(clear, key, cipher)
u_char *clear; /* IN 8 octets */
u_char *cipher; /* OUT 8 octets */
{
--- ./pppd/chap_ms.c.orig 2014-08-09 07:31:39.000000000 -0500
+++ ./pppd/chap_ms.c 2018-09-18 18:59:26.391068817 -0500
@@ -518,12 +518,12 @@
sizeof(ZPasswordHash), ZPasswordHash);
#endif
- (void) DesSetkey(ZPasswordHash + 0);
- DesEncrypt(challenge, response + 0);
- (void) DesSetkey(ZPasswordHash + 7);
- DesEncrypt(challenge, response + 8);
- (void) DesSetkey(ZPasswordHash + 14);
- DesEncrypt(challenge, response + 16);
+ (void) setkey(ZPasswordHash + 0);
+ encrypt(challenge, response + 0);
+ (void) setkey(ZPasswordHash + 7);
+ encrypt(challenge, response + 8);
+ (void) setkey(ZPasswordHash + 14);
+ encrypt(challenge, response + 16);
#if 0
dbglog("ChallengeResponse - response %.24B", response);
@@ -640,10 +640,10 @@
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 );
+ (void) setkey(UcasePassword + 0);
+ encrypt( StdText, PasswordHash + 0 );
+ (void) setkey(UcasePassword + 7);
+ encrypt( StdText, PasswordHash + 8 );
ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]);
}
#endif
|