From: "flichtenheld (Code Review)" Date: Wed, 6 Aug 2025 14:29:42 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <8a39784461c6f01dda47bc573b89b0a41edd31e8-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="gDWQ63BS0mk="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: ssl: Fix -Wconversion warnings in pem_password_callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --gDWQ63BS0mk= 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/+/1137?usp=3Demail to review the following change. Change subject: ssl: Fix -Wconversion warnings in pem_password_callback ...................................................................... ssl: Fix -Wconversion warnings in pem_password_callback The OpenSSL API is how it is, so adapt with casts. Change-Id: I053ddbb71cc5b9ae16c5a49be833035d943d7eba Signed-off-by: Frank Lichtenheld --- M src/openvpn/ssl.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/37/1137/1 diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 17065aa..d586ba1 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -264,10 +264,10 @@ /* prompt for password even if --askpass wasn't specified */ pem_password_setup(NULL); ASSERT(!passbuf.protected); - strncpynt(buf, passbuf.password, size); + strncpynt(buf, passbuf.password, (size_t)size); purge_user_pass(&passbuf, false); - return strlen(buf); + return (int)strlen(buf); } return 0; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1137?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: I053ddbb71cc5b9ae16c5a49be833035d943d7eba Gerrit-Change-Number: 1137 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --gDWQ63BS0mk= 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: Fix -Wconversion warnings in pem_password_callback
<= br>The OpenSSL API is how it is, so adapt with casts.

Change-Id: I05= 3ddbb71cc5b9ae16c5a49be833035d943d7eba
Signed-off-by: Frank Lichtenheld = <frank@...2641...>
---
M src/openvpn/ssl.c
1 file changed, 2= insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:=
29418/openvpn refs/changes/37/1137/1
diff --git a/src/openvpn/ssl.c=
 b/src/openvpn/ssl.c
index 17065aa..d586ba1 100644--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -264,10 +264,10 @@
/* prompt for p= assword even if --askpass wasn't specified */
= pem_password_setup(NULL);
ASSERT(!passbuf.protecte= d);
- strncpynt(= buf, passbuf.password, size);
+ strncpynt(buf, passbuf.password, (size_t)size); purge_user_pass(&passbuf, false);

- return strlen(buf= );
+ return (i= nt)strlen(buf);
}
return 0;
}

To view, visit change 1137. T= o unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I053ddbb71cc5b9ae16c5a49be83= 3035d943d7eba
Gerrit-Change-Number: 1137
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
--gDWQ63BS0mk=--