From patchwork Mon May 21 11:39:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gio--- via openwrt-devel X-Patchwork-Id: 917564 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lists.openwrt.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mFKnFepb"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40qGyx4JFGz9s1w for ; Mon, 21 May 2018 21:39:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Date:Sender:Content-Type: Subject:List-Help:Reply-To:List-Archive:List-Unsubscribe:List-Subscribe:Cc: From:List-Post:List-Id:Message-ID:MIME-Version:To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=6ht4MrR99KPINKV5uPDa4VGBubZMyHjzcxcIlzBMNvw=; b=mFKnFepbZZ+ZTKpKAxU128axRC GNC+l9sW3HeZs3hLaUVsfRHxeDGfoaWSLP9FPFqKlDxM4U20bG2pRax441wfPM9FVvOvscoKOSOtA +tuXt8qaPI2wjmOujyYXYgMWjNdf6efO/rKUlBDe7oMuDpNktvwFiWkFJAU6kFd/wNvy5QZckXCm2 AH6q0hg7VFd46b3eILfzsp8XU3pxhRNcthjYcfAFIraMEQfbQy8bl0eHUchhfZiYwA2EQyfkcSzn+ qZj+E3MAYaNNKKO6czYCMc81pUax/ykV9OfL5Fku/WTXqz/uCrWr2of7yXeqj3MVrTbbhqb93m6gS yLlxZ5Rg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fKj9r-0000ga-7H; Mon, 21 May 2018 11:39:19 +0000 To: openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Eneas U de Queiroz via openwrt-devel From: gio--- via openwrt-devel Precedence: list Cc: Eneas U de Queiroz , Henryk Heisig X-Mailman-Version: 2.1.21 X-BeenThere: openwrt-devel@lists.openwrt.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Eneas U de Queiroz List-Help: Subject: [OpenWrt-Devel] [PATCH] adb: added patch for openssl 1.1.0 compatibility Sender: "openwrt-devel" Date: Mon, 21 May 2018 11:39:19 +0000 Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Signed-off-by: Eneas U de Queiroz --- package/utils/adb/patches/010-openssl-1.1.patch | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/utils/adb/patches/010-openssl-1.1.patch diff --git a/package/utils/adb/patches/010-openssl-1.1.patch b/package/utils/adb/patches/010-openssl-1.1.patch new file mode 100644 index 0000000000..e4df372a34 --- /dev/null +++ b/package/utils/adb/patches/010-openssl-1.1.patch @@ -0,0 +1,28 @@ +--- a/adb/adb_auth_host.c ++++ b/adb/adb_auth_host.c +@@ -83,7 +83,13 @@ static int RSA_to_RSAPublicKey(RSA *rsa, + } + + 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); +@@ -97,7 +103,11 @@ static int RSA_to_RSAPublicKey(RSA *rsa, + 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);