Skip to contentSkip to conversation

Repair --secret depreciation warning.

PATCH In review Gert Doering 2 participants 3 messages Apr 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Repair --secret depreciation warning.

commit 60f5889ae formally depreciated use of configs without either "tls-client" or "tls-server" - but got the booleans wrong.

Fix.

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 3dd22d52..ef854c76 100644
@@ -2541,7 +2541,7 @@ options_postprocess_verify_ce(const struct options *options,
         msg(M_USAGE, "specify only one of --tls-server, --tls-client, or --secret");
     }
 
-    if (!options->tls_server || !options->tls_client)
+    if (!options->tls_server && !options->tls_client)
     {
         msg(M_INFO, "DEPRECATION: No tls-client or tls-server option in "
                     "configuration detected. OpenVPN 2.7 will remove the "
Signature · 1 line
2.26.3
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 1 line · Gert Doering

commit 60f5889ae formally depreciated use of configs without either

depreciated -> deprecated (no?)

Quoted 5 lines

"tls-client" or "tls-server" - but got the booleans wrong.

Fix.

Makes sense.
The warning should be displayed when both options are not specified.

With the current logic the warning pops up all the time, except when both options are specified (not sure this is even allowed..). And clearly not what we wanted :-)

Quoted 18 lines
---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 3dd22d52..ef854c76 100644
@@ -2541,7 +2541,7 @@ options_postprocess_verify_ce(const struct options *options,
         msg(M_USAGE, "specify only one of --tls-server, --tls-client, or --secret");
     }
 
-    if (!options->tls_server || !options->tls_client)
+    if (!options->tls_server && !options->tls_client)
     {
         msg(M_INFO, "DEPRECATION: No tls-client or tls-server option in "
                     "configuration detected. OpenVPN 2.7 will remove the "
Signature · 1 line
Antonio Quartulli
#2 lore raw

[Openvpn-devel] [PATCH applied] Re: Repair --secret deprecation warning.

In reply to Gert Doering

Patch has been applied to the master branch.

Wording fixed as requested ("depreciation" is a valid term, but refers to "financial value diminishes over time")

Tested, of course - now only the p2p test warns (as opposed to "all warn"), and that's to be expected :-)

commit 85080921096fe60c6956b1e0a13fe6f9a3f93ab6 (master)

Author: Gert Doering
Date:   Sat Apr 17 12:05:44 2021 +0200
     Repair --secret deprecation warning.

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg22139.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering