Message ID | 20211029090533.3713530-2-cedric.izoard@ceva-dsp.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pzKG0JiZ; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ceva-dsp.com header.i=@ceva-dsp.com header.a=rsa-sha256 header.s=mail header.b=lq16vUmq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hgc4n2khMz9sRN for <incoming@patchwork.ozlabs.org>; Fri, 29 Oct 2021 20:07:05 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xvtJ8FfT5ZSxCQaZPX8XIgjQVlhIZMMSAoHYobkOJf8=; b=pzKG0JiZ0fyGnj VFgvHn24XabCrC2yERtLUAnv1aklLu+t/zy0hAQ0GjLL34btH6jBY6i85NaQS9vyfOkQmCSSQA/Dx lEDQM9DEpJ9LCz38QeGrWpHjeF/kGqgs9PxtFLdGE9vBGRVf4lniqBV8QluwhgGujCnpZmhVOsKS3 ToqNr/pHhUnWLGmGdOTK/gB9xcWQNQ06c3dQA6b2e8DUwvtaQBrjCww43TzK2DbS3kAy8iaJ5W1o1 swaiBbXIN26yATOm0NsK/3/lqEKFG5EJwKIDLvwmEGGs12Rbkzh+NE+QWttPae8Q3AaYr7rs9lnxD ktPMs+8y6RkwiHKKV3Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgNpu-00ARIM-RP; Fri, 29 Oct 2021 09:06:06 +0000 Received: from mxil.ceva-dsp.com ([195.82.129.9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgNpi-00ARG3-LK for hostap@lists.infradead.org; Fri, 29 Oct 2021 09:05:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ceva-dsp.com; s=mail; c=relaxed/simple; q=dns/txt; i=@ceva-dsp.com; t=1635498346; x=1638090346; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: 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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kAAS8mHWscip4+T9IsaZ/OWpON7dqnlIKyMKNDryXtA=; b=lq16vUmqt7efYRb0P5ZkfLFce1F9Me912hkP/VCzHUET9w0fVg4qzdE2QexHcBaC mct0Ggbs2FDmmXKJn30Nn0TqGDUr4divvkXHEWv9Z7FvLLJIqMSNsaVyL7/5iFT8 RinpxXSpPRhQIvCLom1QkoI7nhGI/rWdjnWSFNQOUoI=; X-AuditID: c3528109-e25a67000000202a-24-617bb96aa9a8 Received: from Mail-IL2.corp.local (Mail-IL2.corp.local [192.168.61.12]) by mxil.ceva-dsp.com (CEVA eMail Gateway) with SMTP id 50.A2.08234.A69BB716; Fri, 29 Oct 2021 12:05:46 +0300 (IDT) Received: from valium.corp.local (192.168.140.70) by Mail-IL2.corp.local (192.168.61.32) with Microsoft SMTP Server id 15.1.2242.12; Fri, 29 Oct 2021 12:05:45 +0300 From: Cedric Izoard <cedric.izoard@ceva-dsp.com> To: <hostap@lists.infradead.org> CC: "(4401 440) Cedric Izoard (France)" <cedric.izoard@ceva-dsp.com> Subject: [PATCH 1/4] OpenSSL: clear the correct flag in crypto_ec_key_get_ecprivate_key Date: Fri, 29 Oct 2021 11:05:30 +0200 Message-ID: <20211029090533.3713530-2-cedric.izoard@ceva-dsp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029090533.3713530-1-cedric.izoard@ceva-dsp.com> References: <20211029090533.3713530-1-cedric.izoard@ceva-dsp.com> MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.1158-8.6.1018-26496.007 X-TM-AS-Result: No-10-0.264000-4.000000 X-TMASE-MatchedRID: TZ/n+46y21hT5a+Wn1rTVJMIKPXbrloXEDnDEqNPduqGToisPp3j9Uk7 tOZw9f1oXExQDdM5HiKXlcbZrxbbC2JZXQNDzktSD3uYMxd01bfnaaW2UTafyGquw69QUQrLwps KyRuO/wl9LQinZ4QefPcjNeVeWlqY+gtHj7OwNO0A7WI2V4bLAhS+czBpxuC9rGDiTtHDxFu1Z8 g7FnC4VEYSN2MQuqNQ4pW+6ElqO+vQcDbtYvhOYTBW/fMEVO14QcOfHzx8NpxtQmik5LRSMm/H7 LhIKjO20bWl8H0Q2RO0ML47Km+X9EYOAQXCbpqgIk9sIzm5o6zAvpLE+mvX8g== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10-0.264000-4.000000 X-TMASE-Version: SMEX-14.0.0.1158-8.6.1018-26496.007 X-TM-SNTS-SMTP: CE455EC2A452F6F960A95D968DD852A0AD1E9EC93D3948B13E6E7ED3949EE4402000:9 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLIsWRmVeSWpSXmKPExsVyYIUtj27WzupEgx0rtSzWPkpzYPTYvKQ+ gDFK1yYpsaQsODM9T9/OpiSnWKE4taQkMy/dVsnXMVIJKJZUWZBYXKxbXJCYq2+XoJvx+N00 xoKFnBWrp61lb2B8wN7FyMkhIWAi8f/wLZYuRi4OIYG9jBIdD65BOSsYJTq/PQWrYhMwkPj6 Yz4TiC0ioCDR+XQ7M4jNLOAi0b/7ByOILSwQLrF51mewehYBVYlfa16A1fAKOEqsmPOQFWKb vMTMS9/BajgFnCTW7bvDAmILAdXsnd7IBlEvKHFy5hMWiPnyEs1bZ0PtkpA4+AJippCAusTO Nc0sEDMtJC7tbIP6Rl1iy63pbCAPSAj8YJI41fYDqIgDyFGQ+DzDGOaGjxdmMELYKhKzzv1m gYXE1m2foewwiS1HP7BOYJSYheSkWUhOmoXkpAWMzKsYBXMrMnP0klPLEnVTigv0kvNzNzEC 4+9wUCPnDsbPS+MPMTJxMB5ilOBgVhLhfTOlOlGINyWxsiq1KD++qDQntfgQYzIw3CYyS4km 5wPjP68k3tDU3NLcyMDCwtzU0IwIYQNzMxNzIGVsbqIkzntqE3+ikEB6YklqdmpqQWoRzBYm Dk6QK7ikRIpT81JSixJLSzLiQSkpvhiYlKQaGMtfzD7wJv7M70j20rTPLAVyflfkK+dwbdVl d3IyDto4KyDoTtyxtuMmWbK2RqdN93/fP8NKqNzjkfS3/ddFQt9P/POz3lHiQkyD/P/1mwpm TP/IfG3+o1kH2pkZvt1mnrGhsShnwoutizY+2Rpx9P+PO6EKWRZnVk+vu5DpaK7Y9n2Z66Fz y+8rsRRnJBpqMRcVJwIAGFdLcRADAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211029_020554_924992_857F0990 X-CRM114-Status: UNSURE ( 8.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: "(4401 440) Cedric Izoard (France)" <cedric.izoard@ceva-dsp.com> In case public Key was not included in the EC private key ASN1 sequence, the flag cleared was not the right one. Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com> --- src/crypto/crypto_openssl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[1/4] OpenSSL: clear the correct flag in crypto_ec_key_get_ecprivate_key
|
expand
|
diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index 96ce493e3..c198748de 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -2501,15 +2501,18 @@ struct wpabuf * crypto_ec_key_get_ecprivate_key(struct crypto_ec_key *key, unsigned char *der = NULL; int der_len; struct wpabuf *buf; + unsigned int key_flags; eckey = EVP_PKEY_get0_EC_KEY((EVP_PKEY *) key); if (!eckey) return NULL; + key_flags = EC_KEY_get_enc_flags(eckey); if (include_pub) - EC_KEY_clear_flags(eckey, EC_PKEY_NO_PUBKEY); + key_flags &= ~EC_PKEY_NO_PUBKEY; else - EC_KEY_set_enc_flags(eckey, EC_PKEY_NO_PUBKEY); + key_flags |= EC_PKEY_NO_PUBKEY; + EC_KEY_set_enc_flags(eckey, key_flags); EC_KEY_set_conv_form(eckey, POINT_CONVERSION_UNCOMPRESSED);