From patchwork Tue Aug 26 18:49:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4377 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:904b:b0:671:5a2c:6455 with SMTP id j11csp655732mac; Tue, 26 Aug 2025 11:49:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVmge+6n33snxoC+GouED7YbqYKZzOZFV9Tss9ZKags/6IYSEvRacZEBJ18eDmiwL444YzR+CAaNHo=@openvpn.net X-Google-Smtp-Source: AGHT+IH7/pSwDKOK2k1SuvpLjuaMnEWuyM9DLieMr5ZJiPmoUYRTABHmKo5iKxknlRpti0Xup7h9 X-Received: by 2002:a05:6830:6086:b0:741:a9d1:3135 with SMTP id 46e09a7af769-74500974ed5mr9396245a34.12.1756234192734; Tue, 26 Aug 2025 11:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1756234192; cv=none; d=google.com; s=arc-20240605; b=HrENMRzFDDv1txcp2xP4Dn1lq282T1idVMfA0n6XuBZW8lMT9p2CyBTwoX0GB4i4lB /WPWiuiMcTeqJksl4nHhq8a9Fj80kuHWJoWnJse6l/5QWlGF36dHLo1P5zOE0hRFd58n sUMyka+tfQN1KTmLdlGPvzeMhYGFdqpDGx535vLR1nGHtdBBST76qlpyXqFPdTTPeZng SGonXk5eNddWKsRWoXQG86NGgYMyu6PWeHhWi24ZeB5hjERND/d6XStixqcjp+lL2Wpv RKZ4JMIMaBN2xzN6IxhJUTS1XJOgEmvohD9Acthmheh3TAZfc1lRSX+IZx8/Kkjjx8YA /ILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=qmpxDhyBhX9BI6Ut72yFrH9vpZ7/VKuGJLC3kX9AZbQ=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=JRRmgoBIPW3s1+IztPVpi4Nq3qI+R8NzsN6sua8go1yrXrCpCR3pPGLk26bEwVUzgV X3j4duO9sUbtTxyayqGU8ybJamw08b96ARHHvmReqS3v37s9MQC/H+vDPLf1mekLlMpy SwyTC8RkGQJxIqpFdrL2mv699S+2zRXW3bgYQSv5HwuYEAQ4TN/lDxqWXgKq8IoL1Uzf Mzah1uxm2g0sRjAEfQkVvcfwQfWfR/SeUNir0QurtpFrRX2oF6MLxixzhu713ZFv0xU0 lZa0Hjzh0Lnn0YnyjCe3lzE22vZWhVPWpbk13EovBGt/IKJrKG885k5e/rdgL3K6o280 zxVA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=mwQ6rB6z; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ZPlPTGEY; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="lF/B8TRk"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 006d021491bc7-61dc79250a2si1879387eaf.143.2025.08.26.11.49.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2025 11:49:52 -0700 (PDT) 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=pass header.i=@lists.sourceforge.net header.s=beta header.b=mwQ6rB6z; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ZPlPTGEY; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="lF/B8TRk"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qmpxDhyBhX9BI6Ut72yFrH9vpZ7/VKuGJLC3kX9AZbQ=; b=mwQ6rB6zkPqyZssP+0V94Vm+dI I/5Cvu+qn2rjazn7LtoWRKjmcPZaOBq4bvtSBqiujGMmADlPKJQXol4LGdLSJIozXpg0T4MZgjiLD 8AscMgyBY98Wnas/Z3Wq7Wsjl4rqSY3XBBoc3TvbBncgwdKl+21nAnS1KdHXHlLdOpz0=; 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 1uqyjt-0000M7-Ta; Tue, 26 Aug 2025 18:49:49 +0000 Received: from [172.30.29.66] (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 1uqyjs-0000M1-HX for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:49:48 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/mn9Sz2qvwnN0f92c2K/2/rmZyars3fYMlyK26Zd5Ow=; b=ZPlPTGEYx6ntNu7Gygd+0Y8b+1 jv+vUcCvGP+BYsmjgyIxoCGz6Dt+C/ifjre5Xgd3LyK2c2nN9tzbQR0Sl5BH2K/hY4WyBsY99Ur6L QnVnB8UxNeudGeVk+jw8dZqnMXEWhxjO0r+GZSi/06vIlIcu1MZQSRA9pVGkszssyq4M=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/mn9Sz2qvwnN0f92c2K/2/rmZyars3fYMlyK26Zd5Ow=; b=lF/B8TRkZuhPuzwLDPLriJRga3 dugWBKaf5xE1xcTaEauuTOECi0BdPG0UN1bhj47oD8x76dDdj3+QmKTNPg66BJeOgMiLRkXi6jxNC N+WrIV9UFwNsUpMjwJWkGNl6FE8VfNObnHQr4Vyr0UTTWTQOBhhPHjqSDUHD9TbXOSqU=; Received: from [193.149.48.143] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uqyjr-0007Tc-Oq for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:49:48 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 57QInaAF022128 for ; Tue, 26 Aug 2025 20:49:36 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 57QInaB2022127 for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 20:49:36 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 26 Aug 2025 20:49:29 +0200 Message-ID: <20250826184935.22110-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: Frank Lichtenheld crypto_options.flags is already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I89820c76e2e099f7acb817c71c8aeb83736ac556 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uqyjr-0007Tc-Oq Subject: [Openvpn-devel] [PATCH v8] crypto: Make sure crypto flags are treated as unsigned 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?1841545024571492511?= X-GMAIL-MSGID: =?utf-8?q?1841545024571492511?= From: Frank Lichtenheld crypto_options.flags is already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I89820c76e2e099f7acb817c71c8aeb83736ac556 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1103 This mail reflects revision 8 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/crypto.h b/src/openvpn/crypto.h index cee4145..efd7f60 100644 --- a/src/openvpn/crypto.h +++ b/src/openvpn/crypto.h @@ -342,39 +342,39 @@ * keeping state between successive * OpenVPN process startups. */ -#define CO_PACKET_ID_LONG_FORM (1 << 0) +#define CO_PACKET_ID_LONG_FORM (1u << 0) /**< Bit-flag indicating whether to use * OpenVPN's long packet ID format. */ -#define CO_IGNORE_PACKET_ID (1 << 1) +#define CO_IGNORE_PACKET_ID (1u << 1) /**< Bit-flag indicating whether to ignore * the packet ID of a received packet. * This flag is used during processing * of the first packet received from a * client. */ -#define CO_MUTE_REPLAY_WARNINGS (1 << 2) +#define CO_MUTE_REPLAY_WARNINGS (1u << 2) /**< Bit-flag indicating not to display * replay warnings. */ -#define CO_USE_TLS_KEY_MATERIAL_EXPORT (1 << 3) +#define CO_USE_TLS_KEY_MATERIAL_EXPORT (1u << 3) /**< Bit-flag indicating that data channel key derivation * is done using TLS keying material export [RFC5705] */ -#define CO_RESEND_WKC (1 << 4) +#define CO_RESEND_WKC (1u << 4) /**< Bit-flag indicating that the client is expected to * resend the wrapped client key with the 2nd packet (packet-id 1) * like with the HARD_RESET_CLIENT_V3 packet */ -#define CO_FORCE_TLSCRYPTV2_COOKIE (1 << 5) +#define CO_FORCE_TLSCRYPTV2_COOKIE (1u << 5) /**< Bit-flag indicating that we do not allow clients that do * not support resending the wrapped client key (WKc) with the * third packet of the three-way handshake */ -#define CO_USE_CC_EXIT_NOTIFY (1 << 6) +#define CO_USE_CC_EXIT_NOTIFY (1u << 6) /**< Bit-flag indicating that explicit exit notifies should be * sent via the control channel instead of using an OCC message */ -#define CO_USE_DYNAMIC_TLS_CRYPT (1 << 7) +#define CO_USE_DYNAMIC_TLS_CRYPT (1u << 7) /**< Bit-flag indicating that renegotiations are using tls-crypt * with a TLS-EKM derived key. */ -#define CO_EPOCH_DATA_KEY_FORMAT (1 << 8) +#define CO_EPOCH_DATA_KEY_FORMAT (1u << 8) /**< Bit-flag indicating the epoch the data format. This format * has the AEAD tag at the end of the packet and is using a longer * 64-bit packet id that is split into a 16 bit epoch and 48 bit