From: "cron2 (Code Review)" Date: Wed, 27 Aug 2025 09:25:40 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="S83PHF560Ec="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: crypto: Make sure crypto flags are treated as unsigned List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --S83PHF560Ec= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#9) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1103?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos Change subject: crypto: Make sure crypto flags are treated as unsigned ...................................................................... crypto: Make sure crypto flags are treated as unsigned 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 Message-Id: <20250826184935.22110-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 688.html Signed-off-by: Gert Doering --- M src/openvpn/crypto.h 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/03/1103/9 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 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1103?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I89820c76e2e099f7acb817c71c8aeb83736ac556 Gerrit-Change-Number: 1103 Gerrit-PatchSet: 9 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --S83PHF560Ec= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #9 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by plaisthos

crypto: Make sure crypto flags are treated as un=
signed

crypto_options.flags is already unsigned, make sure the
fl= ags are as well to avoid spurious conversion warnings.

Change-Id: I8= 9820c76e2e099f7acb817c71c8aeb83736ac556
Signed-off-by: Frank Lichtenheld= <frank@...2641...>
Acked-by: Arne Schwabe <arne-openvpn@...2068...= 7...>
Message-Id: <20250826184935.22110-1-gert@...1296...>
U= RL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg326= 88.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M = src/openvpn/crypto.h
1 file changed, 9 insertions(+), 9 deletions(-)
=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/03/1103=
/9
diff --git a/src/openvpn/crypto.h b/src/openvpn/crypto.h<=
br>index cee4145..efd7f60 100644
--- a/src/openvpn/cr= ypto.h
+++ b/src/openvpn/crypto.h
@@ -342,3= 9 +342,39 @@
* keeping state between successive
* OpenVPN process startups. */

-#define CO_PACKET_ID_LONG_F= ORM (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_PAC= KET_ID (1u << 1)
/**< Bit-flag ind= icating whether to ignore
* the packet ID of a rece= ived packet.
* This flag is used during processing<= /span>
* 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 dis= play
* replay warnings. */
-#define CO_USE_TLS_KEY_MATERIAL_EXPORT (1 <= < 3)
+#define CO_U= SE_TLS_KEY_MATERIAL_EXPORT (1u << 3)
/**< Bit= -flag indicating that data channel key derivation
* i= s done using TLS keying material export [RFC5705]
*/<= /span>
-#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 (pac= ket-id 1)
* like with the HARD_RESET_CLIENT_V3 packet= */
-#define CO_FORCE_T= LSCRYPTV2_COOKIE (1 << 5)
+#define CO_FORCE_TLSCRYPTV2_COOKIE (1u << 5)
/**< Bit-flag indicating that we do not allow clients t= hat do
* not support resending the wrapped client key= (WKc) with the
* third packet of the three-way hands= hake */
-#define CO_USE= _CC_EXIT_NOTIFY (1 << 6)
+#define CO_USE_CC_EXIT_NOTIFY (1u << 6)<= /span>
/**< Bit-flag indicating that explicit exit notifie= s should be
* sent via the control channel instead of= using an OCC message
*/
-#define CO_USE_DYNAMIC_TLS_CRYPT (1 <<= 7)
+#define CO_USE_D= YNAMIC_TLS_CRYPT (1u << 7)
/**< Bit-fla= g indicating that renegotiations are using tls-crypt
= * with a TLS-EKM derived key.
*/
-#define CO_EPOCH_DATA_KEY_FORMAT (= 1 << 8)
+#defin= e CO_EPOCH_DATA_KEY_FORMAT (1u << 8)
/**&l= t; 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<= /span>
* 64-bit packet id that is split into a 16 bit epoch = and 48 bit

To view, visit change 1103. To u= nsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I89820c76e2e099f7acb817c71c8= aeb83736ac556
Gerrit-Change-Number: 1103
Gerrit-PatchSet: 9
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--S83PHF560Ec=--