[Openvpn-devel,v2,2/5] Implement support for signalling IV_SSO to server

Message ID 20191109151306.18597-2-arne@rfc2549.org
State Superseded
Headers show
Series
  • [Openvpn-devel,v2,1/5] Implement parsing and sending INFO and INFO_PRE control messages
Related show

Commit Message

Arne Schwabe Nov. 9, 2019, 3:13 p.m.
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 src/openvpn/ssl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

David Sommerseth March 27, 2020, 9:36 p.m. | #1
Sorry, I'm loosing grip of my mailing-list-fu ... Managed to reply only to Arne.

On 27/03/2020 21:59, David Sommerseth wrote:
> On 09/11/2019 16:13, Arne Schwabe wrote:
>> Signed-off-by: Arne Schwabe <arne@rfc2549.org>
>> ---
>>  src/openvpn/ssl.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
>> index 4455ebb8..cbb87e43 100644
>> --- a/src/openvpn/ssl.c
>> +++ b/src/openvpn/ssl.c
>> @@ -2355,7 +2355,9 @@ push_peer_info(struct buffer *buf, struct tls_session *session)
>>                  if ((((strncmp(e->string, "UV_", 3)==0
>>                         || strncmp(e->string, "IV_PLAT_VER=", sizeof("IV_PLAT_VER=")-1)==0)
>>                        && session->opt->push_peer_info_detail >= 2)
>> -                     || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0))
>> +                     || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0)
>> +                     || (strncmp(e->string,"IV_SSO=",sizeof("IV_SSO=")-1)==0)
>> +                     )
>>                      && buf_safe(&out, strlen(e->string)+1))
>>                  {
>>                      buf_printf(&out, "%s\n", e->string);
>>
> 
> Code looks good, smoke tested on RHEL-7 against a test server without any issues.
> 
> Test 1: openvpn --config test.conf --push-peer-info
> No IV_SSO entry found in server log.
> 
> Test 2: openvpn --config test.conf --push-peer-info --setenv IV_SSO 1
> IV_SSO=1 was found in server log
> 
> Test 3: openvpn --config test.conf --push-peer-info setenv IV_SSX 1
> No IV_SSO nor IV_SSX found in server log
> 

Acked-by: David Sommerseth <davids@openvpn.net>

Patch

diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 4455ebb8..cbb87e43 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -2355,7 +2355,9 @@  push_peer_info(struct buffer *buf, struct tls_session *session)
                 if ((((strncmp(e->string, "UV_", 3)==0
                        || strncmp(e->string, "IV_PLAT_VER=", sizeof("IV_PLAT_VER=")-1)==0)
                       && session->opt->push_peer_info_detail >= 2)
-                     || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0))
+                     || (strncmp(e->string,"IV_GUI_VER=",sizeof("IV_GUI_VER=")-1)==0)
+                     || (strncmp(e->string,"IV_SSO=",sizeof("IV_SSO=")-1)==0)
+                     )
                     && buf_safe(&out, strlen(e->string)+1))
                 {
                     buf_printf(&out, "%s\n", e->string);