[Openvpn-devel,v2] Backport extra_certs_file bugfix + MS bool workaround to 2.6

Message ID 20261204142711.10920-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v2] Backport extra_certs_file bugfix + MS bool workaround to 2.6 |

Commit Message

Gert Doering Dec. 4, 2026, 2:27 p.m. UTC
  2.6 currently does not build in GHA anymore because (newly added)
microsoft warnings break -Werror builds.

Backport commit a1cd0cf8a97b (which is a real bugfix for
check_file_access_inline(options->extra_certs_file_inline...)
and commit d8e22c519190 (which is correct code that triggers new
boolean related warnings).

Both fixes originally written by Razvan Cojocaru.

Change-Id: I565d5c69e4082c8fb678597313708349a0abb7f6
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2396
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to release/2.6.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2396
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>
  

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 56041bb..18efe41 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -4087,7 +4087,7 @@ 
     errs |= check_file_access_inline(options->cert_file_inline, CHKACC_FILE,
                                      options->cert_file, R_OK, "--cert");
 
-    errs |= check_file_access_inline(options->extra_certs_file, CHKACC_FILE,
+    errs |= check_file_access_inline(options->extra_certs_file_inline, CHKACC_FILE,
                                      options->extra_certs_file, R_OK,
                                      "--extra-certs");
 
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 2f48af4..5402463 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -2455,7 +2455,7 @@ 
     free(multi->remote_ciphername);
     multi->remote_ciphername =
         options_string_extract_option(options, "cipher", NULL);
-    multi->remote_usescomp = strstr(options, ",comp-lzo,");
+    multi->remote_usescomp = (strstr(options, ",comp-lzo,") != NULL);
 
     /* In OCC we send '[null-cipher]' instead 'none' */
     if (multi->remote_ciphername