From patchwork Mon Feb 4 23:30:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1036345 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fEDhHbC5"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tkHR0LD8z9sNG for ; Tue, 5 Feb 2019 10:21:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C3F9581212; Mon, 4 Feb 2019 23:21:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id leFXH4++-q1Q; Mon, 4 Feb 2019 23:21:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CBF2B872DD; Mon, 4 Feb 2019 23:21:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1710B1BF388 for ; Mon, 4 Feb 2019 23:21:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 14A442E0A0 for ; Mon, 4 Feb 2019 23:21:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z0xdYdr-Yx5i for ; Mon, 4 Feb 2019 23:21:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by silver.osuosl.org (Postfix) with ESMTPS id 151612154E for ; Mon, 4 Feb 2019 23:21:34 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id n18-v6so1372713lji.7 for ; Mon, 04 Feb 2019 15:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZLE2+E1sR1ZrNLUcCxXCcwuORr5UilljXL5bRiU7kDk=; b=fEDhHbC5/v9qMoCagknpvqwYPIlYMa4ZwtApVKBdNbbFfawLcP4ftHDySHGCMBmks7 GZQWlwqBAQTt33e5QnjyqqZblhZ3/5jNG3ZLjPbBPP4nP4n/0LQz+EeRfFIEv1suHEsF qlqUNkZ1hZCNgCr5yoEOoxhhv7Kwe3GWOeQS8KzVXknpIED+Iso3+ATeVuozCEKDPdGx Ng+ozn2cNoYbQ5N5yc+KHD64t+VhbX3V4UPuxaWxuuwNuyT3bYdVX/Qee16Hdsz6b+ws ldGYtH2Bh/8JjIyjHu95Xu7OSbKAxaVJwgz7Z5FxV6OC2LR4DeDqpz0lbJzCX1Lb1NBk 63BQ== 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; bh=ZLE2+E1sR1ZrNLUcCxXCcwuORr5UilljXL5bRiU7kDk=; b=E7ftF7Zqwtm/iNE48lvmSJt5DQR2E4ZaaYdzdofOaAwQhMgJqfrcTk7+aGYe+Go1Mt 8h1RFOeKBNIwXYfIgVan3KYDNaXNljUBo8QvC3KSRAvrzfRNECi5T/LN2C1SL4stHXXz Jwy6wq2EIZiQsAk6g3QJzmwtWZztgSckE5+pHIV1b5n5NuAOxThUkATdDQB1Gdz0PgDD 2OVohqcptpRRIuB29C60GPB5e/7Ox09sdI2EgBk1r14eZYp5JT00eXTjHHdH8YW/GF0n ZlFD/RDj3eSRsrN3cel5I4JgOei4lubw45+St5IMm4xWwrMpZIT7eLOjcvncvEqyPfBb C3sg== X-Gm-Message-State: AHQUAuZ81p5m5Is0eem9AKfkQNctJuTLZJxrpt3t4Z1mlzYoxTWKgTab KfhdwIplqEajPSpLypW7onWTUkyL7Pg= X-Google-Smtp-Source: AHgI3IatsvMX6c9l/cSG1UsUTAJ5oJ4gmZNeBaMP1IeUsYZUSTCvqAsAOyCcujDR092SGBMiofhPGA== X-Received: by 2002:a2e:4784:: with SMTP id u126-v6mr1071818lja.124.1549322491639; Mon, 04 Feb 2019 15:21:31 -0800 (PST) Received: from vkochan-ThinkPad-T470p.lan ([93.75.250.209]) by smtp.gmail.com with ESMTPSA id r7-v6sm3000054ljc.10.2019.02.04.15.21.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 15:21:30 -0800 (PST) From: Vadim Kochan To: buildroot@buildroot.org Date: Tue, 5 Feb 2019 01:30:29 +0200 Message-Id: <20190204233029.1318-1-vadim4j@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH 1/1] package/android-tools: Fix build with OpenSSL 1.1.x X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Korsgaard , Vadim Kochan , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use patch from: https://github.com/lede-project/source/commit/f63f20fb93c7e67775cb01d97fc88b5b29452b81 which fixes compilation of adb with OpenSSL 1.1.x, and took only part for adb only. Fixes: http://autobuild.buildroot.net/results/66f/66f05eb9a56aa8526a1420334d68c7eda094e90e/ Signed-off-by: Vadim Kochan --- ...ded-patch-for-openssl-1.1.0-compatibility.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/android-tools/0010-adb-added-patch-for-openssl-1.1.0-compatibility.patch diff --git a/package/android-tools/0010-adb-added-patch-for-openssl-1.1.0-compatibility.patch b/package/android-tools/0010-adb-added-patch-for-openssl-1.1.0-compatibility.patch new file mode 100644 index 0000000000..2de338368f --- /dev/null +++ b/package/android-tools/0010-adb-added-patch-for-openssl-1.1.0-compatibility.patch @@ -0,0 +1,47 @@ +From bb3da0e32be4f2260940edf3ee0f88103dfd0dcc Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +Date: Tue, 5 Feb 2019 01:12:19 +0200 +Subject: [PATCH] adb: added patch for openssl 1.1.0 compatibility + +Signed-off-by: Eneas U de Queiroz + +[Vadim: took only adb related part from +https://github.com/lede-project/source/commit/f63f20fb93c7e67775cb01d97fc88b5b29452b81] +Signed-off-by: Vadim Kochan +--- + core/adb/adb_auth_host.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/core/adb/adb_auth_host.c b/core/adb/adb_auth_host.c +index 9039d42..debd2ef 100644 +--- a/core/adb/adb_auth_host.c ++++ b/core/adb/adb_auth_host.c +@@ -79,7 +79,13 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey) + } + + BN_set_bit(r32, 32); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ const BIGNUM *rsa_n, *rsa_e; ++ RSA_get0_key(rsa, &rsa_n, &rsa_e, NULL); ++ BN_copy(n, rsa_n); ++#else + BN_copy(n, rsa->n); ++#endif + BN_set_bit(r, RSANUMWORDS * 32); + BN_mod_sqr(rr, r, n, ctx); + BN_div(NULL, rem, n, r32, ctx); +@@ -93,7 +99,11 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey) + BN_div(n, rem, n, r32, ctx); + pkey->n[i] = BN_get_word(rem); + } ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++ pkey->exponent = BN_get_word(rsa_e); ++#else + pkey->exponent = BN_get_word(rsa->e); ++#endif + + out: + BN_free(n0inv); +-- +2.14.1 +