From patchwork Tue May 22 12:03:38 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: 918221 X-Patchwork-Delegate: blogic@openwrt.org 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="HSJ2r4AN"; 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 40qvSH6HGRz9s55 for ; Tue, 22 May 2018 22:03:43 +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:References:In-Reply-To:To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QX8CkSIHDJQHrDv5EOBXftMqgiBR9fBtWEP59MudoTI=; b=HSJ2r4AN9Qg5sxzMPotr4AbVL gUaovRY6+7DIaAJEBA8Xu1TZ7RF15BDdrXfr1A5mpz2p0J7Es3LnRJsRdws2P2fRxKr07kwLgabZa 28Sz5B6Hx50hXvY/FN/42lf7u9j/annXauqPZ/w/lNWA8vktyv6FIA5ZH3dfs7N2PA4KyHba7J576 i+DCc4w+Cv2Hw9bX/Q10bm+Sn2XHFa9pQGgSNigM9uh+RNIzaFoX3e9ahPJxKVW5/hjRftzbFyh9s Hczd5qIzcUpusNKwVjddkI+cDNDyzwhuwT0gSpEqzd95nc0doD+yrt+1MjjOFmHZuuSYn8Qr+6coG XCO/vyqsA==; 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 1fL60w-0007Mi-6b; Tue, 22 May 2018 12:03:38 +0000 To: openwrt-devel@lists.openwrt.org In-Reply-To: <20180522120215.13360-1-cote2004-github@yahoo.com> References: <30f4d3c4-ed06-521a-28ee-d5b2e61ce667@phrozen.org> <20180522120215.13360-1-cote2004-github@yahoo.com> 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 , John Crispin 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 3/4] adb: added patch for openssl 1.1.0 compatibility Sender: "openwrt-devel" Date: Tue, 22 May 2018 12:03:38 +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);