From patchwork Mon Aug 6 22:57:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 143538 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3806970ljj; Mon, 6 Aug 2018 15:58:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdEngDP/X4+K2KETQYDqaGO5wREIDpaWu1nn222K1YrSCzgReTWzMzinkJWrmUmK8PYD1Ec X-Received: by 2002:a62:cd82:: with SMTP id o124-v6mr4470991pfg.206.1533596322122; Mon, 06 Aug 2018 15:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533596322; cv=none; d=google.com; s=arc-20160816; b=Xs61kVNaGgnlIC6aBlTqfa5TOwL0gY84Nxpf0nRXWlXARuuwd5Nr+LSSeobhFBw6Zs SSmhe3X6HJNMvPtBDE77IssP9uw3Wl7gL2DwRB9Ro34HCo0AFdpqokq3ou3Df+c3kwnI yeCCOlWGPcjZ/RMWtUTB8vvYCBUYGZIcPq/8tYnhNrB4rkWG1X00I/lgB0mkfcT35GTe by4y91DI35VozXcVzS6adSlRE/qqW8H67HB1hH0c83EU3TmhkWwwP6NHVGo7bv+/kjql rTAQdpfdyvnppDmu6OCE0MnojEZpbsdS7XDnC5Y/IUj8ggqWvcKL8EjDdZGcwIo+LDof /u4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=febBKcMKMuAPOYCHzitPWXN06gcseSzvvc+gpWVrwZk=; b=gtOx9J5mU84wa4JHY8rSCB7CZEF4CzHnEjkmEmMIvhyuwhWKxlfi/Ke3sIFeN3Lhm9 /NiQcrl6uZmOoVrWy7zi4qL9McVVLNwWT/eXQ3hfaFPELSEpyHQW27UT9MMhlYg4SpXs yvtZSj2ie3lmS+AHVXWXOXSlUVdhwZtzSFMzpBTraz7gN5SmefJylyRW3OHkXaXo/skI f8QyG35/XJ1ISZVX6dwCjIyCYskS9Iv+q8e1m42hADGQv2GYpqf5KEVym3Qma9CgCslS GE4uVCI33/HB7AFQODOLphBKVQyvmp418y76p8uHPz4MHr3eYa3/NfpJIDU7zBv21MZ/ mR2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Sf1WBXn8; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id f62-v6si16337922pfa.73.2018.08.06.15.58.41; Mon, 06 Aug 2018 15:58:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Sf1WBXn8; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id BE69278C58; Mon, 6 Aug 2018 22:57:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mail.openembedded.org (Postfix) with ESMTP id EADB6745BF for ; Mon, 6 Aug 2018 22:57:35 +0000 (UTC) Received: by mail-pg1-f176.google.com with SMTP id r1-v6so6856485pgp.11 for ; Mon, 06 Aug 2018 15:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YV7WVCtmXXVqkhRQQk04uE7alOBBn7sOwMaub96nGSM=; b=Sf1WBXn80ef4eIgwI2jE6V+VMEZDvkI6Srgk9vNtCA6YGlSiM43UKYBhHJ9nrXoZb/ I+E5MrYVkbguXnqA/XA0Yq3B9LZuifW56mnDtO2Xbpr7sNBACOeUdqZB3+j/HcQJtfHi YrFNEQ5gaZGqQfkCBlMIQCrD6hHzgFh53ZtW/dbaPhbOFlhLfaXyI2C6TvywrKc2FkIq 8Zv5lb7E8PZVBv0hYsQZD3NRK+dH9ixLYVi2y81UfxghAxJufJBWJSqRg+TbqTUgv9jP YZ766sr+foXfH5yXntKmmwULkm838tU+OWxnyavuulDjKCIu+zZBNvrJA8rLZsCIjkbi P9Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YV7WVCtmXXVqkhRQQk04uE7alOBBn7sOwMaub96nGSM=; b=WoG8L6mUs7EAttALBfZu0p00s/WfhJ3rfkomzhpt/hhUDEfDrkrULl1bVotmjp5/1G RCi6unzRfhNga1jZ69QF3BwTxMReUBr0E7RrIxgNGtyOXYYWMQ58O8Uk4zqdaLo07Eka giPRuxJnAoQR7eXW6/fl82TOpfHLToXx12w2998pjwAY3PQmzLmPZDU1O15FJYL5wIQr 39ItaNqzTej+o87oTYemIb+uYGP7mMqXdJn/yoN20N02HBz4EzO8kyJxhyuWn36Gp15s L4KAxks0hG9F2URAOpiwGacQtrQYD6VOTh1U+YrXgTlbeisxrizN8JeJQDe4PYokUqid FzlA== X-Gm-Message-State: AOUpUlHWLeM4ySvBkXraa8L2AVtL2WA+NKShDRj8HjzacWhAYpzpE2Fm 80C1EXDWpj9rsNsAt7hv1d3wZ8Df X-Received: by 2002:a62:cac5:: with SMTP id y66-v6mr18887033pfk.187.1533596256694; Mon, 06 Aug 2018 15:57:36 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::1d00]) by smtp.gmail.com with ESMTPSA id x1-v6sm11993137pgr.59.2018.08.06.15.57.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 15:57:35 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Mon, 6 Aug 2018 15:57:07 -0700 Message-Id: <06c361481025023e6ad962759e5968bd9c19c0b7.1533595822.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [OE-core] [PATCH 10/18] ppp: Use openssl for the DES instead of the libcrypt / glibc X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../ppp/ppp/ppp-2.4.7-DES-openssl.patch | 84 +++++++++++++++++++ meta/recipes-connectivity/ppp/ppp_2.4.7.bb | 5 +- 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-2.4.7-DES-openssl.patch -- 2.18.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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 @@ +Used openssl for the DES instead of the libcrypt / glibc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj + +Index: ppp-2.4.7/pppd/Makefile.linux +=================================================================== +--- ppp-2.4.7.orig/pppd/Makefile.linux ++++ ppp-2.4.7/pppd/Makefile.linux +@@ -38,7 +38,7 @@ LIBS = + # Uncomment the next 2 lines to include support for Microsoft's + # MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux. + CHAPMS=y +-USE_CRYPT=y ++#USE_CRYPT=y + # Don't use MSLANMAN unless you really know what you're doing. + #MSLANMAN=y + # Uncomment the next line to include support for MPPE. CHAPMS (above) must +@@ -132,7 +132,7 @@ endif + + ifdef NEEDDES + ifndef USE_CRYPT +-LIBS += -ldes $(LIBS) ++LIBS += -lcrypto + else + CFLAGS += -DUSE_CRYPT=1 + endif +Index: ppp-2.4.7/pppd/pppcrypt.c +=================================================================== +--- ppp-2.4.7.orig/pppd/pppcrypt.c ++++ ppp-2.4.7/pppd/pppcrypt.c +@@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w + des_key[7] = Get7Bits(key, 49); + + #ifndef USE_CRYPT +- des_set_odd_parity((des_cblock *)des_key); ++ DES_set_odd_parity((DES_cblock *)des_key); + #endif + } + +@@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */ + } + + #else /* USE_CRYPT */ +-static des_key_schedule key_schedule; ++static DES_key_schedule key_schedule; + + bool + DesSetkey(key) + u_char *key; + { +- des_cblock des_key; ++ DES_cblock des_key; + MakeKey(key, des_key); +- des_set_key(&des_key, key_schedule); ++ DES_set_key(&des_key, &key_schedule); + return (1); + } + + bool +-DesEncrypt(clear, key, cipher) ++DesEncrypt(clear, cipher) + u_char *clear; /* IN 8 octets */ + u_char *cipher; /* OUT 8 octets */ + { +- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher, +- key_schedule, 1); ++ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, ++ &key_schedule, 1); + return (1); + } + +@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear) + u_char *cipher; /* IN 8 octets */ + u_char *clear; /* OUT 8 octets */ + { +- des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear, +- key_schedule, 0); ++ DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear, ++ &key_schedule, 0); + return (1); + } + 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." SECTION = "console/network" HOMEPAGE = "http://samba.org/ppp/" BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" -DEPENDS = "libpcap" +DEPENDS = "libpcap openssl" LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD" LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \ 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 \ file://fix-CVE-2015-3310.patch \ file://0001-pppoe-include-netinet-in.h-before-linux-in.h.patch \ file://0001-ppp-Remove-unneeded-include.patch \ + file://ppp-2.4.7-DES-openssl.patch \ " SRC_URI_append_libc-musl = "\ @@ -49,7 +50,7 @@ EXTRA_OECONF = "--disable-strip" # Package Makefile computes CFLAGS, referencing COPTS. # Typically hard-coded to '-O2 -g' in the Makefile's. # -EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${S}/include"' +EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"' do_configure () { oe_runconf