From: "flichtenheld (Code Review)" Date: Thu, 24 Jul 2025 12:31:41 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <423a6b1f6c4ac0a936ef04c0fc15490da1747ec2-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="ipw0tndTRW4="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: ssl_common: Make sure ssl flags are treated as unsigned List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --ipw0tndTRW4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1104?usp=3Demail to review the following change. Change subject: ssl_common: Make sure ssl flags are treated as unsigned ...................................................................... ssl_common: Make sure ssl flags are treated as unsigned tls_options.ssl_flags is already unsigned, make sure the flags are as well to avoid spurious conversion warnings. Change-Id: I03e5ece7580ca4ebd41a7928ead544df46e8bad1 Signed-off-by: Frank Lichtenheld --- M src/openvpn/ssl_common.h 1 file changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/04/1104/1 diff --git a/src/openvpn/ssl_common.h b/src/openvpn/ssl_common.h index e9e50da..750891c 100644 --- a/src/openvpn/ssl_common.h +++ b/src/openvpn/ssl_common.h @@ -415,17 +415,17 @@ #endif /* configuration file SSL-related boolean and low-permutation options = */ -#define SSLF_CLIENT_CERT_NOT_REQUIRED (1<<0) -#define SSLF_CLIENT_CERT_OPTIONAL (1<<1) -#define SSLF_USERNAME_AS_COMMON_NAME (1<<2) -#define SSLF_AUTH_USER_PASS_OPTIONAL (1<<3) -#define SSLF_OPT_VERIFY (1<<4) -#define SSLF_CRL_VERIFY_DIR (1<<5) +#define SSLF_CLIENT_CERT_NOT_REQUIRED (1u<<0) +#define SSLF_CLIENT_CERT_OPTIONAL (1u<<1) +#define SSLF_USERNAME_AS_COMMON_NAME (1u<<2) +#define SSLF_AUTH_USER_PASS_OPTIONAL (1u<<3) +#define SSLF_OPT_VERIFY (1u<<4) +#define SSLF_CRL_VERIFY_DIR (1u<<5) #define SSLF_TLS_VERSION_MIN_SHIFT 6 -#define SSLF_TLS_VERSION_MIN_MASK 0xF /* (uses bit positions 6 to 9) = */ +#define SSLF_TLS_VERSION_MIN_MASK 0xFu /* (uses bit positions 6 to 9)= */ #define SSLF_TLS_VERSION_MAX_SHIFT 10 -#define SSLF_TLS_VERSION_MAX_MASK 0xF /* (uses bit positions 10 to 13= ) */ -#define SSLF_TLS_DEBUG_ENABLED (1<<14) +#define SSLF_TLS_VERSION_MAX_MASK 0xFu /* (uses bit positions 10 to 1= 3) */ +#define SSLF_TLS_DEBUG_ENABLED (1u<<14) unsigned int ssl_flags; #ifdef ENABLE_MANAGEMENT -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1104?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: I03e5ece7580ca4ebd41a7928ead544df46e8bad1 Gerrit-Change-Number: 1104 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --ipw0tndTRW4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

ssl_common: Make sure ssl flags are treated as unsigned
<= br>tls_options.ssl_flags is already unsigned, make sure the
flags are as= well to avoid spurious conversion warnings.

Change-Id: I03e5ece7580= ca4ebd41a7928ead544df46e8bad1
Signed-off-by: Frank Lichtenheld <frank= @...2641...>
---
M src/openvpn/ssl_common.h
1 file changed, 9 i= nsertions(+), 9 deletions(-)

git pull ssh://gerrit.openvpn.net:29=
418/openvpn refs/changes/04/1104/1
diff --git a/src/openvpn/ssl_com=
mon.h b/src/openvpn/ssl_common.h
index e9e50da..750891c 100= 644
--- a/src/openvpn/ssl_common.h
+++ b/sr= c/openvpn/ssl_common.h
@@ -415,17 +415,17 @@
#endif

/* configuration file SSL-= related boolean and low-permutation options */
-#define SSLF_CLIENT_CERT_NOT_REQUIRED (1<<0)=
-#define SSLF_CLIENT_C= ERT_OPTIONAL (1<<1)
-#define SSLF_USERNAME_AS_COMMON_NAME (1<<2)
-#define SSLF_AUTH_USER_PASS_OPTIONAL = (1<<3)
-#define S= SLF_OPT_VERIFY (1<<4)
-#define SSLF_CRL_VERIFY_DIR (1<<5)

+#define SSLF_CLIENT_CERT= _NOT_REQUIRED (1u<<0)
+#define SSLF_CLIENT_CERT_OPTIONAL (1u<<1)
+#define SSLF_USERNAME_AS_COMMON_NAM= E (1u<<2)
+#de= fine SSLF_AUTH_USER_PASS_OPTIONAL (1u<<3)
+#define SSLF_OPT_VERIFY (1u<&= lt;4)
+#define SSLF_C= RL_VERIFY_DIR (1u<<5)
#define SSLF_TLS_VER= SION_MIN_SHIFT 6
-#d= efine SSLF_TLS_VERSION_MIN_MASK 0xF /* (uses bit positions 6 to 9) */<= /span>
+#define SSLF_TLS_VER= SION_MIN_MASK 0xFu /* (uses bit positions 6 to 9) */
= #define SSLF_TLS_VERSION_MAX_SHIFT 10
-#define SSLF_TLS_VERSION_MAX_MASK 0xF /* (uses bit = positions 10 to 13) */
= -#define SSLF_TLS_DEBUG_ENABLED (1<<14)
+#define SSLF_TLS_VERSION_MAX_MASK 0xF= u /* (uses bit positions 10 to 13) */
+#define SSLF_TLS_DEBUG_ENABLED (1u<<14)
unsigned int ssl_flags;

#ifdef ENABLE_MANAGEMENT


To view, vis= it chang= e 1104. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I03e5ece7580ca4ebd41a7928ead= 544df46e8bad1
Gerrit-Change-Number: 1104
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--ipw0tndTRW4=--