From patchwork Sun Aug 5 02:07:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 143461 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1804670ljj; Sat, 4 Aug 2018 19:08:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdPlrCcka2rO7RMNvaK4kV0qK7AapL8v1X8SyLhHsH9ftwmh3EP3M00alzioA4CqXXff+H8 X-Received: by 2002:a63:8341:: with SMTP id h62-v6mr9089379pge.298.1533434916491; Sat, 04 Aug 2018 19:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533434916; cv=none; d=google.com; s=arc-20160816; b=0gT8ACz/50WEJpJ5zfgactLA3XxmoaT6eiT1Ta0RIdF7n8PqjPePl8q33RA8Aa1CD1 tehCm7wXU1ZOXp4Ik+Qe9JumQqz/JbsJjzqt5ccTTfd/0jezHKbBPNWRGgmVG7B8XaII GYm9QCiuNZSIjAUGkaD9dVjq1s7edqPUUidnP9uhcW6cGFnqkta8zojxACkJbPijVcyo ReACTMWcDNSliT1gD64WBmsrs1qp1puOKqAaUL22Gjy2kePxhxjVKkCEOl4Bp/qm36LX vgJLauf1wKFvb1+TF2lNBL/oQwMXEp2PC5yCHcmhiPEtdk16BZAkm3QvHN5LAYhjk4gA alug== 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=nQjz1niLFUEMk1LWbilApOmH5KgcMTP/X3/7HAWr9O71mJeIGmCQR7r4nE+3n92Nqq bl80ypAbxEYZgbDOhYlRUj75lECHIwBak6R+uSH6MnP+FAQOfZ54XemadfQ+D0/H4GRD 0JBXbdb57YODuq6lChA0DQ+eXGzuPTCuHKHjDK4AKL5bj4fuXjhzNbv8ORuLe9rLEEqX 74GzNgvY4lgCUog8PcflBQvjItd07kfVwRMEvH7NaZ0wVVcxOD9+C6TGbM+tTTEoO7uT JuFH872AaSmsGeAOgvHEndZ0pKIzaYSFsIJhp7S+E2sXt65n5JZadq+jRl9oaV7AnxjO r9Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=HXsYY8uf; 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 b2-v6si9378987pff.192.2018.08.04.19.08.36; Sat, 04 Aug 2018 19:08:36 -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=HXsYY8uf; 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 584F378CA5; Sun, 5 Aug 2018 02:07:45 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl0-f49.google.com (mail-pl0-f49.google.com [209.85.160.49]) by mail.openembedded.org (Postfix) with ESMTP id 8F898783DE for ; Sun, 5 Aug 2018 02:07:20 +0000 (UTC) Received: by mail-pl0-f49.google.com with SMTP id w3-v6so4172853plq.2 for ; Sat, 04 Aug 2018 19:07:22 -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=HXsYY8ufJDKOUgerFfGolCuNj//1rSqaffXw022obarhUNaRMQ9rUPSKc2iLAAG9ka j/gkAWj0Ytf6dJvuSgmajDf8Nz+9ek7E4dpAyhFnQdwdQL2uEmMLVf/XxmLXtyDm6m9M fGqbrwlvlXXii/J9WrmwZbEqTqagHuJ03pXRd6x9IlaWT0A7B5rFcFUXcu6jDhHS0KKr HvnBvrOv8S6S+sKHNQUiYiVMbE8BT0SwqhPdBrCZoOovS3lYeXZKVCM1wlact6h0Q6pp LZCAOGTYt0C8jZanlQ8/5rdj/aNG1Yr3W4vozL5NoR+RYtpcrEPD0bKBNSu8Pv/I4N7o JjWA== 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=t5Zz8igJqnDTbB6khMs4AFkaHvGsAM5JnKsLxTG7RUl8FN6GMilJSufZOu8IAum1BA N/c4O1FaNn+b4qdNYjh7bfWanSHIYVWvu+ln8sOh13YuJGvT/mtoYX02Xs/DnMz/voWm wos9yDjy4vQfY/9JN7EcwuFFy7xlxQedD9LFECsJwFmoNOkFSu5Zt92kYFULPoC9q/4f UC53rHOgVoYNOs4h3lhcROmWU9f3VPyY5GD4FqpSGuGO4b0tuny99DIya9HUkvG5C5sM 61Q/YtmxWnnHCY7cyAVQOUDxdK0O84qP1s3RJN+YgCEhRphOzHabTmFig56y1nm8DvmK aFbQ== X-Gm-Message-State: AOUpUlGmTyX/KIauvhhAQO1W0S4AAbKbxtudh5icGZmRGGQvKCp8mXEb eOD8wMQC6JhwmGxtgF1Lskd4BWOj X-Received: by 2002:a17:902:8c84:: with SMTP id t4-v6mr9247271plo.100.1533434841371; Sat, 04 Aug 2018 19:07:21 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::5b3b]) by smtp.gmail.com with ESMTPSA id b195-v6sm4486021pfb.2.2018.08.04.19.07.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Aug 2018 19:07:20 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Sat, 4 Aug 2018 19:07:02 -0700 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [OE-core] [PATCH 10/10] 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