All of lore.kernel.org
 help / color / mirror / Atom feed
* [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
@ 2026-02-25 23:14 ` selvanair (Code Review)
  2026-02-25 23:40 ` selvanair (Code Review)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: selvanair (Code Review) @ 2026-02-25 23:14 UTC (permalink / raw)
  To: plaisthos <arne-openvpn@; +Cc: openvpn-devel

[-- Attachment #1: Type: text/plain, Size: 3988 bytes --]

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/+/1552?usp=email

to review the following change.


Change subject: Document management client versions
......................................................................

Document management client versions

Also add an enum to keep track of client version updates.

Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Signed-off-by: Selva Nair <selva.nair@...277...>
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 files changed, 19 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/52/1552/1

diff --git a/doc/management-notes.txt b/doc/management-notes.txt
index 86b74f3..41e2a91 100644
--- a/doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -496,6 +496,10 @@
 version. This was fixed starting version 4: clients should expect
 "SUCCESS: .. " message only when setting the version to >= 4.

+Minimum client version required for certain features is listed below:
+    >PK_SIGN:[base64]           -- version 2 or greater
+    >PK_SIGN:[base64],[alg]     -- version 3 or greater
+
 COMMAND -- auth-retry
 ---------------------

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 03ff5b3..b1fb577 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -61,6 +61,16 @@
 /* tag for blank username/password */
 static const char blank_up[] = "[[BLANK]]";

+/*
+ * Management client versions indicating feature support in client.
+ * Append new values as needed but do not change exisiting ones.
+ */
+static enum mcv {
+    MCV_DEFAULT = 1,
+    MCV_PKSIGN = 2,
+    MCV_PKSIGN_ALG = 3,
+};
+
 struct management *management; /* GLOBAL */

 /* static forward declarations */
@@ -1333,8 +1343,8 @@
     if (version)
     {
         man->connection.client_version = atoi(version);
-        /* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */
-        if (man->connection.client_version >= 4)
+        /* Until MCV_PKSIGN_ALG, we missed to respond to this command. Acknowledge only if version is newer */
+        if (man->connection.client_version > MCV_PKSIGN_ALG)
         {
             msg(M_CLIENT, "SUCCESS: Management client version set to %d", man->connection.client_version);
         }
@@ -2656,7 +2666,7 @@
             man->connection.es = event_set_init(&maxevents, EVENT_METHOD_FAST);
         }

-        man->connection.client_version = 1; /* default version */
+        man->connection.client_version = MCV_DEFAULT; /* default version */

         /*
          * Listen/connect socket
@@ -3776,14 +3786,14 @@
     const char *desc = "pk-sign";
     struct buffer buf_data = alloc_buf(strlen(b64_data) + strlen(algorithm) + 20);

-    if (man->connection.client_version <= 1)
+    if (man->connection.client_version <= MCV_DEFAULT)
     {
         prompt = "RSA_SIGN";
         desc = "rsa-sign";
     }

     buf_write(&buf_data, b64_data, (int)strlen(b64_data));
-    if (man->connection.client_version > 2)
+    if (man->connection.client_version >= MCV_PKSIGN_ALG)
     {
         buf_write(&buf_data, ",", (int)strlen(","));
         buf_write(&buf_data, algorithm, (int)strlen(algorithm));

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Gerrit-Change-Number: 1552
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <selva.nair@...277...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...1227...>

[-- Attachment #2: Type: text/html, Size: 7054 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
  2026-02-25 23:14 ` [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions selvanair (Code Review)
@ 2026-02-25 23:40 ` selvanair (Code Review)
  2026-03-02 13:32 ` plaisthos (Code Review)
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: selvanair (Code Review) @ 2026-02-25 23:40 UTC (permalink / raw)
  To: plaisthos <arne-openvpn@; +Cc: openvpn-devel

[-- Attachment #1: Type: text/plain, Size: 3987 bytes --]

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email

to look at the new patch set (#2).


Change subject: Document management client versions
......................................................................

Document management client versions

Also add an enum to keep track of client version updates.

Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Signed-off-by: Selva Nair <selva.nair@...277...>
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 files changed, 20 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/52/1552/2

diff --git a/doc/management-notes.txt b/doc/management-notes.txt
index 86b74f3..41e2a91 100644
--- a/doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -496,6 +496,10 @@
 version. This was fixed starting version 4: clients should expect
 "SUCCESS: .. " message only when setting the version to >= 4.

+Minimum client version required for certain features is listed below:
+    >PK_SIGN:[base64]           -- version 2 or greater
+    >PK_SIGN:[base64],[alg]     -- version 3 or greater
+
 COMMAND -- auth-retry
 ---------------------

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 03ff5b3..d26c9b2 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -61,6 +61,17 @@
 /* tag for blank username/password */
 static const char blank_up[] = "[[BLANK]]";

+/*
+ * Management client versions indicating feature support in client.
+ * Append new values as needed but do not change exisiting ones.
+ */
+enum mcv
+{
+    MCV_DEFAULT = 1,
+    MCV_PKSIGN = 2,
+    MCV_PKSIGN_ALG = 3,
+};
+
 struct management *management; /* GLOBAL */

 /* static forward declarations */
@@ -1333,8 +1344,8 @@
     if (version)
     {
         man->connection.client_version = atoi(version);
-        /* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */
-        if (man->connection.client_version >= 4)
+        /* Until MCV_PKSIGN_ALG, we missed to respond to this command. Acknowledge only if version is newer */
+        if (man->connection.client_version > MCV_PKSIGN_ALG)
         {
             msg(M_CLIENT, "SUCCESS: Management client version set to %d", man->connection.client_version);
         }
@@ -2656,7 +2667,7 @@
             man->connection.es = event_set_init(&maxevents, EVENT_METHOD_FAST);
         }

-        man->connection.client_version = 1; /* default version */
+        man->connection.client_version = MCV_DEFAULT; /* default version */

         /*
          * Listen/connect socket
@@ -3776,14 +3787,14 @@
     const char *desc = "pk-sign";
     struct buffer buf_data = alloc_buf(strlen(b64_data) + strlen(algorithm) + 20);

-    if (man->connection.client_version <= 1)
+    if (man->connection.client_version <= MCV_DEFAULT)
     {
         prompt = "RSA_SIGN";
         desc = "rsa-sign";
     }

     buf_write(&buf_data, b64_data, (int)strlen(b64_data));
-    if (man->connection.client_version > 2)
+    if (man->connection.client_version >= MCV_PKSIGN_ALG)
     {
         buf_write(&buf_data, ",", (int)strlen(","));
         buf_write(&buf_data, algorithm, (int)strlen(algorithm));

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Gerrit-Change-Number: 1552
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <selva.nair@...277...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...1227...>

[-- Attachment #2: Type: text/html, Size: 7094 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
  2026-02-25 23:14 ` [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions selvanair (Code Review)
  2026-02-25 23:40 ` selvanair (Code Review)
@ 2026-03-02 13:32 ` plaisthos (Code Review)
  2026-03-02 14:18 ` [Openvpn-devel] [PATCH v2] " Gert Doering
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: plaisthos (Code Review) @ 2026-03-02 13:32 UTC (permalink / raw)
  To: selvanair <selva.nair@; +Cc: openvpn-devel

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

Attention is currently required from: selvanair.

plaisthos has posted comments on this change by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email )

Change subject: Document management client versions
......................................................................


Patch Set 2: Code-Review+2


--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Gerrit-Change-Number: 1552
Gerrit-PatchSet: 2
Gerrit-Owner: selvanair <selva.nair@...277...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Gerrit-Attention: selvanair <selva.nair@...277...>
Gerrit-Comment-Date: Mon, 02 Mar 2026 13:32:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

[-- Attachment #2: Type: text/html, Size: 1909 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [PATCH v2] Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
                   ` (2 preceding siblings ...)
  2026-03-02 13:32 ` plaisthos (Code Review)
@ 2026-03-02 14:18 ` Gert Doering
  2026-03-02 21:55   ` [Openvpn-devel] [PATCH applied] " Gert Doering
  2026-03-02 21:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
  2026-03-02 21:55 ` cron2 (Code Review)
  5 siblings, 1 reply; 7+ messages in thread
From: Gert Doering @ 2026-03-02 14:18 UTC (permalink / raw)
  To: openvpn-devel

From: Selva Nair <selva.nair@...277...>

Also add an enum to keep track of client version updates.

Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Signed-off-by: Selva Nair <selva.nair@...277...>
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1552
---

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

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

Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@...1227...>

        
diff --git a/doc/management-notes.txt b/doc/management-notes.txt
index 86b74f3..41e2a91 100644
--- a/doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -496,6 +496,10 @@
 version. This was fixed starting version 4: clients should expect
 "SUCCESS: .. " message only when setting the version to >= 4.
 
+Minimum client version required for certain features is listed below:
+    >PK_SIGN:[base64]           -- version 2 or greater
+    >PK_SIGN:[base64],[alg]     -- version 3 or greater
+
 COMMAND -- auth-retry
 ---------------------
 
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 03ff5b3..d26c9b2 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -61,6 +61,17 @@
 /* tag for blank username/password */
 static const char blank_up[] = "[[BLANK]]";
 
+/*
+ * Management client versions indicating feature support in client.
+ * Append new values as needed but do not change exisiting ones.
+ */
+enum mcv
+{
+    MCV_DEFAULT = 1,
+    MCV_PKSIGN = 2,
+    MCV_PKSIGN_ALG = 3,
+};
+
 struct management *management; /* GLOBAL */
 
 /* static forward declarations */
@@ -1333,8 +1344,8 @@
     if (version)
     {
         man->connection.client_version = atoi(version);
-        /* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */
-        if (man->connection.client_version >= 4)
+        /* Until MCV_PKSIGN_ALG, we missed to respond to this command. Acknowledge only if version is newer */
+        if (man->connection.client_version > MCV_PKSIGN_ALG)
         {
             msg(M_CLIENT, "SUCCESS: Management client version set to %d", man->connection.client_version);
         }
@@ -2656,7 +2667,7 @@
             man->connection.es = event_set_init(&maxevents, EVENT_METHOD_FAST);
         }
 
-        man->connection.client_version = 1; /* default version */
+        man->connection.client_version = MCV_DEFAULT; /* default version */
 
         /*
          * Listen/connect socket
@@ -3776,14 +3787,14 @@
     const char *desc = "pk-sign";
     struct buffer buf_data = alloc_buf(strlen(b64_data) + strlen(algorithm) + 20);
 
-    if (man->connection.client_version <= 1)
+    if (man->connection.client_version <= MCV_DEFAULT)
     {
         prompt = "RSA_SIGN";
         desc = "rsa-sign";
     }
 
     buf_write(&buf_data, b64_data, (int)strlen(b64_data));
-    if (man->connection.client_version > 2)
+    if (man->connection.client_version >= MCV_PKSIGN_ALG)
     {
         buf_write(&buf_data, ",", (int)strlen(","));
         buf_write(&buf_data, algorithm, (int)strlen(algorithm));


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [PATCH applied] Re: Document management client versions
  2026-03-02 14:18 ` [Openvpn-devel] [PATCH v2] " Gert Doering
@ 2026-03-02 21:55   ` Gert Doering
  0 siblings, 0 replies; 7+ messages in thread
From: Gert Doering @ 2026-03-02 21:55 UTC (permalink / raw)
  To: Selva Nair <selva.nair@; +Cc: openvpn-devel

Documentation is good, less magic numbers is good, in it goes ;-)

It looks good to me, has an ACK from Arne.  Did not specifically test
mgmt client versions - Arne and Selva do know that field much better.

Your patch has been applied to the master and release/2.7 branch.

commit d5814ecd2323ec7c2e6dad2cbf3884c031d9a5a3 (master)
commit cb154f0363376deda076c3b0ec6cf3c640fd1e86 (release/2.7)
Author: Selva Nair
Date:   Mon Mar 2 15:18:02 2026 +0100

     Document management client versions

     Signed-off-by: Selva Nair <selva.nair@...277...>
     Acked-by: Arne Schwabe <arne-openvpn@...1227...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1552
     Message-Id: <20260302141811.5697-1-gert@...1296...>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35805.html
     Signed-off-by: Gert Doering <gert@...1296...>


--
kind regards,

Gert Doering



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
                   ` (3 preceding siblings ...)
  2026-03-02 14:18 ` [Openvpn-devel] [PATCH v2] " Gert Doering
@ 2026-03-02 21:55 ` cron2 (Code Review)
  2026-03-02 21:55 ` cron2 (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: cron2 (Code Review) @ 2026-03-02 21:55 UTC (permalink / raw)
  To: selvanair <selva.nair@; +Cc: openvpn-devel

[-- Attachment #1: Type: text/plain, Size: 4235 bytes --]

cron2 has uploaded a new patch set (#3) to the change originally created by selvanair. ( http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos


Change subject: Document management client versions
......................................................................

Document management client versions

Also add an enum to keep track of client version updates.

Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Signed-off-by: Selva Nair <selva.nair@...277...>
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1552
Message-Id: <20260302141811.5697-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35805.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 files changed, 20 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/52/1552/3

diff --git a/doc/management-notes.txt b/doc/management-notes.txt
index 86b74f3..41e2a91 100644
--- a/doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -496,6 +496,10 @@
 version. This was fixed starting version 4: clients should expect
 "SUCCESS: .. " message only when setting the version to >= 4.

+Minimum client version required for certain features is listed below:
+    >PK_SIGN:[base64]           -- version 2 or greater
+    >PK_SIGN:[base64],[alg]     -- version 3 or greater
+
 COMMAND -- auth-retry
 ---------------------

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 03ff5b3..d26c9b2 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -61,6 +61,17 @@
 /* tag for blank username/password */
 static const char blank_up[] = "[[BLANK]]";

+/*
+ * Management client versions indicating feature support in client.
+ * Append new values as needed but do not change exisiting ones.
+ */
+enum mcv
+{
+    MCV_DEFAULT = 1,
+    MCV_PKSIGN = 2,
+    MCV_PKSIGN_ALG = 3,
+};
+
 struct management *management; /* GLOBAL */

 /* static forward declarations */
@@ -1333,8 +1344,8 @@
     if (version)
     {
         man->connection.client_version = atoi(version);
-        /* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */
-        if (man->connection.client_version >= 4)
+        /* Until MCV_PKSIGN_ALG, we missed to respond to this command. Acknowledge only if version is newer */
+        if (man->connection.client_version > MCV_PKSIGN_ALG)
         {
             msg(M_CLIENT, "SUCCESS: Management client version set to %d", man->connection.client_version);
         }
@@ -2656,7 +2667,7 @@
             man->connection.es = event_set_init(&maxevents, EVENT_METHOD_FAST);
         }

-        man->connection.client_version = 1; /* default version */
+        man->connection.client_version = MCV_DEFAULT; /* default version */

         /*
          * Listen/connect socket
@@ -3776,14 +3787,14 @@
     const char *desc = "pk-sign";
     struct buffer buf_data = alloc_buf(strlen(b64_data) + strlen(algorithm) + 20);

-    if (man->connection.client_version <= 1)
+    if (man->connection.client_version <= MCV_DEFAULT)
     {
         prompt = "RSA_SIGN";
         desc = "rsa-sign";
     }

     buf_write(&buf_data, b64_data, (int)strlen(b64_data));
-    if (man->connection.client_version > 2)
+    if (man->connection.client_version >= MCV_PKSIGN_ALG)
     {
         buf_write(&buf_data, ",", (int)strlen(","));
         buf_write(&buf_data, algorithm, (int)strlen(algorithm));

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Gerrit-Change-Number: 1552
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <selva.nair@...277...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>

[-- Attachment #2: Type: text/html, Size: 7368 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions
       [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
                   ` (4 preceding siblings ...)
  2026-03-02 21:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
@ 2026-03-02 21:55 ` cron2 (Code Review)
  5 siblings, 0 replies; 7+ messages in thread
From: cron2 (Code Review) @ 2026-03-02 21:55 UTC (permalink / raw)
  To: selvanair <selva.nair@; +Cc: plaisthos <arne-openvpn@

[-- Attachment #1: Type: text/plain, Size: 4016 bytes --]

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email )

Change subject: Document management client versions
......................................................................

Document management client versions

Also add an enum to keep track of client version updates.

Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Signed-off-by: Selva Nair <selva.nair@...277...>
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1552
Message-Id: <20260302141811.5697-1-gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35805.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M doc/management-notes.txt
M src/openvpn/manage.c
2 files changed, 20 insertions(+), 5 deletions(-)




diff --git a/doc/management-notes.txt b/doc/management-notes.txt
index 86b74f3..41e2a91 100644
--- a/doc/management-notes.txt
+++ b/doc/management-notes.txt
@@ -496,6 +496,10 @@
 version. This was fixed starting version 4: clients should expect
 "SUCCESS: .. " message only when setting the version to >= 4.

+Minimum client version required for certain features is listed below:
+    >PK_SIGN:[base64]           -- version 2 or greater
+    >PK_SIGN:[base64],[alg]     -- version 3 or greater
+
 COMMAND -- auth-retry
 ---------------------

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 03ff5b3..d26c9b2 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -61,6 +61,17 @@
 /* tag for blank username/password */
 static const char blank_up[] = "[[BLANK]]";

+/*
+ * Management client versions indicating feature support in client.
+ * Append new values as needed but do not change exisiting ones.
+ */
+enum mcv
+{
+    MCV_DEFAULT = 1,
+    MCV_PKSIGN = 2,
+    MCV_PKSIGN_ALG = 3,
+};
+
 struct management *management; /* GLOBAL */

 /* static forward declarations */
@@ -1333,8 +1344,8 @@
     if (version)
     {
         man->connection.client_version = atoi(version);
-        /* Prior to version 3, we missed to respond to this command. Acknowledge only if version >= 4 */
-        if (man->connection.client_version >= 4)
+        /* Until MCV_PKSIGN_ALG, we missed to respond to this command. Acknowledge only if version is newer */
+        if (man->connection.client_version > MCV_PKSIGN_ALG)
         {
             msg(M_CLIENT, "SUCCESS: Management client version set to %d", man->connection.client_version);
         }
@@ -2656,7 +2667,7 @@
             man->connection.es = event_set_init(&maxevents, EVENT_METHOD_FAST);
         }

-        man->connection.client_version = 1; /* default version */
+        man->connection.client_version = MCV_DEFAULT; /* default version */

         /*
          * Listen/connect socket
@@ -3776,14 +3787,14 @@
     const char *desc = "pk-sign";
     struct buffer buf_data = alloc_buf(strlen(b64_data) + strlen(algorithm) + 20);

-    if (man->connection.client_version <= 1)
+    if (man->connection.client_version <= MCV_DEFAULT)
     {
         prompt = "RSA_SIGN";
         desc = "rsa-sign";
     }

     buf_write(&buf_data, b64_data, (int)strlen(b64_data));
-    if (man->connection.client_version > 2)
+    if (man->connection.client_version >= MCV_PKSIGN_ALG)
     {
         buf_write(&buf_data, ",", (int)strlen(","));
         buf_write(&buf_data, algorithm, (int)strlen(algorithm));

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1552?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35
Gerrit-Change-Number: 1552
Gerrit-PatchSet: 3
Gerrit-Owner: selvanair <selva.nair@...277...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@lists.sourceforge.net>

[-- Attachment #2: Type: text/html, Size: 7109 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-03-02 21:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <gerrit.1772061272000.I1c01fa1bc7d65ac060b334724feb56ef4d0b5d35@...2715...>
2026-02-25 23:14 ` [Openvpn-devel] [S] Change in openvpn[master]: Document management client versions selvanair (Code Review)
2026-02-25 23:40 ` selvanair (Code Review)
2026-03-02 13:32 ` plaisthos (Code Review)
2026-03-02 14:18 ` [Openvpn-devel] [PATCH v2] " Gert Doering
2026-03-02 21:55   ` [Openvpn-devel] [PATCH applied] " Gert Doering
2026-03-02 21:55 ` [Openvpn-devel] [S] Change in openvpn[master]: " cron2 (Code Review)
2026-03-02 21:55 ` cron2 (Code Review)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.