]>
Commit | Line | Data |
---|---|---|
c5a9b3d8 AM |
1 | diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux |
2 | index 534ccc2..cf11b74 100644 | |
3 | --- a/pppd/Makefile.linux | |
4 | +++ b/pppd/Makefile.linux | |
5 | @@ -41,7 +41,7 @@ COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\" | |
6 | # Uncomment the next 2 lines to include support for Microsoft's | |
7 | # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. | |
8 | CHAPMS=y | |
9 | -USE_CRYPT=y | |
10 | +#USE_CRYPT=y | |
11 | # Don't use MSLANMAN unless you really know what you're doing. | |
12 | #MSLANMAN=y | |
13 | # Uncomment the next line to include support for MPPE. CHAPMS (above) must | |
14 | @@ -147,7 +147,8 @@ endif | |
15 | ||
16 | ifdef NEEDDES | |
17 | ifndef USE_CRYPT | |
18 | -LIBS += -ldes $(LIBS) | |
19 | +CFLAGS += -I/usr/include/openssl | |
20 | +LIBS += -lcrypto | |
21 | else | |
22 | CFLAGS += -DUSE_CRYPT=1 | |
23 | endif | |
24 | diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c | |
25 | index 8b85b13..6b35375 100644 | |
26 | --- a/pppd/pppcrypt.c | |
27 | +++ b/pppd/pppcrypt.c | |
28 | @@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key with parity bits added */ | |
29 | des_key[7] = Get7Bits(key, 49); | |
30 | ||
31 | #ifndef USE_CRYPT | |
32 | - des_set_odd_parity((des_cblock *)des_key); | |
33 | + DES_set_odd_parity((DES_cblock *)des_key); | |
34 | #endif | |
35 | } | |
36 | ||
37 | @@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */ | |
38 | } | |
39 | ||
40 | #else /* USE_CRYPT */ | |
41 | -static des_key_schedule key_schedule; | |
42 | +static DES_key_schedule key_schedule; | |
43 | ||
44 | bool | |
45 | DesSetkey(key) | |
46 | u_char *key; | |
47 | { | |
48 | - des_cblock des_key; | |
49 | + DES_cblock des_key; | |
50 | MakeKey(key, des_key); | |
51 | - des_set_key(&des_key, key_schedule); | |
52 | + DES_set_key(&des_key, &key_schedule); | |
53 | return (1); | |
54 | } | |
55 | ||
56 | bool | |
57 | -DesEncrypt(clear, key, cipher) | |
58 | +DesEncrypt(clear, cipher) | |
59 | u_char *clear; /* IN 8 octets */ | |
60 | u_char *cipher; /* OUT 8 octets */ | |
61 | { | |
62 | - des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, | |
63 | - key_schedule, 1); | |
64 | + DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, | |
65 | + &key_schedule, 1); | |
66 | return (1); | |
67 | } | |
68 | ||
69 | @@ -185,8 +185,8 @@ DesDecrypt(cipher, clear) | |
70 | u_char *cipher; /* IN 8 octets */ | |
71 | u_char *clear; /* OUT 8 octets */ | |
72 | { | |
73 | - des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear, | |
74 | - key_schedule, 0); | |
75 | + DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear, | |
76 | + &key_schedule, 0); | |
77 | return (1); | |
78 | } | |
79 |