[Openvpn-devel] [PATCH] Fix Ubuntu spelling and duplicate run in Github Actions

2021-09-08 Thread Arne Schwabe
Ubuntu spelling was wrong and the matrix for operating system does not do anything but run the same build twice. --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb2c4f5fe..0

Re: [Openvpn-devel] [PATCH 1/7] simplify condition detecting pure P2P mode

2021-09-07 Thread Arne Schwabe
> > Yes. Makes sense. The change makes it is a lot more clear. I think it is > actually not equivalent but the new one is definitively the correct one. > I looked at the code again and I have to actually retract my ACK. The previous code means P2P mode with static key or P2P mode without --pul

Re: [Openvpn-devel] [PATCH 7/7] add message about changing default values

2021-09-06 Thread Arne Schwabe
peers. > > Add warning at startup to notify users about the change. > > Signed-off-by: Arne Schwabe > Signed-off-by: Antonio Quartulli > --- > src/openvpn/options.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/openvpn/options.c b/src/openvp

Re: [Openvpn-devel] [PATCH 6/7] set TLS 1.2 as minimum by default

2021-09-06 Thread Arne Schwabe
controlled via > '--tls-version-min'. > > At the same time automatically set '--tls-version-min' to 1.0 if the > user requires compatibility with versions onlder than 2.3.7, as that was > the only version supported back then. > > Signed-off-by: Arne Schwabe

Re: [Openvpn-devel] [PATCH 5/7] compat-mode: add --data-cipher-fallback auomatically if requested

2021-09-06 Thread Arne Schwabe
at-mode with a version > older than 2.4.0. > > Signed-off-by: Arne Schwabe > Signed-off-by: Antonio Quartulli > --- > doc/man-sections/generic-options.rst | 2 ++ > src/openvpn/options.c| 7 +++ > Acked-By: Arne Schwabe ___

Re: [Openvpn-devel] [PATCH 3/7] reject compression by default

2021-09-06 Thread Arne Schwabe
options->comp.flags &= ~COMP_F_ALLOW_COMPRESS; > +options->comp.flags |= COMP_F_ALLOW_ASYM; > } > else if (streq(p[1], "yes")) > { > Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Re: [Openvpn-devel] [PATCH 4/7] do not include --cipher value in data-ciphers

2021-09-06 Thread Arne Schwabe
ile the list of accepted ciphers is specified via --data-ciphers. > > --cipher can still be used for compatibility reasons, but won't affect > the cipher negotiation. > Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-d

Re: [Openvpn-devel] [PATCH 2/7] compat-mode: allow user to specify version to be compatible with

2021-09-06 Thread Arne Schwabe
more modern and safer > values, while allowing backwards-compatible behaviour on demand. > > The backwards-compatible behaviour is intructed via the config > knob '--compat-mode' implemented in this patch. > > Signed-off-by: Arne Schwabe > Signed-o

Re: [Openvpn-devel] [PATCH 1/7] simplify condition detecting pure P2P mode

2021-09-06 Thread Arne Schwabe
Am 04.09.21 um 11:56 schrieb Antonio Quartulli: > The new condition is equivalent to the old one, but easier to grasp. > > Also add message to inform uset that cipher negotiation, in this case, > it indeed disabled. > > Signed-off-by: Arne Schwabe > Signed-off-

Re: [Openvpn-devel] [PATCH v2] Remove support for PF (Packet Filter)

2021-08-30 Thread Arne Schwabe
future. > > v2: > * changed // to /* */ > * changed "NOT IMPLEMENTED" to "REMOVED FEATURE" > * removed extra empty lines after removing ifdef blocks > * clarified on IRC that tls_final has to be removed and therefore that > hunk is correct > * removed mi_pr

Re: [Openvpn-devel] [PATCH] Remove support for PF (Packet Filter)

2021-08-27 Thread Arne Schwabe
> -} > - > OPENVPN_EXPORT int > openvpn_plugin_func_v3(const int v3structver, > struct openvpn_plugin_args_func_in const *args, > @@ -496,21 +362,7 @@ openvpn_plugin_func_v3(const int v3structver, > > case OPENVPN_PLUGIN_TLS_FINAL: > plugin_log(PL

Re: [Openvpn-devel] [PATCH] route.c: pass the right parameter to IN6_IS_ADDR_UNSPECIFIED

2021-08-26 Thread Arne Schwabe
ka 'unsigned char') is not a structure or union if (!IN6_IS_ADDR_UNSPECIFIED(rgi6->gateway.addr_ipv6.s6_addr)) ^~~~ Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Re: [Openvpn-devel] [PATCH 1/2] Add remote-count and remote-entry query via management

2021-08-25 Thread Arne Schwabe
> > > Actually this else could be possibly eliminated as, in this case, the > callback is not conditionally compiled in. Unlike things like pkcs11-id > support. Will check and simplify. I think in client vs server mode the management interface is still different enough that many of these are a

Re: [Openvpn-devel] [PATCH 1/2] Add remote-count and remote-entry query via management

2021-08-25 Thread Arne Schwabe
> > +static bool > +management_callback_remote_entry(void *arg, unsigned *count, char **remote) > +{ > +assert(arg); > +assert(count); > + > +struct context *c = (struct context *) arg; > +struct connection_list *l = c->options.connection_list; > +bool ret = true; > + > +

Re: [Openvpn-devel] [PATCH] Minor doc correction: tls-crypt-v2 key generation

2021-08-22 Thread Arne Schwabe
Am 22.08.21 um 17:28 schrieb selva.n...@gmail.com: > From: Selva Nair Makes sense. Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

[Openvpn-devel] [PATCH 1/2] Detect unusable ciphers on patched OpenSSL of RHEL/Centos

2021-08-18 Thread Arne Schwabe
not caught during config initialisation. This also prepares for adding Chacha20-Poly1305 when available to data-ciphers by making the detection logic used to check if cipher_kt_get returns non-NULL work on these systems. Signed-off-by: Arne Schwabe --- src/openvpn/crypto.c | 6 ++ src

[Openvpn-devel] [PATCH 2/2] Include Chacha20-Poly1305 into default --data-ciphers when available

2021-08-18 Thread Arne Schwabe
default in data-ciphers when available. This makes picking Chacha20-Poly1305 easier as it only requires to change server (by changing priority) or client side (removing AES-GCM from data-ciphers) to change to Chacha20-Poly1305. Signed-off-by: Arne Schwabe --- Changes.rst

Re: [Openvpn-devel] [PATCH] Fix client-pending-auth help message in management interface

2021-08-14 Thread Arne Schwabe
th/client-deny"); > msg(M_CLIENT, "client-kill CID [M]: Kill client instance CID with > message M (def=RESTART)"); > msg(M_CLIENT, "env-filter [level] : Set env-var filter level"); > #ifdef MANAGEMENT_PF > Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

[Openvpn-devel] [PATCH v3] Introduce webauth auth pending method and deprecate openurl

2021-08-13 Thread Arne Schwabe
: incooperate other comments from Selva Signed-off-by: Arne Schwabe --- doc/management-notes.txt| 45 + include/openvpn-plugin.h.in | 2 +- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/doc/management-notes.txt b/doc/management-notes.txt

Re: [Openvpn-devel] [PATCH] Replace deprecated mbedtls DRBG update function

2021-08-10 Thread Arne Schwabe
gt; } > } > Apart from the fact that we might want to abort (M_FATAL) if this fails instead basically ignoring the error and just log it, the change is fine. Considering the return status was ignored before, this patch is otherwise good. But failing also does not

Re: [Openvpn-devel] [PATCH] Replace deprecated mbedtls DRBG update function

2021-08-10 Thread Arne Schwabe
Am 10.08.21 um 12:17 schrieb Maximilian Fillinger: >> From: Arne Schwabe [mailto:a...@rfc2549.org] >> Sent: dinsdag 10 augustus 2021 12:12 >> To: Maximilian Fillinger ; openvpn- >> de...@lists.sourceforge.net >> Subject: Re: [Openvpn-devel] [PATCH] Replace dep

Re: [Openvpn-devel] [PATCH] Replace deprecated mbedtls DRBG update function

2021-08-10 Thread Arne Schwabe
Am 10.08.21 um 08:16 schrieb Max Fillinger: > +#if MBEDTLS_VERSION_NUMBER < 0x0210 Is that really 2.16? Looking at the API doc (https://tls.mbed.org/api/version_8h.html#adb4f54ebb33fd1a25e2c4d4480cf4936) it sounds like there should be a 16 in that number. Arne __

[Openvpn-devel] [PATCH v3] Modernise OpenVPN defaults and introduce '--compat-mode'

2021-08-05 Thread Arne Schwabe
option and not as a mean to provide 100% compatibility. Patch v2: rebase Patch v3: Fix version number off by a factor of 10 Signed-off-by: Arne Schwabe --- Changes.rst | 23 +++ doc/man-sections/generic-options.rst | 21 ++ src/openvpn/comp.h | 1

[Openvpn-devel] [PATCH v2] Modernise OpenVPN defaults and introduce '--compat-mode'

2021-08-02 Thread Arne Schwabe
and not as a mean to provide 100% compatibility. Patch v2: rebase Signed-off-by: Arne Schwabe --- Changes.rst | 23 +++ doc/man-sections/generic-options.rst | 21 ++ src/openvpn/comp.h | 1 + src/openvpn/options.c| 97

[Openvpn-devel] [PATCH] Modernise OpenVPN defaults and introduce '--compat-mode'

2021-08-02 Thread Arne Schwabe
and not as a mean to provide 100% compatibility. Signed-off-by: Arne Schwabe --- Changes.rst | 23 +++ doc/man-sections/generic-options.rst | 21 ++ src/openvpn/comp.h | 1 + src/openvpn/options.c| 97

[Openvpn-devel] [PATCH v2] Remove unistd.h from unit test

2021-08-02 Thread Arne Schwabe
the unit tests do not compile under Windows since Windows does not provide a unistd.h header. The header is still included on Unix platforms via syshead.h Signed-off-by: Arne Schwabe --- tests/unit_tests/openvpn/test_argv.c | 1 - tests/unit_tests/openvpn/test_auth_token.c | 1 - tests

[Openvpn-devel] [PATCH v3] Add example script demonstrating TOTP via auth-pending

2021-08-02 Thread Arne Schwabe
Signed-off-by: Arne Schwabe Patch v3: Some minor cleanups in the script (rename CNs, add more comments) Signed-off-by: Arne Schwabe --- doc/man-sections/script-options.rst | 3 + sample/sample-scripts/totpauth.py | 111 2 files changed, 114 insertions

[Openvpn-devel] [PATCH v3] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint

2021-07-28 Thread Arne Schwabe
. Patch V2: Fix grammar/spelling mistakes (thanks ticantech), move to openvpn-examples(5). Patch v3: use server.key and server.crt instead of server.pem/serverkey.pem Signed-off-by: Arne Schwabe --- Changes.rst | 4 + doc/Makefile.am

[Openvpn-devel] [PATCH v2] Introduce webauth auth pending method and deprecate openurl

2021-07-28 Thread Arne Schwabe
-by: Arne Schwabe --- doc/management-notes.txt| 41 ++--- include/openvpn-plugin.h.in | 2 +- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/doc/management-notes.txt b/doc/management-notes.txt index c20344298..d794a4a98 100644 --- a/doc

[Openvpn-devel] [PATCH v2] Support NCP in pure P2P VPN setups

2021-07-28 Thread Arne Schwabe
nt to push_peer_info, fix push_peer_info >= 2 that should be > 2 Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 99 +++ src/openvpn/options.c | 8 +- src/openvpn/ssl.c | 133 ++ src/op

Re: [Openvpn-devel] [PATCH v2 9/9] Support NCP in pure P2P VPN setups

2021-07-28 Thread Arne Schwabe
> > nice idea! :) Thanks! >> + >> +void >> +p2p_mode_ncp(struct tls_multi *multi, struct tls_session *session) >> +{ >> +/* Set the common options */ >> +p2p_ncp_set_options(multi, session); >> + >> +struct gc_arena gc = gc_new(); >> + >> +/* Query the common cipher here to log

[Openvpn-devel] [PATCH v2] Fix OpenVPN querying user/password if auth-token with user expires

2021-07-23 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 1 + src/openvpn/ssl.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index a1401e805..d5d192663 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -595,6 +595,7

Re: [Openvpn-devel] [PATCH] Fix OpenVPN querying user/password if auth-token with user expires

2021-07-23 Thread Arne Schwabe
Am 23.07.21 um 08:40 schrieb Gert Doering: > Hi, > > On Thu, Jul 22, 2021 at 06:24:09PM +0200, Arne Schwabe wrote: >> @@ -3116,6 +3117,7 @@ do_init_crypto_tls(struct context *c, const unsigned >> int flags) >> to.auth_token_generate = o

[Openvpn-devel] [PATCH] Fix OpenVPN querying user/password if auth-token with user expires

2021-07-22 Thread Arne Schwabe
The problematic behaviour happens when start a profile without auth-user-pass and connect to a server that pushes auth-token When the auth token expires OpenVPN asks for auth User and password again. The problem is that the auth_user_pass_setup sets auth_user_pass_enabled = true; This function is

Re: [Openvpn-devel] [PATCH v2 9/9] Support NCP in pure P2P VPN setups

2021-07-20 Thread Arne Schwabe
Am 20.07.21 um 02:00 schrieb Antonio Quartulli: > Hi, > > This patch does not apply on top of master + v6-cleanup + 8/9 > Can you rebase it? or maybe you you can point me to some commit in your > branch that I can pull for now? > > Cheers, > > Sure the dco branch on github.com/schwabe/openvpn i

[Openvpn-devel] [PATCH v6] Cleanup handling of initial auth token

2021-07-19 Thread Arne Schwabe
ogical place, general cleanups, add session id mismatch check Patch v6: Rework some comments and general cleanup of small things Signed-off-by: Arne Schwabe --- doc/man-sections/server-options.rst| 4 +- src/openvpn/auth_token.c | 89 -- src/openvpn/

Re: [Openvpn-devel] [PATCH v5] Cleanup handling of initial auth token

2021-07-19 Thread Arne Schwabe
>> /* >> * reuse the same session id and timestamp and null terminate it at >> * for base64 decode it only decodes the session id part of it >> */ > > This comment above does not make much sense to me, but since it has been > there since "ever", I'd suggest

Re: [Openvpn-devel] [PATCH] Introduce webauth auth pending method and deprecate openurl

2021-07-16 Thread Arne Schwabe
Am 16.07.21 um 14:18 schrieb Arne Schwabe: > The experience with openurl/OPEN_URL has shown that just sending > a URL to a client is not enough and we often need different > behaviour of the client depending on circumstances. Replace > OPEN_URL with a more flexible WEBAUTH pending

[Openvpn-devel] [PATCH] Introduce webauth auth pending method and deprecate openurl

2021-07-16 Thread Arne Schwabe
The experience with openurl/OPEN_URL has shown that just sending a URL to a client is not enough and we often need different behaviour of the client depending on circumstances. Replace OPEN_URL with a more flexible WEBAUTH pending auth method. Signed-off-by: Arne Schwabe --- doc/management

[Openvpn-devel] [PATCH v5] Cleanup handling of initial auth token

2021-07-13 Thread Arne Schwabe
ogical place, general cleanups, add session id mismatch check Signed-off-by: Arne Schwabe --- doc/man-sections/server-options.rst| 4 +- src/openvpn/auth_token.c | 76 +- src/openvpn/auth_token.h | 9 +++ src/op

[Openvpn-devel] [PATCH v4] Cleanup handling of initial auth token

2021-07-11 Thread Arne Schwabe
he TLS session reaches its fully authenticated state. Signed-off-by: Arne Schwabe --- doc/man-sections/server-options.rst| 4 +- src/openvpn/auth_token.c | 58 -- src/openvpn/auth_token.h | 9 src/openvpn/

[Openvpn-devel] [PATCH v3 7/9] Cleanup handling of initial auth token

2021-07-06 Thread Arne Schwabe
e only available as commercial OpenVPN Connect client and not in use anymore. Patch V2: rebase. Patch V3: fix formatting, clarifying commit message, remove initial token workaround for old v3. Signed-off-by: Arne Schwabe --- doc/man-sections/server-options.rst| 4 +-- src/o

[Openvpn-devel] [PATCH v3 6/9] Introduce S_GENERATED_KEYS state and generate keys only when authenticated

2021-07-05 Thread Arne Schwabe
in deferred state (ks->authenticated == KS_DEFERRED) will not have data channel keys generated. This avoids corner cases where a not fully authenticated sessions might leak data. Signed-off-by: Arne Schwabe Patch v2: rebased Patch v3: fix crash in non TLS mode Signed-off-by: Arne Schw

[Openvpn-devel] [PATCH] Ensure tls session is authenticated before sending push reply

2021-06-24 Thread Arne Schwabe
We ensure here that the tls session is authenticated before sending a push_reply This a part of to fix CVE-2020-15078 in the master branch. --- src/openvpn/push.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/push.c b/src/openvpn/push.c index b6f1252d2..b27f401

[Openvpn-devel] [PATCH] Fix tls-cert-profile broken on OpenSSL 1.1+

2021-06-23 Thread Arne Schwabe
Commit bc36d9d569 removed the autoconf detection of various OpenSSL functions. This overlooked HAVE_SSL_CTX_SET_SECURITY_LEVEL check in tls_ctx_set_cert_profile. Replace this also with a version number based check. Tested with LibreSSL on OpenBSD 6.8, OpenSSL 1.1 and wolfSSL. Signed-off-by: Arne

Re: [Openvpn-devel] TLS Error: local/remote TLS keys are out of sync

2021-06-14 Thread Arne Schwabe
Am 14.06.21 um 16:21 schrieb Antonio Quartulli: > Hi, > > On 14/06/2021 15:58, Arne Schwabe wrote: >>> At this point I'd ask, why not re-moving/ignoring --hand-window entirely >>> and live with the 60s default? >> >> >> That is one of the ma

Re: [Openvpn-devel] TLS Error: local/remote TLS keys are out of sync

2021-06-14 Thread Arne Schwabe
> > Ok, after clarifying in chat, I understood that the time needed by a > peer to elect a key as "usable" is defined by auth_deferred_expire_window(). > > If reneg-sec is smaller than hand-window (which is 60s by default) then > we can have this particular situation. > > Now, we are assuming th

Re: [Openvpn-devel] TLS Error: local/remote TLS keys are out of sync

2021-06-13 Thread Arne Schwabe
Am 14.06.21 um 03:01 schrieb Antonio Quartulli: > Hi, > > On 14/06/2021 02:56, Arne Schwabe wrote: >> Am 14.06.21 um 02:24 schrieb Antonio Quartulli: >>> @Arne, ideas? >>> >> >> Yes. When reneg-sec is below 60 or 120 (would need to double check), you

Re: [Openvpn-devel] TLS Error: local/remote TLS keys are out of sync

2021-06-13 Thread Arne Schwabe
Am 14.06.21 um 02:24 schrieb Antonio Quartulli: > @Arne, ideas? > Yes. When reneg-sec is below 60 or 120 (would need to double check), you need that value on both server and client since otherwise the timeouts for changing active keys mismatch as the value is 60s normally but changes if reneg-sec

Re: [Openvpn-devel] [PATCH v2 2/9] Implement auth-token-user

2021-06-11 Thread Arne Schwabe
Am 11.06.21 um 02:41 schrieb Antonio Quartulli: > Hi, > > On 20/05/2021 17:11, Arne Schwabe wrote: >> When not using username and password (i.e. auth-user-pass) it can still make >> to provide the client with an auth-token, e.g. for allowing a session to >> continu

[Openvpn-devel] [PATCH] Avoid resending reset reply more than once per client packet

2021-06-10 Thread Arne Schwabe
considered bad in a protocol. This patch fixes the problem by keeping normal original retry logic intact but adds a flags to initial packets that they are are held back to be retrasmitted until we have another packet from the client. Signed-off-by: Arne Schwabe --- src/openvpn/reliable.c | 52

Re: [Openvpn-devel] [PATCH] Add github actions

2021-06-09 Thread Arne Schwabe
Am 09.06.21 um 08:26 schrieb Gert Doering: > Hi, > > On Tue, Jun 08, 2021 at 05:24:34PM +0200, Arne Schwabe wrote: >> +steps: >> + - name: Install dependencies >> +run: sudo apt update && sudo apt install -y mingw-w64 libtool >> automake

[Openvpn-devel] [PATCH] Silence warning about format string in check_ca_required

2021-06-08 Thread Arne Schwabe
clang does not like if the format argument of printf like function is not a string literal: warning: format string is not a string literal (potentially insecure) Use "%s" as string literal to silence the warning. Signed-off-by: Arne Schwabe --- src/openvpn/options.c | 2 +- 1 file

[Openvpn-devel] [PATCH] Add github actions

2021-06-08 Thread Arne Schwabe
building on macOS and Windows (not included in this commit). The matrix is a bit different than Coverity and uses different Ubuntu version with their native OpenSSL (1.0.2, 1.1.1)/mbed TLS instead of manually compiling different OpenSSL versions on just Ubuntu 20.04. Signed-off-by: Arne Schwabe

[Openvpn-devel] [PATCH v4 4/9] Make waiting on auth an explicit state in the context state machine

2021-06-04 Thread Arne Schwabe
from management being ignored Patch v4: Fix race condition, we need to accept the config from management if we are in CAS_WAITING_AUTH or earlier states and not just in CAS_WAITING_AUTH state Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 7 +-- src/openvpn/ssl.c

[Openvpn-devel] [PATCH v3 4/9] Make waiting on auth an explicit state in the context state machine

2021-06-04 Thread Arne Schwabe
from management being ignored Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 7 +-- src/openvpn/ssl.c| 9 - src/openvpn/ssl_common.h | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 3f9710134

Re: [Openvpn-devel] [PATCH 0/2] AUTH_PENDING docs and related

2021-06-02 Thread Arne Schwabe
Am 02.06.21 um 05:42 schrieb selva.n...@gmail.com: > From: Selva Nair > > I couldn't figure out the details of how to use CR_TEXT or OPEN_URL > from the docs. This is an attempt to improve the documentation based > on my reading of the sources and some guess-work. > > I might have edited somethi

Re: [Openvpn-devel] [PATCH 2/2] Fix parsing of IV_SSO string

2021-06-02 Thread Arne Schwabe
eak; > } > -client_method = strtok(NULL, ":"); > +client_method = strtok(NULL, ","); > } > > gc_free(&gc); > Yes. Stupid copy&paste mistake from my side. Acked-By: Arne Schwabe

Re: [Openvpn-devel] [PATCH 1/2] Improve documentation of AUTH_PENDING related directives

2021-06-02 Thread Arne Schwabe
pointed out. Acked-By: Arne Schwabe ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel

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

2021-06-01 Thread Arne Schwabe
Am 24.05.21 um 20:45 schrieb selva.n...@gmail.com: > 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 > Yes that change makes s

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

2021-05-24 Thread Arne Schwabe
Am 24.05.2021 um 16:07 schrieb tincantech via Openvpn-devel: Hi, Is this expected ? I might to check if it is even a good idea to allow tls-verify and other verify options together peer-fingerprint. (You could implement peer-fingerprint with tls-verify as well. Since we haven't published 2

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

2021-05-20 Thread Arne Schwabe
Hopefully this clarifies things: - the default output format of OpenSSL is PEM-encoded ; openssl uses the default extension .pem - the OpenVPN .crt and .key files are ALSO PEM-encoded by default, but they've just been named differently by the easy-rsa tools to ensure that the files can be eas

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

2021-05-20 Thread Arne Schwabe
Am 20.05.2021 um 18:56 schrieb tincantech: Hi, again, I do not understand why openvpn choose to switch to .pem for this tutorial.  PEM -> Private Email, which this is not. You have a certificate and a key and every other openvpn tutorial on openvpn and probably the entire planet uses .crt and .

[Openvpn-devel] [PATCH v2 6/9] Introduce S_GENERATED_KEYS state and generate keys only when authenticated

2021-05-20 Thread Arne Schwabe
in deferred state (ks->authenticated == KS_DEFERRED) will not have data channel keys generated. This avoids corner cases where a not fully authenticated sessions might leak data. Signed-off-by: Arne Schwabe Patch v2: rebased Signed-off-by: Arne Schwabe --- src/openvpn/forward.h|

[Openvpn-devel] [PATCH v2 7/9] Move auth_token_state_flags to tls_session and cleanup initial_token

2021-05-20 Thread Arne Schwabe
is initially generated instead when pushing the token. Even I don't know anymore why I did it in this way in the first place. Also use multi->auth_token_initial as source for the sesssion ID since it should now always be available. Signed-off-by: Arne Schwabe --- src/openvpn/auth

[Openvpn-devel] [PATCH v2 4/9] Make waiting on auth an explicit state in the context state machine

2021-05-20 Thread Arne Schwabe
Previously we relied on checking tls_authentication_status to check wether to determine if the context auth state is actually valid or not. This patch eliminates that check by introducing waiting on the authentication as extra state in the context auth, state machine. Signed-off-by: Arne Schwabe

[Openvpn-devel] [PATCH v2 5/9] Extracting key_state deferred auth status update into function

2021-05-20 Thread Arne Schwabe
This extract the update of a deferred key status into into own function. Patch v2: Do not ignore auth_deferred_expire. Minor format changes. Signed-off-by: Arne Schwabe --- src/openvpn/ssl_verify.c | 96 ++-- 1 file changed, 62 insertions(+), 34 deletions

[Openvpn-devel] [PATCH v2 3/9] Add connection_established as state in tls_multi->context_auth

2021-05-20 Thread Arne Schwabe
p2p mode server without (without ncp) Signed-off-by: Arne Schwabe --- src/openvpn/forward.c| 6 +++--- src/openvpn/forward.h| 13 - src/openvpn/multi.c | 15 --- src/openvpn/occ.c| 2 +- src/openvpn/openvpn.h| 4 +++- src/openvpn/push.c |

[Openvpn-devel] [PATCH v2 8/9] Remove --ncp-disable option

2021-05-20 Thread Arne Schwabe
restore that. But to avoid all the NCP/non-NCP special cases to be implemented in P2P. P2P will directly switch from always non-NCP to always NCP. Signed-off-by: Arne Schwabe --- Changes.rst | 4 +++ doc/man-sections/protocol-options.rst | 8 ++ src/openvpn/init.c

[Openvpn-devel] [PATCH v2 2/9] Implement auth-token-user

2021-05-20 Thread Arne Schwabe
: Arne Schwabe --- doc/man-sections/client-options.rst | 8 +++ src/openvpn/misc.c | 37 + src/openvpn/misc.h | 21 +--- src/openvpn/options.c | 5 src/openvpn/ssl.c | 12

[Openvpn-devel] [PATCH v2 1/9] Move auth_token_state from multi to key_state

2021-05-20 Thread Arne Schwabe
in tls_multi and one explicit one. Merge these to one. Signed-off-by: Arne Schwabe --- src/openvpn/auth_token.c | 12 +-- src/openvpn/ssl_common.h | 4 +- src/openvpn/ssl_verify.c | 8 +- tests/unit_tests/openvpn/test_auth_token.c | 91

[Openvpn-devel] [PATCH v2 9/9] Support NCP in pure P2P VPN setups

2021-05-20 Thread Arne Schwabe
deterministically determine according to IV_PROTO and IV_CIPHER what options can be used and start using these There are no poor man's NCP or other compatibility workaround like in the normal NCP, making this NCP leaner and more deterministic. Signed-off-by: Arne Schwabe --- src/openvpn/i

[Openvpn-devel] [PATCH v2 1/2] Move examples into openvpn-examples(5) man page

2021-05-20 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- .gitignore | 2 ++ doc/Makefile.am| 25 + doc/openvpn-examples.5.rst | 17 + doc/openvpn.8.rst | 2 +- 4 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 doc/openvpn

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

2021-05-20 Thread Arne Schwabe
. Patch V2: Fix grammar/spelling mistakes (thanks ticantech), move to openvpn-examples(5). Signed-off-by: Arne Schwabe --- Changes.rst | 4 + doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 196

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

2021-05-19 Thread Arne Schwabe
> I just want this to be verified because the manual reads that: > udp6 will force only udp on IPv6, at least that is how I read it. Not on the server side. It is one of the quirks that we need to fix at some point. See the ipv6only option of --bind for more details > >> + >> +# The ip add

[Openvpn-devel] [PATCH v3] Implement --client-crresponse script options and plugin interface

2021-05-18 Thread Arne Schwabe
This is allows scripts and pluginsto parse/react to a CR_RESPONSE message Patch V2: doc fixes, do not put script under ENABLE_PLUGIN Patch V3: rebase Signed-off-by: Arne Schwabe --- doc/man-sections/script-options.rst | 28 - include/openvpn-plugin.h.in | 7 +++- src

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

2021-05-18 Thread Arne Schwabe
Am 17.05.21 um 19:16 schrieb tincantech: > Hi, > > ‐‐‐ Original Message ‐‐‐ > On Wednesday, 12 May 2021 14:15, Arne Schwabe wrote: > >> This is meant to give new users a quickstart for a useable OpenVPN >> setup. Our own documentation is lacking in

Re: [Openvpn-devel] Feature request - Allow comments inside markers

2021-05-18 Thread Arne Schwabe
Am 17.05.21 um 17:31 schrieb Gert Doering: > Hi, > > On Mon, May 17, 2021 at 02:57:32PM +, tincantech via Openvpn-devel wrote: >> I think it would useful to allow comment inside the >> markers. > > I've run across this as well, and share that sentiment. It would be nice. > > That said, I'

Re: [Openvpn-devel] [PATCH] Remove --no-replay

2021-05-17 Thread Arne Schwabe
Am 17.05.21 um 01:58 schrieb David Sommerseth: > On 16/05/2021 19:14, Arne Schwabe wrote: > > First of all, I do like Steffan's proposal: > >> Remove the option, and: >>  * if auth != none -> replay prevention is always enabled; >>  * if auth == none ->

Re: [Openvpn-devel] [PATCH] Remove --no-replay

2021-05-16 Thread Arne Schwabe
> > Given 2, how clear is our timeline on sunsetting non-AEAD ciphers? That > would automatically sunset --no-replay. (I've lost track a bit...) Heated debate as that is equal to drop compatibility completely with OpenVPN 2.3. We have already a heated debate if dropping 2.3 config compatibility

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

2021-05-14 Thread Arne Schwabe
>> +++ b/doc/Makefile.am >> @@ -25,6 +25,7 @@ dist_noinst_DATA = \ >>   man-sections/connection-profiles.rst \ >>   man-sections/encryption-options.rst \ >>   man-sections/examples.rst \ >> +    man-sections/examples.rst \ > > I suspect you intended to add doc/man-sections/example-fin

[Openvpn-devel] [PATCH 5/9] Add ifdef guards to unit test

2021-05-12 Thread Arne Schwabe
the unit tests do not compile under windows since they are missing the correct ifdef guards Signed-off-by: Arne Schwabe --- tests/unit_tests/openvpn/test_argv.c | 2 ++ tests/unit_tests/openvpn/test_auth_token.c | 2 ++ tests/unit_tests/openvpn/test_crypto.c | 4 tests/unit_tests

[Openvpn-devel] [PATCH 7/9] Move utility function from win32.c to win32-util.c

2021-05-12 Thread Arne Schwabe
This done to allow to include parts win32.c when building unit tests as win32.c itself has too many dependencies and cannot be included in a small unit test. Also fix a missing Windows.h include in error.h that otherwise breaks complation when included from unit tests. Signed-off-by: Arne

[Openvpn-devel] [PATCH 8/9] Document stub-v2 being basically an alias for no compression at all

2021-05-12 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- doc/man-sections/protocol-options.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/man-sections/protocol-options.rst b/doc/man-sections/protocol-options.rst index 4b6928c68..34d4255ee 100644 --- a/doc/man-sections/protocol-options.rst +++ b/doc

[Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint

2021-05-12 Thread Arne Schwabe
way. Signed-off-by: Arne Schwabe --- Changes.rst | 4 + doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 194 +++ 3 files changed, 199 insertions(+) create mode 100644 doc/man-sections/example

[Openvpn-devel] [PATCH 4/9] Add missing free_key_ctx for auth_token

2021-05-12 Thread Arne Schwabe
This is is a small memory leak as this key is only leaked once per server start. Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 1d77a9d42..49c742928 100644 --- a/src/openvpn/init.c +++ b/src

[Openvpn-devel] [PATCH 6/9] Add noreturn attribute for MSVC to assert_failed method.

2021-05-12 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- src/openvpn/error.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openvpn/error.h b/src/openvpn/error.h index 1a5521654..469afe20a 100644 --- a/src/openvpn/error.h +++ b/src/openvpn/error.h @@ -202,8 +202,14 @@ FILE *msg_fp(const

[Openvpn-devel] [PATCH 0/9] Miscellaneous cleanup patches/small fixes

2021-05-12 Thread Arne Schwabe
This patch set has a number of small fixes/improvements and documentation fixes/updates. They should be able to be applied in any order and have weak relationship to each other at best. I am sending them in one patch set to make review/keeping track of patches easier. Arne Schwabe (9): Remove

[Openvpn-devel] [PATCH 1/9] Remove explicit struct iovec check (HAVE_IOVEC)

2021-05-12 Thread Arne Schwabe
implicitly assume that iovec is present and do not need to make this explicit check Signed-off-by: Arne Schwabe --- configure.ac | 1 - src/openvpn/syshead.h | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index f05faf991..dce7982cc

[Openvpn-devel] [PATCH 3/9] Inline do_init_auth_token_key

2021-05-12 Thread Arne Schwabe
The extra function does give really give a better understanding of the code or does give any other benefit, inline it to make the code more streamlined. Signed-off-by: Arne Schwabe --- src/openvpn/init.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git

[Openvpn-devel] [PATCH 2/9] Remove getpeername, getpid check

2021-05-12 Thread Arne Schwabe
getpeername is part of SUSv3 and Windows also provides the function as part of winsocks. getpid is also provided by both Posix and windows and we do not even use getpid on Windows since we rather call GetCurrentProcessId. Signed-off-by: Arne Schwabe --- configure.ac | 4 ++-- src

[Openvpn-devel] [PATCH] Use exponential backoff for caching in tls_authentication_status

2021-05-10 Thread Arne Schwabe
of caching. Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 3 +-- src/openvpn/push.c | 2 +- src/openvpn/ssl.c| 2 +- src/openvpn/ssl.h| 3 --- src/openvpn/ssl_common.h | 5 - src/openvpn/ssl_verify.c | 25 +++-- src/openvpn

Re: [Openvpn-devel] [PATCH v3] Return cached result in tls_authentication_status

2021-05-07 Thread Arne Schwabe
Am 06.05.21 um 23:49 schrieb Antonio Quartulli: > Hi Arne, > > after our discussion on IRC I understood you expected this patch to not > change the server behaviour. > > If something is suboptimal, it means it was suboptimal also before this > patch. > > However, with your patch I can clearly se

[Openvpn-devel] [PATCH v3] Return cached result in tls_authentication_status

2021-05-06 Thread Arne Schwabe
v3: avoid rearming timer Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 2 +- src/openvpn/push.c | 11 - src/openvpn/ssl_common.h | 16 +--- src/openvpn/ssl_verify.c | 53 ++-- src/openvpn/ssl_verify.h | 3 +-- 5 files changed

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

2021-05-05 Thread Arne Schwabe
>> Could you explain why you need the process ID of the daemon? I am trying >> to figure out why that is needed. I also don't understand the secure in >> this context. What are you protecting yourself against? You are not >> protecting your script being called from a malicious program as that >>

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

2021-05-04 Thread Arne Schwabe
Am 29.04.21 um 19:15 schrieb Richard T Bonhomme: > From: string vest > > Under Windows, programmatically retrieving the parent process ID of > the openvpn instance which called a script is practically impossible. > The only sensible way, currently available, is to write a PID file. > > This patc

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

2021-05-03 Thread Arne Schwabe
Am 03.05.21 um 19:22 schrieb tincantech via Openvpn-devel: > ‐‐‐ Original Message ‐‐‐ > On Thursday, 29 April 2021 18:15, Richard T Bonhomme > wrote: > >> From: string vest stringves...@gmail.com > >> Under Windows, programmatically retrieving the parent process ID of >> the openvpn ins

[Openvpn-devel] [PATCH v2 3/7] Return cached result in tls_authentication_status

2021-05-03 Thread Arne Schwabe
tas_cache_last_udpate when actually updating the cache. Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 2 +- src/openvpn/push.c | 3 ++- src/openvpn/ssl_common.h | 16 +--- src/openvpn/ssl_verify.c | 53 ++-- src/openvpn/ssl_verify.h | 3

[Openvpn-devel] [PATCH] Fix memory leak in misc unit test

2021-05-03 Thread Arne Schwabe
Detected-by: clang -fsanitize=address Signed-off-by: Arne Schwabe --- tests/unit_tests/openvpn/test_misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvpn/test_misc.c index 15f6cbff6..c3bea8fc8 100644 --- a/tests/unit_tests

[Openvpn-devel] [PATCH v3] Remove support for blocking connect()

2021-05-03 Thread Arne Schwabe
Signed-off-by: Arne Schwabe --- src/openvpn/socket.c | 13 - src/openvpn/syshead.h | 7 --- 2 files changed, 20 deletions(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 23b12560b..407e411c0 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -1451,7

<    4   5   6   7   8   9   10   11   12   13   >