summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-06 15:57:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-09 23:47:55 +0100
commit7aa8658d0504bcd9554dfa5fedffa7b4936d87ca (patch)
treea5f3c1c91e6b4d8e413949f6c4bc2ab820bf7fa3 /meta/recipes-connectivity/ppp
parentdbda297fd91aab2727f7a69d3b7d3a32ad4261d2 (diff)
downloadpoky-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')
-rw-r--r--meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch84
-rw-r--r--meta/recipes-connectivity/ppp/ppp_2.4.7.bb5
2 files changed, 87 insertions, 2 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 @@
1Used openssl for the DES instead of the libcrypt / glibc
2
3Upstream-Status: Pending
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Index: 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
29Index: 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
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index a1bb7d71c1..f4646bd693 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -4,7 +4,7 @@ the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
4SECTION = "console/network" 4SECTION = "console/network"
5HOMEPAGE = "http://samba.org/ppp/" 5HOMEPAGE = "http://samba.org/ppp/"
6BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" 6BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
7DEPENDS = "libpcap" 7DEPENDS = "libpcap openssl"
8LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD" 8LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD"
9LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \ 9LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
10 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \ 10 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
@@ -32,6 +32,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
32 file://fix-CVE-2015-3310.patch \ 32 file://fix-CVE-2015-3310.patch \
33 file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \ 33 file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \
34 file://0001-ppp-Remove-unneeded-include.patch \ 34 file://0001-ppp-Remove-unneeded-include.patch \
35 file://ppp-2.4.7-DES-openssl.patch \
35" 36"
36 37
37SRC_URI_append_libc-musl = "\ 38SRC_URI_append_libc-musl = "\
@@ -49,7 +50,7 @@ EXTRA_OECONF = "--disable-strip"
49# Package Makefile computes CFLAGS, referencing COPTS. 50# Package Makefile computes CFLAGS, referencing COPTS.
50# Typically hard-coded to '-O2 -g' in the Makefile's. 51# Typically hard-coded to '-O2 -g' in the Makefile's.
51# 52#
52EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${S}/include"' 53EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"'
53 54
54do_configure () { 55do_configure () {
55 oe_runconf 56 oe_runconf