Skip to content

Commit e256d66

Browse files
flichtenheldcron2
authored andcommitted
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 <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1137 Message-Id: <20250922204158.23319-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33154.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
1 parent 2bb658c commit e256d66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openvpn/ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ pem_password_callback(char *buf, int size, int rwflag, void *u)
264264
/* prompt for password even if --askpass wasn't specified */
265265
pem_password_setup(NULL);
266266
ASSERT(!passbuf.protected);
267-
strncpynt(buf, passbuf.password, size);
267+
strncpynt(buf, passbuf.password, (size_t)size);
268268
purge_user_pass(&passbuf, false);
269269

270-
return strlen(buf);
270+
return (int)strlen(buf);
271271
}
272272
return 0;
273273
}

0 commit comments

Comments
 (0)