Re: [Openvpn-devel] [PATCH 3/3] Print format spec changes for tapctl and openvpnmscia

2021-05-25 Thread Selva Nair
Hi, When _DEBUG is defined openvpnmsica builds okay using MSVC, but fails on mingw (before and after this patch) with errors like openvpnmsica.c:410:17: error: ‘L__FUNCTION__’ undeclared (first use in this function); did you mean ‘NLS_FUNCTION’? debug_popup(TEXT(__FUNCTION__)); I have left

[Openvpn-devel] [PATCH 3/3 v2] Print format spec changes for tapctl and openvpnmscia

2021-05-25 Thread selva . nair
From: Selva Nair The tapctl and openvpnmscia codebase is written with an intent of supporting both unicode and ansi builds. This patch does not attempt to change that although non-unicode support looks untested and buggy. The main change is to replace %s by PRIsLPTSR that is defined as %ls

Re: [Openvpn-devel] [PATCH 3/3] Print format spec changes for tapctl and openvpnmscia

2021-05-25 Thread Selva Nair
Hi, Thanks for the review. On Tue, May 25, 2021 at 4:06 AM Lev Stipakov wrote: > > Hi, > > I got compilation error: Oops.. I did not test building with _DEBUG defined. > > 2>openvpnmsica.c > 2>C:\Users\lev\Projects\openvpn\src\openvpnmsica\openvpnmsica.c(140,1): > warning C4002: too many

Re: [Openvpn-devel] --tls-verify runs twice for a single cert in Peer-fingerprint mode

2021-05-24 Thread Selva Nair
> Note: In the logs above, the script is executed *before* Openvpn/Openssl > verification, so exporting error-status to env for script seems unlikely. No so. The script is executed from a callback and the error from openssl is very much in there and should be exported to scripts, imo. This was

[Openvpn-devel] [PATCH] Do not require CA when peer-fingerprint is used

2021-05-24 Thread selva . nair
From: Selva Nair Fix --ca or --ca-path check when --pkcs11-id or --cryptoapicert is used with --peer-fingerprint. The multiple --ca or --capath checks are consolidated into a function Signed-off-by: Selva Nair --- src/openvpn/options.c | 44 ++- 1 file

Re: [Openvpn-devel] --tls-verify runs twice for a single cert in Peer-fingerprint mode

2021-05-24 Thread Selva Nair
Hi, On Mon, May 24, 2021 at 10:09 AM tincantech via Openvpn-devel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi, > > Is this expected ? > > Server log: > > 2021-05-24 14:58:03 us=534606 10.10.201.226:60276 TLS CRYPT V2 VERIFY SCRIPT > OK > 2021-05-24 14:58:03 us=558066

[Openvpn-devel] [PATCH 3/3] Print format spec changes for tapctl and openvpnmscia

2021-05-21 Thread selva . nair
From: Selva Nair The tapctl and openvpnmscia codebase is written with an intent of supporting both unicode and ansi builds. This patch does not attempt to change that although non-unicode support looks untested and buggy. The main change is to replace %s by PRIsLPTSR that is defined as %ls

[Openvpn-devel] [PATCH 1/3] Make it explicit that WIndows build requires UNICODE support

2021-05-21 Thread selva . nair
From: Selva Nair The interactive service code implicitly treats TCHAR == WCHAR in several places with the assumption that we build only with UNICODE defined. Make this explicit and remove some redundant code. Also replace openvpn_sntprintf(), _tprintf() and similar with explicit wide string

[Openvpn-devel] [PATCH 2/3] Use C standard compliant format specs in wprintf functions

2021-05-21 Thread selva . nair
From: Selva Nair - Use %ls for wchar_t * and %hs for char * variables This makes it possible to build correctly with or without __USE_MINGW_ANIS_STDIO defined. When this define is not used all printf/scanf family functions are resolved from the windows runtime MSVCRT. Newer (since version 8

Re: [Openvpn-devel] [PATCH v2 2/2] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint

2021-05-20 Thread Selva Nair
Hi, On Thu, May 20, 2021 at 3:50 PM tincantech via Openvpn-devel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi, > > ‐‐‐ Original Message ‐‐‐ > On Thursday, 20 May 2021 19:30, Arne Schwabe wrote: > > > Am 20.05.2021 um 18:56 schrieb tincantech: > > > > > Hi, > > >

Re: [Openvpn-devel] [PATCH v3] Ignore leading whitespace and comment lines for peer-fingerprint.

2021-05-19 Thread Selva Nair
Hi On Wed, May 19, 2021 at 9:35 AM Gert Doering wrote: > > Inline peer-fingerprint blocks can benefit from a bit of structuring > by indentation or by putting comments ("# this is Alice's key"). > > v2: accept ';' and '#' as comment delimiter. Fix tab-indent. > v3: we want == > > Signed-off-by:

Re: [Openvpn-devel] [PATCH v2] Ignore leading whitespace and comment lines for peer-fingerprint.

2021-05-19 Thread Selva Nair
Hi, On Wed, May 19, 2021 at 1:58 AM Gert Doering wrote: > > Inline peer-fingerprint blocks can benefit from a bit of structuring > by indentation or by putting comments ("# this is Alice's key"). > > v2: accept ';' and '#' as comment delimiter. Fix tab-indent. > > Signed-off-by: Gert Doering >

Re: [Openvpn-devel] [PATCH] Ignore leading whitespace and comment lines for peer-fingerprint.

2021-05-18 Thread Selva Nair
Hi, On Tue, May 18, 2021 at 10:33 AM Gert Doering wrote: > > Inline peer-fingerprint blocks can benefit from a bit of structuring > by indentation or by putting comments ("# this is Alice's key"). > > Signed-off-by: Gert Doering > --- > src/openvpn/options.c | 9 +++-- > 1 file changed, 7

Re: [Openvpn-devel] [PATCH] Add daemon_pid to --tls-crypt-v2-verify environment

2021-05-10 Thread Selva Nair
On Mon, May 10, 2021 at 4:24 PM tincantech via Openvpn-devel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi, > > ‐‐‐ Original Message ‐‐‐ > On Monday, 10 May 2021 18:29, Gert Doering wrote: > > > Hi, > > > > On Wed, May 05, 2021 at 10:00:37PM +, tincantech via

[Openvpn-devel] [PATCH v2] Allow PKCS#11 uri to be used as --cert and --key file names

2021-05-09 Thread selva . nair
From: Selva Nair v2 changes - do not allow so-path embedded in cert and key uri - add --pkcs11-engine option to optionally specify the engine and provider module to use If either --cert or --key is specified as a PKCS#11 uri, try to load the certificate and key from any accessible

Re: [Openvpn-devel] [PATCH] Allow PKCS#11 uri to be used as --cert and --key file names

2021-05-06 Thread Selva Nair
Hi, On Thu, May 6, 2021 at 6:12 AM Jan Just Keijser wrote: > > Hi Selva, > > Maybe I'll have to resurrect that idea or require --script-security 2 > > for this? In either case the core code will stay the same -- will wait > > for a review and/or more comments before changing anything. > > >

Re: [Openvpn-devel] [PATCH] Allow PKCS#11 uri to be used as --cert and --key file names

2021-05-05 Thread Selva Nair
Hi JJK, On Wed, May 5, 2021 at 4:00 AM Jan Just Keijser wrote: > > Hi Selva, > > On 05/05/21 07:18, selva.n...@gmail.com wrote: > > From: Selva Nair > > > > If either --cert or --key is specified as a PKCS#11 uri, try to > > load the certificate and ke

[Openvpn-devel] [PATCH] Allow PKCS#11 uri to be used as --cert and --key file names

2021-05-04 Thread selva . nair
From: Selva Nair If either --cert or --key is specified as a PKCS#11 uri, try to load the certificate and key from any accessible PKCS#11 device. This does not require linking with any pkcs11 library, but needs pkcs11 engine to be available on the target machine. In its simplest form, just have

Re: [Openvpn-devel] [PATCH] Add daemon_pid to --tls-crypt-v2-verify environment

2021-05-04 Thread Selva Nair
On Tue, May 4, 2021 at 3:04 PM tincantech via Openvpn-devel wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hi, > > ‐‐‐ Original Message ‐‐‐ > On Tuesday, 4 May 2021 13:43, tincantech via Openvpn-devel > wrote: > > > Hi, > > > > ‐‐‐ Original Message ‐‐‐ > > On

[Openvpn-devel] Adding RSA-PSS support in pkcs11-helper

2021-05-02 Thread Selva Nair
Hi, Currently RSA-PSS signatures are handled in pkcs11-helper by asking the token to do raw RSA signature of data already padded by OpenSSL. Many new hardware tokens refuse to support this mode and require the padding to be done in hardware. For a recent user report see this thread:

Re: [Openvpn-devel] [PATCH] tapctl: support for ovpn-dco Windows driver

2021-04-25 Thread Selva Nair
Hi, On Wed, Apr 21, 2021 at 4:02 AM Lev Stipakov wrote: > From: Lev Stipakov > > Make tapctl aware of ovpn-dco. > > Signed-off-by: Lev Stipakov > --- > src/tapctl/main.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/src/tapctl/main.c

[Openvpn-devel] Fwd: [PATCH] tapctl: support for ovpn-dco Windows driver

2021-04-25 Thread Selva Nair
(sourceforge seems to be refusing to accept mail from me.. sending again) Hi, On Wed, Apr 21, 2021 at 4:02 AM Lev Stipakov wrote: > From: Lev Stipakov > > Make tapctl aware of ovpn-dco. > > Signed-off-by: Lev Stipakov > --- > src/tapctl/main.c | 13 +++-- > 1 file changed, 7

[Openvpn-devel] [PATCH] tun.c on WIN32: remove more unused variables

2021-04-03 Thread selva . nair
From: Selva Nair Fixes: tun.c: In function ‘do_ifconfig_ipv4’: tun.c:1217:17: warning: variable ‘ifconfig_remote_netmask’ set but not used [-Wunused-but-set-variable] const char *ifconfig_remote_netmask = NULL; tun.c:1213:10: warning: unused variable ‘tun’ [-Wunused-variable

Re: [Openvpn-devel] [PATCH] tun.c: remove unused variable

2021-04-03 Thread Selva Nair
Hi On Sat, Apr 3, 2021 at 12:01 PM Antonio Quartulli wrote: > > From: Antonio Quartulli > > Signed-off-by: Antonio Quartulli > --- > src/openvpn/tun.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 6b7c8ef1..60a3a179 100644 > ---

[Openvpn-devel] [PATCH] Remove automatic service

2021-03-28 Thread selva . nair
From: Selva Nair This has been replaced by openvpnserv2 since 2.4.0 and we have stopped setting up this service in the installer since 2.5.0. Get rid of the unused code. The mechanics of supporting multiple services with the same executable is retained for possible future use. For backwards

Re: [Openvpn-devel] [PATCH applied] Re: Require at least 100MB of mlock()-able memory if --mlock is used.

2021-03-11 Thread Selva Nair
13:48:08 2021 +0100 > > Require at least 100MB of mlock()-able memory if --mlock is used. > > Signed-off-by: Gert Doering > Acked-by: Selva Nair > Message-Id: <20210310124808.14741-1-g...@greenie.muc.de> > URL: > https://www.mail-archive.com/open

Re: [Openvpn-devel] [PATCH v2] Require at least 100MB of mlock()-able memory if --mlock is used.

2021-03-09 Thread Selva Nair
Hi, On Mon, Mar 8, 2021 at 2:11 AM Gert Doering wrote: > If --mlock is used, the amount of memory OpenVPN can use is guarded > by the RLIMIT_MEMLOCK value (see mlockall(2)). The OS default for this > is usually 64 Kbyte, which is enough for OpenVPN to initialize, but > as soon as the first TLS

Re: [Openvpn-devel] [PATCH] Require at least 20MB of mlock()-able memory if --mlock is used.

2021-03-07 Thread Selva Nair
Hi, On Sun, Mar 7, 2021 at 1:44 PM Gert Doering wrote: > Hi, > > On Sun, Mar 07, 2021 at 01:36:03PM -0500, Selva Nair wrote: > > > "I'm not sure", TBH. rlimit handling in unix is a bit of an unknown > > > territory for me. > > > > > > Wh

Re: [Openvpn-devel] [PATCH] Require at least 20MB of mlock()-able memory if --mlock is used.

2021-03-07 Thread Selva Nair
On Sun, Mar 7, 2021 at 1:10 PM Gert Doering wrote: > Hi, > > thanks for the review. > > On Sun, Mar 07, 2021 at 12:22:32PM -0500, Selva Nair wrote: > > On Sun, Mar 7, 2021 at 11:31 AM Gert Doering > wrote: > > > > > If --mlock is used, the amou

Re: [Openvpn-devel] [PATCH] Require at least 20MB of mlock()-able memory if --mlock is used.

2021-03-07 Thread Selva Nair
Hi, On Sun, Mar 7, 2021 at 11:31 AM Gert Doering wrote: > If --mlock is used, the amount of memory OpenVPN can use is guarded > by the RLIMIT_MEMLOCK value (see mlockall(2)). The OS default for this > is usually 64 Kbyte, which is enough for OpenVPN to initialize, but > as soon as the first

Re: [Openvpn-devel] [Openvpn-devel/users] Debugging Windows based server scripts

2021-02-18 Thread Selva Nair
Hi, On Wed, Feb 17, 2021 at 5:38 PM tincanteksup wrote: > Hi, > > due to not being allowed to have scripts "echo data" to the log file > under Windows, debugging scripts is next to impossible. > > I presume there are no compile time options to enable "echo" under Windows > ? > > Could anybody

[Openvpn-devel] [PATCH] Quote the domain name argument passed to the wmic command

2021-02-16 Thread selva . nair
From: Selva Nair It appears wmic needs domain names containing hyphens to be quoted. Trac #1375 Signed-off-by: Selva Nair --- src/openvpnserv/interactive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index

[Openvpn-devel] rfc: mingw and the interactive service code

2021-01-27 Thread Selva Nair
Hi, Starting version 8, mingw has started automatically setting __USE_MINGW_ANSI_STDIO = 1 under some feature-set conditions: for example, when _GNU_SOURCE is defined or -std=C99, both of which are true in our case. See: release notes at http://mingw-w64.org/doku.php This causes several stdio

Re: [Openvpn-devel] [PATCH v3] Document common uses of 'echo' directive, re-enable logging for 'echo'.

2021-01-18 Thread Selva Nair
driving the openvpn core via management interface. Which commands > exists and their syntax has so far been mostly undocumented. > > Condense the long and good discussion between Selva Nair and > Jonathan K. Bullard into doc/gui-notes.txt (initial draft from > Jonathan, comments from Sel

Re: [Openvpn-devel] [PATCH v2] Document common uses of 'echo' directive, re-enable logging for 'echo'.

2021-01-18 Thread Selva Nair
Hi, On Mon, Jan 18, 2021 at 8:17 AM Gert Doering wrote: > > There will be a v3, as I just added "Android: Planned" to all the > msg stuff. > > Selva, which GUI version will be "the one with msg support"? So I can > have this fixed as well. GUI is at 11.21.0 right now, this will be in 11.22.0

Re: [Openvpn-devel] is it possible to store saved password in tpm instead of registry ?

2021-01-13 Thread Selva Nair
Hi, The blob stored in the registry is encrypted by DPAPI and requires access to the user's session to decrypt. No matter where the blob is stored, if an attacker has access to the session, anything the GUI can read can be read by the attacker too. That said, if there is a well-defined API for

Re: [Openvpn-devel] [PATCH] Document common uses of 'echo' directive, re-enable logging for 'echo'.

2020-12-30 Thread Selva Nair
far been mostly undocumented. > > Condense the long and good discussion between Selva Nair and > Jonathan K. Bullard into doc/gui-notes.txt (initial draft from > Jonathan, comments from Selva and Arne), with a pointer added > to doc/management-notes.txt. > > See: > > > ht

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-25 Thread Selva Nair
Hi Thanks for the comments. On Fri, Dec 25, 2020 at 3:03 PM Gert Doering wrote: > Hi, > > On Sun, Dec 20, 2020 at 07:31:42PM -0500, Selva Nair wrote: > > Here is the link again. > > https://github.com/selvanair/openvpn-gui/releases/tag/v11-echo-msg > > I got no f

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-25 Thread Selva Nair
Hi, Merry Christmas! On Wed, Dec 23, 2020 at 6:15 AM Jan Just Keijser wrote: > On 21/12/20 18:22, Selva Nair wrote: > > > > On Mon, Dec 21, 2020 at 2:04 AM Gert Doering wrote: > >> Hi, >> >> On Sun, Dec 20, 2020 at 07:31:42PM -0500, Selva Nair wrote: &g

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-21 Thread Selva Nair
Hi, On Mon, Dec 21, 2020 at 3:27 PM Arne Schwabe wrote: > Am 21.12.20 um 20:11 schrieb Gert Doering: > > Hi, > > > > On Mon, Dec 21, 2020 at 06:24:36PM +, Greg Cox wrote: > >> My contention is, a VPN client has enough information from its own > certs to > >> know when its certs are expired

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-21 Thread Selva Nair
On Mon, Dec 21, 2020 at 2:04 AM Gert Doering wrote: > Hi, > > On Sun, Dec 20, 2020 at 07:31:42PM -0500, Selva Nair wrote: > > I thought we already went through this when we discussed the proposed > "echo > > msg" in considerable detail 3 years ago. > &

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-20 Thread Selva Nair
Hi, On Sun, Dec 20, 2020 at 5:38 PM Gert Doering wrote: > Hi, > > On Sun, Dec 20, 2020 at 04:00:13PM +0100, Arne Schwabe wrote: > > > ... and the client would then either print this on the console > > > (if !management) or dump it to management, where the GUI/Tunnelblick > > > could pick it up

Re: [Openvpn-devel] wanted: mechanism to send text messages to client

2020-12-20 Thread Selva Nair
Hi, On Sun, Dec 20, 2020 at 5:55 AM Gert Doering wrote: > Hi, > > I find myself looking for a mechanism by which I could send informational > messages ("your cert expires in two weeks, go refresh!" - "your openvpn > client needs an upgrade") from the openvpn server to incoming clients. > > Of

Re: [Openvpn-devel] [PATCH] Fix too early argv freeing when registering DNS

2020-12-15 Thread Selva Nair
Hi On Tue, Dec 15, 2020 at 12:37 PM Gert Doering wrote: > Hi, > > On Tue, Dec 15, 2020 at 06:16:00PM +0100, Domagoj Pensa wrote: > > When registering DNS on Windows, argv is freed after being used in first > > ipconfig command (/flushdns). > > > > Then same argv is used uninitialized in next

Re: [Openvpn-devel] [PATCH 2/3] netsh: Clear existing IPv6 DNS servers before configuring new ones

2020-09-28 Thread Selva Nair
Hi, On Thu, Sep 24, 2020 at 4:57 AM Lev Stipakov wrote: > Hi, > > > When there are no IPv6 DNS published, the adapter state is not > > sanitized and might contain IPv6 DNS server from a previous session. > > In this case, shouldn't the "set dns" call below overwrite the previous > value? > >

[Openvpn-devel] [PATCH] Improve documentation of --username-as-common-name

2020-09-27 Thread selva . nair
From: Selva Nair Trac #1079 Signed-off-by: Selva Nair --- doc/man-sections/server-options.rst | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/man-sections/server-options.rst b/doc/man-sections/server-options.rst index c0b22a5..4b649b1 100644 --- a/doc/man

[Openvpn-devel] [PATCH v2] Set DNS Domain using iservice

2020-09-25 Thread selva . nair
From: Selva Nair Use wmic instead of directly editing the registry as the former does not take full effect unless the dns client service is restarted. Editing the registry appears to work erratically depending on whether its followed with a dchp renew or ipconfig /registerdns etc. DOMAIN

Re: [Openvpn-devel] [PATCH] Set DNS Domain using iservice

2020-09-25 Thread Selva Nair
Hi Thanks for the review. On Fri, Sep 25, 2020 at 5:24 AM Lev Stipakov wrote: > Hi, > > > Note: this will set the domain twice if both v4 and v6 DNS > > servers are defined. It cant hurt, but could be avoided by > > making the domain setting a separate call from the DNS > > server setting. > >

[Openvpn-devel] [PATCH] Set DNS Domain using iservice

2020-09-24 Thread selva . nair
From: Selva Nair Use wmic instead of directly editing the registry as the former does not take full effect unless the dns client service is restarted. Editing the registry appears to work erratically depending on whether its followed with a dchp renew or ipconfig /registerdns etc. DOMAIN

Re: [Openvpn-devel] [PATCH] Allow --dhcp-option in config file when windows-driver is wintun

2020-09-15 Thread Selva Nair
Hi On Tue, Sep 15, 2020 at 2:48 AM Lev Stipakov wrote: > Hi, > > > -msg(M_USAGE, "--dhcp-options requires --ip-win32 dynamic or > adaptive"); > > +msg(M_USAGE, "--dhcp-option requires --ip-win32 dynamic or > adaptive"); > > Nice, this typo has been there since at least 2005. > >

[Openvpn-devel] [PATCH] Allow --dhcp-option in config file when windows-driver is wintun

2020-09-14 Thread selva . nair
From: Selva Nair When wintun is in use we mutate ip_win32_type to NETSH and then complain that ip-win32 option should be dynamic or adaptive if any --dhcp-option directive is present in the config file. This causes a fatal error. How to reproduce: specify a --dhcp-option in the config

Re: [Openvpn-devel] problem with beta3 and wintun

2020-09-11 Thread Selva Nair
Hi On Fri, Sep 11, 2020 at 1:45 PM RafaeHil Gava wrote: > Hi Selva, > > I was wondering if it's possible to detect UAC during the installation. > What do you think? > There are many ways of running the GUI as admin and all involve some deliberate action on the part of the user. The best we can

Re: [Openvpn-devel] problem with beta3 and wintun

2020-09-11 Thread Selva Nair
Hi, On Fri, Sep 11, 2020 at 1:58 AM Gert Doering wrote: > Hi, > > On Thu, Sep 10, 2020 at 06:10:17PM -0700, Marvin wrote: > > To All 3, > > Thank you with your help I found the issue. UAC was disabled in the > > registry on this image. IIRC we had trouble updating some software by > >

Re: [Openvpn-devel] [PATCH] Fix client's poor man NCP fallback

2020-09-10 Thread Selva Nair
Hi On Thu, Sep 10, 2020 at 3:10 AM Marvin Adeff wrote: > Selva, > > Please allow me to back up a moment and restate this: > 1. I installed the beta3 msi from the web site logged in as a user that > has admin privileges. But no elevation was used to install it, just > double-click on the file.

Re: [Openvpn-devel] [PATCH] Fix client's poor man NCP fallback

2020-09-09 Thread Selva Nair
Hi, On Thu, Sep 10, 2020 at 12:19 AM Marvin wrote: > Hi Selva, > > The GUI did not have this error unless run as administrator which you >> should not and will never work. > > So you are saying that if OpenVPN is installed by a user who has admin > privileges (as our case does) that v2.5 with

Re: [Openvpn-devel] [PATCH] Fix client's poor man NCP fallback

2020-09-09 Thread Selva Nair
ate to SYSTEM. Selva > > Marvin > > On Wed, Sep 9, 2020 at 5:14 PM Selva Nair wrote: > >> Hi Marvin, >> >> This is the wrong thread, but... >> >> On Wed, Sep 9, 2020 at 7:54 PM Marvin wrote: >> >>> Hi Guys, >>> >>> I just teste

Re: [Openvpn-devel] [PATCH] Fix client's poor man NCP fallback

2020-09-09 Thread Selva Nair
Hi Marvin, This is the wrong thread, but... On Wed, Sep 9, 2020 at 7:54 PM Marvin wrote: > Hi Guys, > > I just tested beta3 on Win10. I am getting the exact same error with > wintun as before. TAP works normally. I tried with the GUI and by cli. > The GUI never generated this error even

[Openvpn-devel] [PATCH] Add a remark on dropping privileges when --mlock is used

2020-09-09 Thread selva . nair
From: Selva Nair trac #1059 Signed-off-by: Selva Nair --- doc/man-sections/generic-options.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/man-sections/generic-options.rst b/doc/man-sections/generic-options.rst index a07fe7e..d5f0883 100644 --- a/doc/man-sections/generic

[Openvpn-devel] [PATCH] In tap.c use DiInstallDevice to install the driver on a new adapter

2020-09-03 Thread selva . nair
From: Selva Nair As reported in Trac 1321, additional adapter instalaltion by tapctl.exe fails to fully setup the device node (some registry keys missing, error in setapi.dev.log etc.). Although the exact cause of this failure is unclear, letting the Plug and Play subsystem handle

Re: [Openvpn-devel] On tap-windows6 adapter installation by tapctl.exe

2020-09-03 Thread Selva Nair
Hi Lev, Thanks for confirming. What you tested is exactly what I have in mind. I suppose you tested it using MSVC. I recall when I worked on creating tap adapters on the fly (patch abandoned for lack of time) some functions in newdev.dll did not resolve with mingw and I always had to load them

[Openvpn-devel] On tap-windows6 adapter installation by tapctl.exe

2020-09-02 Thread Selva Nair
Hi, tldr: a fix for Trac 1321 Currently tapctl.exe does the following to create an adapter and install the driver on it. 1. Create a device info structure 2. Set the hardware id on it 3. Search the driver store for the latest matching driver 4. Select the driver, set it in the device info and

Re: [Openvpn-devel] [PATCH] openvpnmsica: make adapter renaming non-fatal

2020-09-02 Thread Selva Nair
Hi On Wed, Sep 2, 2020 at 9:54 AM Lev Stipakov wrote: > Hi, > > >> if (dwResult != ERROR_SUCCESS) > >> { > >> -tap_delete_adapter(NULL, , > ); > >> +/* failed renaming is not a fatal error, continue > */ > >> +

Re: [Openvpn-devel] [PATCH] openvpnmsica: make adapter renaming non-fatal

2020-09-02 Thread Selva Nair
Hi On Wed, Sep 2, 2020 at 9:39 AM Lev Stipakov wrote: > From: Lev Stipakov > > For some users renaming adapter mysteriously fails > (https://github.com/OpenVPN/openvpn-build/issues/187), > > Since renaming is just a a "nice to have", make it not fatail. > > Signed-off-by: Lev Stipakov > --- >

Re: [Openvpn-devel] [PATCH] openvpnmsica: remove adapter renaming

2020-09-02 Thread Selva Nair
Hi, I would suggest to keep this renaming but make it not fatal. A descriptive name is nice to have and we could even make the name configurable at some point in future. Selva On Wed, Sep 2, 2020 at 8:40 AM Lev Stipakov wrote: > From: Lev Stipakov > > Renaming doesn't work on some machines (

Re: [Openvpn-devel] Help testing OpenVPN 2.5-beta2 driver installation?

2020-08-31 Thread Selva Nair
Hi > > > (2) At the end of install the GUI is launched as admin, not user. > > I couldn't reproduce that on my Windows 10 laptop: > I too can't reproduce it any longer. So please ignore that comment. I was installing from the command line (easier to generate logs that way) and probably used an

Re: [Openvpn-devel] Help testing OpenVPN 2.5-beta2 driver installation?

2020-08-29 Thread Selva Nair
Hi On Fri, Aug 28, 2020 at 9:10 AM Samuli Seppänen wrote: > Hi, > > It would be great if somebody would find time to test the following > installer: > > > https://build.openvpn.net/downloads/releases/OpenVPN-2.5-beta2-I601-amd64.msi > > In particular I'd like to know if anyone else has problems

Re: [Openvpn-devel] [PATCH 1/2] Send auth-fail messages to clients on renegotiation failures via auth-token or user-pass expiry

2020-08-24 Thread Selva Nair
ure, management support and deferred auth support have to be enabled but restricting the usefulness of your patch to those cases is not really a limitation. What am I missing? Selva --- > Eric Thorpe > SparkLabs > Developerhttps://www.sparklabs.comhttps://twitter.com/sparklabssupp...@spa

Re: [Openvpn-devel] [PATCH 1/2] Send auth-fail messages to clients on renegotiation failures via auth-token or user-pass expiry

2020-08-22 Thread Selva Nair
Hi, On Thu, Aug 13, 2020 at 4:37 AM Eric Thorpe wrote: > Hi Arne, > > The issue is your state is not accessible from where that boolean needs > to be used unless I am missing something? Please advise if I'm mistaken > or of another route. > I agree with Arne that duplicating a state machine

Re: [Openvpn-devel] [PATCH] tun.c: enable using wintun driver under SYSTEM

2020-08-21 Thread Selva Nair
Hi, On Wed, Aug 19, 2020 at 3:08 AM Lev Stipakov wrote: > From: Lev Stipakov > > Commit 6d19775a468 has removed SYSTEM elevation hack, > but introduced regression - inability to use wintun without interactive > service. > > Proceed with ring buffers registration even if iservice is unavailable

Re: [Openvpn-devel] 2.5-beta-1 Wintun requires SYSTEM privileges

2020-08-18 Thread Selva Nair
Hi On Tue, Aug 18, 2020 at 3:42 PM Gert Doering wrote: > Hi, > > On Tue, Aug 18, 2020 at 03:29:19PM -0400, Selva Nair wrote: > > > If you already have SYSTEM, accessing wintun from openvpn directly will > > > also work and should bring quite a bit of speed impro

Re: [Openvpn-devel] 2.5-beta-1 Wintun requires SYSTEM privileges

2020-08-18 Thread Selva Nair
Hi, On Tue, Aug 18, 2020 at 3:21 PM Gert Doering wrote: > Hi, > > On Tue, Aug 18, 2020 at 12:09:11PM -0700, Marvin Adeff wrote: > > I???m sorry for the confusing response. > > > > Our systems do M2M monitoring and need to run OpenVPN even without a > user logged in. In previous versions we

Re: [Openvpn-devel] 2.5-beta-1 Wintun requires SYSTEM privileges

2020-08-18 Thread Selva Nair
> > > > An additional check in openvpn.exe whether it's started as SYSTEM could be > useful as well, but less critical, IMO. > > Yes Please! We run 2500+ systems that run it this way as SYSTEM. > In most such cases (not using the GUI) one could use the automatic service which runs as SYSTEM. For

Re: [Openvpn-devel] 2.5-beta-1 Wintun requires SYSTEM privileges

2020-08-18 Thread Selva Nair
Hi On Tue, Aug 18, 2020 at 2:33 AM Gert Doering wrote: > Hi, > > On Tue, Aug 18, 2020 at 08:23:35AM +0200, Gert Doering wrote: > > This can also happen if you run the GUI with admin privs (because then > > it will not use the iservice *but* openvpn needs *more* privs than > > "just

[Openvpn-devel] [PATCH v2] Improve the documentation for --dhcp-option

2020-08-16 Thread selva . nair
From: Selva Nair - Stress that these are handled internally only on some platforms - Correct the statement about wintun - Document DOMAIN-SEARCH Signed-off-by: Selva Nair --- v2: Rebase to master and reword to match the new rst version Add doc for DOMAIN-SEARCH doc/man-sections/vpn

Re: [Openvpn-devel] [PATCH v2] Allow management to kill client instances by CN wildcard

2020-08-14 Thread Selva Nair
ement interface was missed in the previous version of the patch. Selva > > -- > Best Regards, Vladislav Grishenko > > -Original Message- > From: Selva Nair > Sent: Friday, August 14, 2020 11:22 PM > To: openvpn-devel > Subject: Re: [Openvpn-devel] [PATCH v2]

Re: [Openvpn-devel] [PATCH v2] Allow management to kill client instances by CN wildcard

2020-08-14 Thread Selva Nair
Hi On Fri, Aug 14, 2020 at 1:36 PM Arne Schwabe wrote: > > Am 14.08.20 um 19:12 schrieb Vladislav Grishenko: > > In case of some permanent part of common name (ex. domain) and/or > > long complex common name consisting of multiple x509 fields, it's > > handly to kill client instances via

Re: [Openvpn-devel] [PATCH] Improve error msg when all TAP adapters are in use "or disabled"

2020-08-06 Thread Selva Nair
Hi, This looks good but can we do better? We don't check the error (GetLastError()) after the CreateFile() failure -- can we determine whether the error was due to permissions, busy file (in use) or disabled device and print out a more specific error message? I'm not sure what errors are

Re: [Openvpn-devel] Regarding deprecation of --route-nopull

2020-07-23 Thread Selva Nair
Hi On Thu, Jul 23, 2020 at 4:50 PM Arne Schwabe wrote: > > Am 23.07.2020 um 20:14 schrieb André via Openvpn-devel: > > Hi, > > > > Regarding, > > > > https://community.openvpn.net/openvpn/wiki/DeprecatedOptions#Option:--route-nopull > > "Openvpn devs would like to know if you use this

Re: [Openvpn-devel] [Openvpn-users] Join PC with OpenVpn to Active Directory

2020-07-19 Thread Selva Nair
Hi, If your VPN establishes a route to the domain controller(s) and the domain name resolves from the client, you can join the domain just as you would do while directly connected to the LAN. For example, if the domain name is example.local, "nslookup example.local" should return the IP addresses

Re: [Openvpn-devel] [PATCH v3] Add deferred authentication support to plugin-auth-pam

2020-07-15 Thread Selva Nair
-- > "all forwarding for all other clients" Acked-by: Selva Nair On Wed, Jul 15, 2020 at 5:02 AM Gert Doering wrote: > > If OpenVPN signals deferred authentication support (by setting > the internal environment variables "auth_control_file" and > "deferr

Re: [Openvpn-devel] [PATCH v2] Add deferred authentication support to plugin-auth-pam

2020-07-14 Thread Selva Nair
service, ) < 0) > +{ > +goto done; Do we have to abort in this case? This will exit the background process and cripple the server while this could be a temporary memory pressure causing the fork to fail. Why not just break and plough along? The core will fail to get a response via the ac_file, but that could happen if the grand-child fails as well -- the server is supposed to cope with such failures. > +} > +break; > +} > + > + > +/* non-deferred auth: wait for pam result and send > + * result back via control socketpair > + */ > if (pam_auth(service, )) /* Succeeded */ > { > if (send_control(fd, RESPONSE_VERIFY_SUCCEEDED) == -1) > -- Apart from these minor issues that could be corrected or ignored at merge time, all look good. We should put the usage info into README.auth-pam as that seems to be the only documentation of the plugin. Also an entry in changelog? Could be a separate patch. Acked-by: Selva Nair ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Re: [Openvpn-devel] [Openvpn-users] Multiple DNS search suffixes on Windows

2020-06-23 Thread Selva Nair
Hi, On Tue, Jun 23, 2020 at 3:22 AM Jan Just Keijser wrote: > > Hi, > > On 21/06/20 17:14, Selva Nair wrote: > > On Sun, Jun 21, 2020 at 7:14 AM Gert Doering wrote: > >> > >> going through OpenVPN threads that went stale - I think this is > >> actu

Re: [Openvpn-devel] [PATCH] systemd: Change the default cipher to AES-256-GCM for server configs

2020-06-22 Thread Selva Nair
On Mon, Jun 22, 2020 at 7:31 AM David Sommerseth wrote: > > This change makes the server use AES-256-GCM instead of BF-CBC as the > default cipher for the VPN tunnel when starting OpenVPN via systemd > and the openvpn-server@.service unit file. > > To avoid breaking existing running

Re: [Openvpn-devel] [PATCH] Convert plugin/auth-pam.c from stderr logging to plugin_log().

2020-06-21 Thread Selva Nair
Hi, This was long overdue after patches after patches sprinkling fprintf() all over the place.. mea culpa too.. Acked-by: Selva Nair On Sat, Jun 20, 2020 at 11:18 AM Gert Doering wrote: > > More recent OpenVPN APIs pass a function pointer for a logging function > (plugin_log()) t

Re: [Openvpn-devel] [PATCH] Add deferred authentication support to plugin-auth-pam

2020-06-21 Thread Selva Nair
Hi, On Sat, Jun 20, 2020 at 12:23 PM Gert Doering wrote: > > If OpenVPN signals deferred authentication support (by setting the > internal environment variable "auth_control_file"), do not wait > for PAM stack to finish. Instead, the privileged PAM process > returns RESPONSE_DEFER via the

Re: [Openvpn-devel] [Openvpn-users] Multiple DNS search suffixes on Windows

2020-06-21 Thread Selva Nair
Hi, On Sun, Jun 21, 2020 at 7:14 AM Gert Doering wrote: > > Hi, > > going through OpenVPN threads that went stale - I think this is > actually a nice addition (read: other people have already asked > me if this can be done). > > On Thu, Mar 05, 2020 at 01:53:12PM +0100, Jan Just Keijser wrote: >

Re: [Openvpn-devel] async plugin-auth-pam

2020-06-12 Thread Selva Nair
On Tue, Jun 9, 2020 at 1:55 PM Gert Doering wrote: > Hi, > > I ran into a problem at a customer installation recently, where > plugin-auth-pam was blocking for some extended time (~30 seconds?) > due to pam_radius not receiving answers due to problems in the backend. > > Now, maybe I should use

[Openvpn-devel] [PATCH v2] Allow repeated cycles through remotes when management-query-remote is in use

2020-05-15 Thread selva . nair
From: Selva Nair (i) Let the management-client predictably cycle through remote entries. This is done by not aborting after two cycles. The client can abort or restart the connection using signals (USR/HUP/TERM) as necessary. In the current behaviour, the daemon can unexpectedly exit when

Re: [Openvpn-devel] [PATCH 2/2] Allow repeated cycles through remotes when management-query-remote is in use

2020-05-13 Thread Selva Nair
Hi, On Wed, May 13, 2020 at 12:36 PM Gert Doering wrote: > > Hi, > > On Sun, Jun 09, 2019 at 03:33:55PM -0400, Selva Nair wrote: > > Ref: https://patchwork.openvpn.net/project/openvpn2/list/?series=201 > > > > These patches were meant to help implement choosing the

Re: [Openvpn-devel] [PATCH applied] Re: Parse static challenge response in auth-pam plugin

2020-04-23 Thread Selva Nair
Hi, On Tue, Aug 7, 2018 at 3:01 PM Gert Doering wrote: > > Your patch has been applied to the master branch. > > (I'm a bit undecided about release/2.4 - this is in "new feature!" land, > and all the challenge stuff is "master" territory. OTOH, it's not openvpn > main code, and the code is sane

Re: [Openvpn-devel] [PATCH applied] Re: Skip expired certificates in Windows certificate store

2020-04-15 Thread Selva Nair
Hi, > is this one and aa6affe6df811db11577847366a569def0a3e314 also material > for release/2.4? So "feature" or "bug" category? Yes it would be good to get this one and aa6affe into 2.4. This one will cherry-pick with a minor conflict in cryptoapicert.c, easily resolved. aa6affe should

[Openvpn-devel] [PATCH 2/2] When auth-user-pass file has no password query the management interface (if available).

2020-04-03 Thread selva . nair
From: Selva Nair When only username is found in the file, redirect the auth-user-pass query to the management interface if management-query-passwords is enabled. Otherwise the user is prompted on console, if available, as before. This changes the behaviour for those who run from the command

[Openvpn-devel] [PATCH for-2.4 1/2] Move querying username/password from management interface to a function

2020-04-03 Thread selva . nair
From: Selva Nair This helps the next patch. No functionality changes, only refactoring. Same as commit 461e566fb274d6f7647dc3aa81c02e4fbf362a23 in master except for additional ifdef ENABLE_CLIENT_CR Signed-off-by: Selva Nair --- src/openvpn/misc.c | 61

Re: [Openvpn-devel] [PATCH v2 2/2] When auth-user-pass file has no password, query the management

2020-04-02 Thread Selva Nair
Hi, On Thu, Apr 2, 2020 at 12:56 PM Jonathan K. Bullard wrote: > Hi, > > On Mon, Mar 30, 2020 at 2:06 PM wrote: > > > > From: Selva Nair > > > > When only username is found in the file, redirect the auth-user-pass > > query to the management i

Re: [Openvpn-devel] [PATCH] [PATCH v5] Insert client connection data into PAM environment

2020-03-30 Thread Selva Nair
Hi, On Mon, Mar 30, 2020 at 8:59 AM Paolo Cerrito wrote: > 1) so remote was set to the maxlenght of ipv6 address defined into > arpa/inet.h + 1 for string terminator > > 2) I refactored the call to get_env to take first ipv6 address, then >only if it is NULL, i make a call for ipv4 > --- >

[Openvpn-devel] [PATCH v2 1/2] Move querying username/password from management to a function

2020-03-30 Thread selva . nair
From: Selva Nair This helps the next patch. No functionality changes, only refactoring. Signed-off-by: Selva Nair --- No changes from v1 src/openvpn/misc.c | 54 ++ 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/src/openvpn

[Openvpn-devel] [PATCH v2 2/2] When auth-user-pass file has no password, query the management

2020-03-30 Thread selva . nair
From: Selva Nair When only username is found in the file, redirect the auth-user-pass query to the management if management-query-passwords is enabled. Otherwise the user is prompted on console, if available, as before. This changes the behaviour for those who run from the command line

Re: [Openvpn-devel] [PATCH 2/2] When auth-user-pass file has no password, query the management

2020-03-30 Thread Selva Nair
Hi, On Mon, Mar 30, 2020 at 12:11 PM Jonathan K. Bullard wrote: > Hi, > > On Mon, Mar 30, 2020 at 11:12 AM Selva Nair wrote: > > Jonathan K. Bullard wrote: > > > > > > If the OS X command line user was using --management-query-passwords > > >

Re: [Openvpn-devel] [PATCH 2/2] When auth-user-pass file has no password, query the management

2020-03-30 Thread Selva Nair
Hi, On Mon, Mar 30, 2020 at 2:07 AM Gert Doering wrote: > > Hi, > > On Sun, Mar 29, 2020 at 07:58:15PM -0400, Selva Nair wrote: > > Yes, that's right. However, that logic wont be proper on OS-X, would it? > > Command line users who use --log can still see password >

Re: [Openvpn-devel] [PATCH 2/2] When auth-user-pass file has no password, query the management

2020-03-29 Thread Selva Nair
Hi, On Sun, Mar 29, 2020 at 7:13 PM Jonathan K. Bullard wrote: > > Hi, > > On Sun, Mar 29, 2020 at 4:34 PM wrote: > > > > From: Selva Nair > > > > If only username is found in the file, redirect the auth-user-pass > > query to the management on

<    1   2   3   4   5   6   7   8   9   10   >