diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-08-06 15:57:07 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-09 23:47:55 +0100 |
commit | 7aa8658d0504bcd9554dfa5fedffa7b4936d87ca (patch) | |
tree | a5f3c1c91e6b4d8e413949f6c4bc2ab820bf7fa3 /meta/recipes-connectivity/ppp/ppp | |
parent | dbda297fd91aab2727f7a69d3b7d3a32ad4261d2 (diff) | |
download | poky-7aa8658d0504bcd9554dfa5fedffa7b4936d87ca.tar.gz |
ppp: Use openssl for the DES instead of the libcrypt / glibc
(From OE-Core rev: bdf443c8fce628a93f1ad5100dcaeb3c0f3a70ad)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/ppp/ppp')
-rw-r--r-- | meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch b/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch new file mode 100644 index 0000000000..e53f240543 --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | Used openssl for the DES instead of the libcrypt / glibc | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | |||
7 | Index: ppp-2.4.7/pppd/Makefile.linux | ||
8 | =================================================================== | ||
9 | --- ppp-2.4.7.orig/pppd/Makefile.linux | ||
10 | +++ ppp-2.4.7/pppd/Makefile.linux | ||
11 | @@ -38,7 +38,7 @@ LIBS = | ||
12 | # Uncomment the next 2 lines to include support for Microsoft's | ||
13 | # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. | ||
14 | CHAPMS=y | ||
15 | -USE_CRYPT=y | ||
16 | +#USE_CRYPT=y | ||
17 | # Don't use MSLANMAN unless you really know what you're doing. | ||
18 | #MSLANMAN=y | ||
19 | # Uncomment the next line to include support for MPPE. CHAPMS (above) must | ||
20 | @@ -132,7 +132,7 @@ endif | ||
21 | |||
22 | ifdef NEEDDES | ||
23 | ifndef USE_CRYPT | ||
24 | -LIBS += -ldes $(LIBS) | ||
25 | +LIBS += -lcrypto | ||
26 | else | ||
27 | CFLAGS += -DUSE_CRYPT=1 | ||
28 | endif | ||
29 | Index: ppp-2.4.7/pppd/pppcrypt.c | ||
30 | =================================================================== | ||
31 | --- ppp-2.4.7.orig/pppd/pppcrypt.c | ||
32 | +++ ppp-2.4.7/pppd/pppcrypt.c | ||
33 | @@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w | ||
34 | des_key[7] = Get7Bits(key, 49); | ||
35 | |||
36 | #ifndef USE_CRYPT | ||
37 | - des_set_odd_parity((des_cblock *)des_key); | ||
38 | + DES_set_odd_parity((DES_cblock *)des_key); | ||
39 | #endif | ||
40 | } | ||
41 | |||
42 | @@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */ | ||
43 | } | ||
44 | |||
45 | #else /* USE_CRYPT */ | ||
46 | -static des_key_schedule key_schedule; | ||
47 | +static DES_key_schedule key_schedule; | ||
48 | |||
49 | bool | ||
50 | DesSetkey(key) | ||
51 | u_char *key; | ||
52 | { | ||
53 | - des_cblock des_key; | ||
54 | + DES_cblock des_key; | ||
55 | MakeKey(key, des_key); | ||
56 | - des_set_key(&des_key, key_schedule); | ||
57 | + DES_set_key(&des_key, &key_schedule); | ||
58 | return (1); | ||
59 | } | ||
60 | |||
61 | bool | ||
62 | -DesEncrypt(clear, key, cipher) | ||
63 | +DesEncrypt(clear, cipher) | ||
64 | u_char *clear; /* IN 8 octets */ | ||
65 | u_char *cipher; /* OUT 8 octets */ | ||
66 | { | ||
67 | - des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, | ||
68 | - key_schedule, 1); | ||
69 | + DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, | ||
70 | + &key_schedule, 1); | ||
71 | return (1); | ||
72 | } | ||
73 | |||
74 | @@ -185,8 +185,8 @@ DesDecrypt(cipher, clear) | ||
75 | u_char *cipher; /* IN 8 octets */ | ||
76 | u_char *clear; /* OUT 8 octets */ | ||
77 | { | ||
78 | - des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear, | ||
79 | - key_schedule, 0); | ||
80 | + DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear, | ||
81 | + &key_schedule, 0); | ||
82 | return (1); | ||
83 | } | ||
84 | |||