From patchwork Tue Mar 7 23:57:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3108 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:2310:b0:9f:bfa4:120f with SMTP id r16csp99566dye; Tue, 7 Mar 2023 15:58:24 -0800 (PST) X-Google-Smtp-Source: AK7set+tuXX+RqARJTuaBr7bMZyYO/otlpIzqFcWWcqyDsBReukIKxivIz9K3RhY6jqC36JuAyG/ X-Received: by 2002:aa7:9571:0:b0:5d6:138f:5599 with SMTP id x17-20020aa79571000000b005d6138f5599mr14804213pfq.26.1678233503958; Tue, 07 Mar 2023 15:58:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678233503; cv=none; d=google.com; s=arc-20160816; b=BDP5blWv5pITJfbPD1XQN/AQM89UyN6fGaUDonDB6mFtq5FLVLsWrVHB0mLE2EIFfl zXKaA0DJhKq/c4FTgPuklgVS5ZKX2bBmajJp4dnmVELItRBiVjvGJq5I+icd2VV0PXBU VHlzK/XaDs4h4JN5BFO6BK/Xk3H+RgAwkiC2RmGZouiA4ZVENV9L+ZhXL3/ppzFtsuTR qWq9bUVm2XdENhqbFDUj2vwSHWotullDaG4hNmbzNoylqv0rKIFFc2MSL5BUPq9p5LLD DtbqffrNbJUfTET5Lj6yHHcYRL9KyMakBKStzzAzSp/b0YTrvzH/m14sAtP8BEABFd3t 0h2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature; bh=bhLtCA8GopGqsO632tHTJlghPGeLZW1pncZ3EIbfia4=; b=oWray2QFX00qBxfKwv5j64cl+BPDsWQsIT9IxPsi4BHhzC42ulCfHt41BfCTzzHWIq Rwem5bgyaCYTijSlNVX55SbO3ePee1rFBObqn9FU2CRardhWTAwQr0e5zJEm0Q7unoCC Y4UefJ/vVDL8GXXp6i+XcpmUABnEGWSbiV/hhY7/KpCQ6eaa5kGyGVwdHc+KxYAi7gND 7frZe45iH0GIsfL0R2xXesP/RK1Vfq2UvJXv9rnLRxBZb1A2iKiSgAfSjzyE972BWQvW DbCL6DpPfKcPljr4KSIGo0fiLeoCGSxbeppg6hvB9zASEXCX7P5drUDbJ62ZeTMtA1W6 O5xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=c1qRgQtb; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=cRsjUGBH; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id h128-20020a625386000000b005925d784cc8si13081342pfb.343.2023.03.07.15.58.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2023 15:58:23 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=c1qRgQtb; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=cRsjUGBH; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pZhBo-0007Du-NC; Tue, 07 Mar 2023 23:57:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pZhBm-0007Do-GS for openvpn-devel@lists.sourceforge.net; Tue, 07 Mar 2023 23:57:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: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=/v+IR6u0/guFkcv8y5McrszlKF62cXAJKA8KaeTgB+M=; b=c1qRgQtbcnl7glXjIOMezVNv3g fraDVDqsCTuzZG+yiZYTCF5JC76rZt8ROkcRTgogld8D80QjsvHkXs2ikSX/MN2RnwBoorFc68enA qwJh1w5HxrEAl2/ef7k2Z90s+830UlcmW0/e0+bEAxkgAYuzngLwZNcN2bXuI2hVXTUA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type: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=/v+IR6u0/guFkcv8y5McrszlKF62cXAJKA8KaeTgB+M=; b=c RsjUGBHY5Np4IWnBmsquuhCA7sFX0ly8EiNlF9OIA6pDR2KJiZapUQ0W+9vunWQSPvveDWBiZZjv7 F6uABHg0YqyKgVPDhJsYfmF3jiruRXwHKURrKJ2n/npWnhM0rPPbgwEy/hu1TV7CL9R1LAXyrnvap 3BNkGN6V+r/7EKow=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pZhBm-0004Zt-JV for openvpn-devel@lists.sourceforge.net; Tue, 07 Mar 2023 23:57:51 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pZhBZ-000Fml-O9 for openvpn-devel@lists.sourceforge.net; Wed, 08 Mar 2023 00:57:37 +0100 Received: (nullmailer pid 3595178 invoked by uid 10006); Tue, 07 Mar 2023 23:57:37 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Mar 2023 00:57:37 +0100 Message-Id: <20230307235737.3595130-1-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: This avoids the warning from gcc about initialising the key2 struct Change-Id: Ia73d24923b1efd99263f33ce13d90e04b59bd980 Signed-off-by: Arne Schwabe --- src/openvpn/tls_crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pZhBm-0004Zt-JV Subject: [Openvpn-devel] [PATCH] Avoid warning about missing braces when initialising key struct X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1759755374428321269?= X-GMAIL-MSGID: =?utf-8?q?1759755374428321269?= This avoids the warning from gcc about initialising the key2 struct Change-Id: Ia73d24923b1efd99263f33ce13d90e04b59bd980 Signed-off-by: Arne Schwabe --- src/openvpn/tls_crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/tls_crypt.c b/src/openvpn/tls_crypt.c index 81098355e..e84d979e9 100644 --- a/src/openvpn/tls_crypt.c +++ b/src/openvpn/tls_crypt.c @@ -348,7 +348,8 @@ tls_crypt_v2_init_client_key(struct key_ctx_bi *key, struct key2 *original_key, msg(M_FATAL, "ERROR: invalid tls-crypt-v2 client key format"); } - struct key2 key2 = { .n = 2, .keys = { 0 } }; + struct key2 key2 = { .n = 2, .keys = {{{ 0 }}} }; + if (!buf_read(&client_key, &key2.keys, sizeof(key2.keys))) { msg(M_FATAL, "ERROR: not enough data in tls-crypt-v2 client key");