]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
9 days agoMerge branch 'fix-fortinet-7.4' into 'master' master
Dimitri Papadopoulos Orfanos [Mon, 1 Sep 2025 13:04:33 +0000 (15:04 +0200)]
Merge branch 'fix-fortinet-7.4' into 'master'

Support js redirects from Fortinet 7.4.x

See merge request openconnect/openconnect!604

9 days agoSupport js redirects from Fortinet 7.4.x
Jan-Michael Brummer [Wed, 6 Aug 2025 05:26:46 +0000 (07:26 +0200)]
Support js redirects from Fortinet 7.4.x

Signed-off-by: Jan-Michael Brummer <jan-michael.brummer1@volkswagen.de>
10 days agoMerge branch 'CID' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 31 Aug 2025 17:25:05 +0000 (19:25 +0200)]
Merge branch 'CID' into 'master'

Fix resource leaks identified by Coverity Scan

See merge request openconnect/openconnect!589

2 weeks agoMerge branch '802-fix-pulse-json' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 24 Aug 2025 20:34:01 +0000 (22:34 +0200)]
Merge branch '802-fix-pulse-json' into 'master'

fix for #802

Closes #802

See merge request openconnect/openconnect!606

2 weeks agoMerge branch 'cisco_copyright' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 24 Aug 2025 19:43:11 +0000 (21:43 +0200)]
Merge branch 'cisco_copyright' into 'master'

Cisco AnyConnect: add copyright string header

Closes #745

See merge request openconnect/openconnect!602

2 weeks agoCisco AnyConnect: add copyright string header
James Anderson [Wed, 23 Jul 2025 02:33:03 +0000 (19:33 -0700)]
Cisco AnyConnect: add copyright string header

Signed-off-by: James Anderson <james.anderson@inviarobotics.com>
3 weeks agofix for #802
Vincent Magnin [Mon, 14 Jul 2025 06:58:05 +0000 (08:58 +0200)]
fix for #802

Find an additionnal header when reading report of CVE-2025-0282 and #439

Tested, and, seems to fix the issue

Signed-off-by: Vincent Magnin <Vincent.Magnin@unil.ch>
6 weeks agoMerge branch 'android' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 27 Jul 2025 11:13:38 +0000 (13:13 +0200)]
Merge branch 'android' into 'master'

android: bump dependencies

See merge request openconnect/openconnect!598

6 weeks agoUse openconnect_vpninfo_free() to release resources
Dimitri Papadopoulos Orfanos [Fri, 17 Jan 2025 18:16:38 +0000 (19:16 +0100)]
Use openconnect_vpninfo_free() to release resources

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoFix typo
Dimitri Papadopoulos Orfanos [Sun, 27 Jul 2025 11:12:14 +0000 (13:12 +0200)]
Fix typo

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoFix resource leaks identified by Coverity Scan
Dimitri Papadopoulos [Fri, 17 Jan 2025 12:22:38 +0000 (13:22 +0100)]
Fix resource leaks identified by Coverity Scan

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoandroid: use tar consistently
Dimitri Papadopoulos Orfanos [Sun, 27 Jul 2025 09:33:31 +0000 (11:33 +0200)]
android: use tar consistently

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoandroid: bump dependencies
Dimitri Papadopoulos Orfanos [Sat, 10 May 2025 14:17:56 +0000 (16:17 +0200)]
android: bump dependencies

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoMerge branch 'tmp-indentation' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 27 Jul 2025 08:28:24 +0000 (10:28 +0200)]
Merge branch 'tmp-indentation' into 'master'

Fix indentation

See merge request openconnect/openconnect!601

6 weeks agoMerge branch 'field_name' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 16:59:50 +0000 (18:59 +0200)]
Merge branch 'field_name' into 'master'

Remove spurious colon in error message

See merge request openconnect/openconnect!594

6 weeks agoMerge branch 'script_setpgid' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 16:51:48 +0000 (18:51 +0200)]
Merge branch 'script_setpgid' into 'master'

Create new process group for script

Closes #509

See merge request openconnect/openconnect!425

6 weeks agoMerge branch 'codespell' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 16:45:36 +0000 (18:45 +0200)]
Merge branch 'codespell' into 'master'

Fix typos found by codespell

See merge request openconnect/openconnect!540

6 weeks agoMerge branch '20240614-wrapper-fix' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 16:30:56 +0000 (18:30 +0200)]
Merge branch '20240614-wrapper-fix' into 'master'

csd-wrapper: remove trailing part from URL

See merge request openconnect/openconnect!556

6 weeks agoMerge branch 'patch-1' into 'master'
Luca Boccassi [Sat, 26 Jul 2025 16:22:09 +0000 (16:22 +0000)]
Merge branch 'patch-1' into 'master'

fix URL to Open Build Service

See merge request openconnect/openconnect!578

6 weeks agoRemove spurious colon in error message
Dimitri Papadopoulos [Thu, 13 Feb 2025 13:52:40 +0000 (14:52 +0100)]
Remove spurious colon in error message

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoMerge branch 'bw-fix-tests-ppp-over-tls' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 16:19:46 +0000 (18:19 +0200)]
Merge branch 'bw-fix-tests-ppp-over-tls' into 'master'

tests: Fix socat hang in ppp-over-tls

See merge request openconnect/openconnect!596

6 weeks agoFix indentation
Dimitri Papadopoulos Orfanos [Mon, 23 Jun 2025 11:56:25 +0000 (13:56 +0200)]
Fix indentation

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
6 weeks agoMerge branch 'update-globalprotect-version' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 26 Jul 2025 15:59:57 +0000 (17:59 +0200)]
Merge branch 'update-globalprotect-version' into 'master'

Update hardcoded GlobalProtect client version to 6.3.0-33

See merge request openconnect/openconnect!586

6 weeks agoMerge branch 'update-globalprotect-version' into 'master'
Nils Kühme [Sat, 26 Jul 2025 15:59:57 +0000 (17:59 +0200)]
Merge branch 'update-globalprotect-version' into 'master'

Update hardcoded GlobalProtect client version to 6.3.0-33

6 months agotests: Fix socat hang in ppp-over-tls
Ben Walsh [Tue, 11 Mar 2025 19:17:52 +0000 (19:17 +0000)]
tests: Fix socat hang in ppp-over-tls

socat can hang if sent a SIGTERM while it is already shutting
down. This was causing the ppp-over-tls test to hang during "wait".

Fix by adding a sleep to allow socat to exit cleanly.

Signed-off-by: Ben Walsh <ben@jubnut.com>
7 months agoMerge branch 'oncp-large-config-hacks' into 'master'
David Woodhouse [Tue, 14 Jan 2025 12:40:31 +0000 (12:40 +0000)]
Merge branch 'oncp-large-config-hacks' into 'master'

Handle yet more oNCP framing idiocy

See merge request openconnect/openconnect!588

7 months agoUpdate translations from GNOME
David Woodhouse [Tue, 14 Jan 2025 10:47:45 +0000 (10:47 +0000)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 months agoHandle yet more oNCP framing idiocy
David Woodhouse [Mon, 13 Jan 2025 17:02:01 +0000 (17:02 +0000)]
Handle yet more oNCP framing idiocy

This protocol doesn't use TLS record framing, but *does* have its own
framing, each frame starting with a very minimal 2-byte frame length.

These frames can be larger than 16KiB which is the maximum size of a TLS
record. So ensure that we loop, reading a full frame where necessary.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
7 months agoMerge branch 'obs' into 'master'
David Woodhouse [Mon, 13 Jan 2025 12:09:51 +0000 (12:09 +0000)]
Merge branch 'obs' into 'master'

Fix links to Open Build Service

Closes #611

See merge request openconnect/openconnect!587

7 months agoFix typos found by codespell
Dimitri Papadopoulos [Tue, 27 Feb 2024 13:14:29 +0000 (14:14 +0100)]
Fix typos found by codespell

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
7 months agoFix links to Open Build Service
Dimitri Papadopoulos [Mon, 13 Jan 2025 08:22:58 +0000 (09:22 +0100)]
Fix links to Open Build Service

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoFix OpenSSL build without engine.h
David Woodhouse [Fri, 10 Jan 2025 17:24:55 +0000 (17:24 +0000)]
Fix OpenSSL build without engine.h

Newer versions of OpenSSL don't provide engine.h at all.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoMerge branch 'xstrdup' into 'master'
David Woodhouse [Fri, 10 Jan 2025 17:08:11 +0000 (17:08 +0000)]
Merge branch 'xstrdup' into 'master'

Remove duplicate strdup() calls

See merge request openconnect/openconnect!566

8 months agoMerge branch 'switch_while' into 'master'
David Woodhouse [Fri, 10 Jan 2025 17:06:56 +0000 (17:06 +0000)]
Merge branch 'switch_while' into 'master'

style: switch and while are not functions

See merge request openconnect/openconnect!580

8 months agoMerge branch 'tmp-mingw-copr' into 'master'
David Woodhouse [Fri, 10 Jan 2025 16:56:55 +0000 (16:56 +0000)]
Merge branch 'tmp-mingw-copr' into 'master'

Fix COPR builds for mingw

Closes #710

See merge request openconnect/openconnect!538

8 months agoFix typo in sockwrap workaround
David Woodhouse [Fri, 10 Jan 2025 16:50:08 +0000 (16:50 +0000)]
Fix typo in sockwrap workaround

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoConsistency between tun.c and script.c
Dimitri Papadopoulos [Wed, 2 Nov 2022 23:25:38 +0000 (00:25 +0100)]
Consistency between tun.c and script.c

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoCreate new process group for script
Dimitri Papadopoulos [Wed, 2 Nov 2022 23:21:51 +0000 (00:21 +0100)]
Create new process group for script

The SINGINT signal is delivered to the each process of the OpenConnect
process group. We want the script to run in a different process group,
so that SIGINT is not delivered to the script. We want the script to
finish its task, typically set/reset routing and DNS.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoRemove duplicate strdup() calls
Dimitri Papadopoulos [Tue, 30 Jul 2024 17:02:13 +0000 (19:02 +0200)]
Remove duplicate strdup() calls

The arguments of openconnect_set_mobile_info() have been strdup'ed:
- prior to passing them to openconnect_set_mobile_info(),
- inside openconnect_set_mobile_info().

We don't need both. I have chosen to keep the strdup() call inside
openconnect_set_mobile_info(), and discard the strdup() of the arguments
just before calling openconnect_set_mobile_info().

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoMerge branch 'tmp-SSLContext' into 'master'
Dimitri Papadopoulos Orfanos [Thu, 9 Jan 2025 17:00:44 +0000 (17:00 +0000)]
Merge branch 'tmp-SSLContext' into 'master'

Fix CI deprecation warning

See merge request openconnect/openconnect!571

8 months agoMerge branch 'ics-openconnect' into 'master'
Dimitri Papadopoulos Orfanos [Thu, 9 Jan 2025 16:45:34 +0000 (16:45 +0000)]
Merge branch 'ics-openconnect' into 'master'

Address compiler warnings (ics-openconnect build)

See merge request openconnect/openconnect!583

8 months agoFix missing newline in Slovenian translation
David Woodhouse [Thu, 9 Jan 2025 12:06:46 +0000 (12:06 +0000)]
Fix missing newline in Slovenian translation

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoAdd corrected string for Slovenian
David Woodhouse [Thu, 9 Jan 2025 09:13:14 +0000 (09:13 +0000)]
Add corrected string for Slovenian

This wasn't being pulled in from NetworkManager-openconnect because the
(fuzzy) translation had %s format specifiers. Fix it manually.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoUpdate en_GB and en_US translations
David Woodhouse [Thu, 9 Jan 2025 09:37:44 +0000 (09:37 +0000)]
Update en_GB and en_US translations

Not much excuse for these to be so far down the list of stats in
https://l10n.gnome.org/module/NetworkManager-openconnect/

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoUpdate translations from GNOME
David Woodhouse [Thu, 9 Jan 2025 08:52:01 +0000 (08:52 +0000)]
Update translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoResync translations with sources
David Woodhouse [Thu, 9 Jan 2025 08:43:35 +0000 (08:43 +0000)]
Resync translations with sources

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoUpdate Chinese translation (zh_CN)
stever kevin [Thu, 9 Jan 2025 08:14:32 +0000 (08:14 +0000)]
Update Chinese translation (zh_CN)

Signed-off-by: stever kevin <24898890-mkevinstever@users.noreply.gitlab.com>
8 months agoMerge branch 'update_packaging' into 'master'
Luca Boccassi [Wed, 8 Jan 2025 22:43:01 +0000 (22:43 +0000)]
Merge branch 'update_packaging' into 'master'

Update Debian packaging from Salsa repo

See merge request openconnect/openconnect!581

8 months agoPass extra warning flags to the compiler
Dimitri Papadopoulos [Tue, 7 Jan 2025 18:36:07 +0000 (19:36 +0100)]
Pass extra warning flags to the compiler

This is an attempt to match the flags passed by the Android NDK when
building ics-openconnect.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoFix CI deprecation warning
Dimitri Papadopoulos Orfanos [Sat, 19 Oct 2024 15:47:25 +0000 (17:47 +0200)]
Fix CI deprecation warning

fake-cisco-server.py:205: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
fake-cisco-server.py:205: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated

All ssl.PROTOCOL_TLS* constants have been added in Python 3.6, and
the default PROTOCOL_TLS has been deprecated since Python 3.10.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoAddress compiler warnings (ics-openconnect build)
Dimitri Papadopoulos [Tue, 7 Jan 2025 17:28:32 +0000 (18:28 +0100)]
Address compiler warnings (ics-openconnect build)

They are caused by the use of the GCC options:
  -Wparentheses
  -Wunused-function

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agotests: set SOCKET_WRAPPER_DIR_ALLOW_ORIG
David Woodhouse [Tue, 7 Jan 2025 13:20:13 +0000 (13:20 +0000)]
tests: set SOCKET_WRAPPER_DIR_ALLOW_ORIG

This allows the sockwrap library to use the original relative path of its
directory, instead of failing when realpath() gives an absolute pathname
which is too long. This was causing the COPR builds to fail on newer
versions of Fedora (with newer sockwrap).

Closes: #770
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agotests: Don't recreate sockdir after cleanup()
David Woodhouse [Tue, 7 Jan 2025 13:06:54 +0000 (13:06 +0000)]
tests: Don't recreate sockdir after cleanup()

Ever since commit bba8db3e922d ("modify tests/common.sh so that
launch_simple_sr_server() → test → cleanup() can be used repeatedly in a
single script") the cleanup() function has left an empty socket wrapper
directory behind.

Instead of recreating it in cleanup(), do so in launch_simple_sr_server()
launch_simple_pppd().

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoAllow tests to run over IPv6 as well as Legacy IP
David Woodhouse [Fri, 5 Apr 2024 16:23:22 +0000 (17:23 +0100)]
Allow tests to run over IPv6 as well as Legacy IP

When run in an environment with no Legacy IP addresses, or no IPv6 addresses,
AI_ADDRCONFIG will cause getaddrinfo() not to return addresses of that type.

So when running in an IPv6-only environment, ocserv doesn't listen on Legacy
IP. And thus the tests fail. Fix this by using a hostname 'sockwrap' for the
test connections, and providing '--resolve' arguments for both the Legacy IP
and IPv6 addresses handled by libsocket_wrapper.

Some of the python test servers which don't use AI_ADDRCONFIG do still work
on Legacy IP, so leave those alone for now.

We recently added '-4' to the socat invocation for the nullppp tests, for
similar reasons (becaose socat started listening on IPv6 by default). We
can remove that now too.

Closes #721

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoUse libsocket_wrapper for juniper-sso-auth test
David Woodhouse [Fri, 5 Apr 2024 16:21:09 +0000 (17:21 +0100)]
Use libsocket_wrapper for juniper-sso-auth test

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoAccept multiple --resolve arguments
David Woodhouse [Fri, 5 Apr 2024 16:08:40 +0000 (17:08 +0100)]
Accept multiple --resolve arguments

e.g. --resolve sockwrap:fd00:5357:5f02 --resolve sockwrap:127.0.0.2 to
try reaching the socket wrapper tests over both IPv6 and Legacy IP.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
8 months agoUpdate Debian packaging from Salsa repo
Luca Boccassi [Fri, 3 Jan 2025 17:44:25 +0000 (17:44 +0000)]
Update Debian packaging from Salsa repo

Fixes builds in Debian testing

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
8 months agostyle: switch and while are not functions
Dimitri Papadopoulos Orfanos [Tue, 31 Dec 2024 14:41:02 +0000 (15:41 +0100)]
style: switch and while are not functions

K&R and Linux Kernel coding style expect a space after these keywords:
if, switch, case, for, do, while

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoMerge branch 'autotools' into 'master'
Nikos Mavrogiannopoulos [Sat, 28 Dec 2024 20:29:51 +0000 (20:29 +0000)]
Merge branch 'autotools' into 'master'

Add automake/autoconf to requirements

Closes #775

See merge request openconnect/openconnect!579

8 months agoMerge branch 'android-build' into 'master'
Dimitri Papadopoulos Orfanos [Wed, 25 Dec 2024 22:12:34 +0000 (22:12 +0000)]
Merge branch 'android-build' into 'master'

Bump android dependencies

See merge request openconnect/openconnect!572

8 months agoAdd automake/autoconf to requirements
Dimitri Papadopoulos Orfanos [Tue, 24 Dec 2024 11:46:40 +0000 (12:46 +0100)]
Add automake/autoconf to requirements

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
8 months agoMerge branch 'tmp-wintun-rework' into 'master'
Nikos Mavrogiannopoulos [Fri, 20 Dec 2024 14:39:09 +0000 (14:39 +0000)]
Merge branch 'tmp-wintun-rework' into 'master'

Rework adapter handling for Windows

See merge request openconnect/openconnect!569

8 months agofix URL to Open Build Service
Imple Lee [Thu, 19 Dec 2024 15:57:10 +0000 (15:57 +0000)]
fix URL to Open Build Service

The original page now shows an error stating `no implicit conversion of nil into String`.
This is due to an extra `;` in the URL.
It seems that Open Build Service doesn't accept this now.
Removing the extra `;` makes the link correct.

Signed-off-by: Imple Lee <lee.imple@gmail.com>
8 months agoandroid: update ci
Arthur Khachaturov [Tue, 29 Oct 2024 15:39:11 +0000 (18:39 +0300)]
android: update ci

Signed-off-by: Arthur Khachaturov <me@wzray.ru>
9 months agoandroid: update download mirrors
Arthur Khachaturov [Tue, 29 Oct 2024 15:27:06 +0000 (18:27 +0300)]
android: update download mirrors

Signed-off-by: Arthur Khachaturov <me@wzray.ru>
9 months agoandroid: bump dependencies
Arthur Khachaturov [Tue, 29 Oct 2024 15:26:45 +0000 (18:26 +0300)]
android: bump dependencies

Signed-off-by: Arthur Khachaturov <me@wzray.ru>
9 months agoMerge branch 'saml-tunnelgroup-fix' into 'master'
Nikos Mavrogiannopoulos [Fri, 29 Nov 2024 19:24:46 +0000 (19:24 +0000)]
Merge branch 'saml-tunnelgroup-fix' into 'master'

Don't default form action to '/' in AnyConnect/OpenConnect XML form handling

Closes #737

See merge request openconnect/openconnect!560

9 months agoMerge branch 'tmp-ci-timeout' into 'master'
Nikos Mavrogiannopoulos [Thu, 28 Nov 2024 14:14:13 +0000 (14:14 +0000)]
Merge branch 'tmp-ci-timeout' into 'master'

socat: added a timeout to ensure that it exits eventually

See merge request openconnect/openconnect!576

9 months agoDon't default form action to '/' in AnyConnect/OpenConnect XML form handling (fixes...
Stefan Bühler [Wed, 19 Jun 2024 14:01:10 +0000 (16:01 +0200)]
Don't default form action to '/' in AnyConnect/OpenConnect XML form handling (fixes #737)

Still require action to be non-empty if present.

Form action "redirect" handling code in auth.c already works with
action==NULL (as in not building a new URL).  (It'd do weird things
with an empty action though.)

Signed-off-by: Stefan Bühler <source@stbuehler.de>
9 months agosocat: added a timeout to ensure that it exits eventually
Nikos Mavrogiannopoulos [Sat, 23 Nov 2024 07:53:36 +0000 (08:53 +0100)]
socat: added a timeout to ensure that it exits eventually

Relates: #757

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
9 months agoUse RFC9266 'tls-exporter' channel bindings for Cisco STRAP with TLSv1.3
David Woodhouse [Fri, 15 Nov 2024 15:46:05 +0000 (15:46 +0000)]
Use RFC9266 'tls-exporter' channel bindings for Cisco STRAP with TLSv1.3

Fixes #659

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
10 months agoDon't use adapters of unknown type when an explicit interface is
Marios Paouris [Sun, 10 Nov 2024 07:00:44 +0000 (09:00 +0200)]
Don't use adapters of unknown type when an explicit interface is
requested

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoBugfix for check_address_conflicts call
Marios Paouris [Fri, 18 Oct 2024 20:23:06 +0000 (23:23 +0300)]
Bugfix for check_address_conflicts call

If check_address_conflict fails then the adapter would remain open.
Also, don't unnecessarily call this function.

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoImproved adapter name generation when no adapter name is specified.
Marios Paouris [Sat, 12 Oct 2024 14:56:34 +0000 (17:56 +0300)]
Improved adapter name generation when no adapter name is specified.

Try to find an adapter name that is not already used in the system by
appending a monotonically increasing integer to the hostname that is
used as a default name.

This works around wintun's weird behaviour of renaming existing adapters
without preventing two or more instances of openconnect to connect to
the same VPN host (without explicity specifying an interface name), or
otherwise messing with user's network adapters.

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoUse hostname as Wintun ifname (if ifname not specified), v2
Marios Paouris [Mon, 7 Oct 2024 05:53:35 +0000 (08:53 +0300)]
Use hostname as Wintun ifname (if ifname not specified), v2

The intention for the commit 48bd28aa was a bit different
from what was actually implemented.

Although it states that "Instead, we should use the VPN server's hostname
as a sane default interface name with Wintun, and only attempt to use
TAP-Windows as a fallback in the case where Wintun can't be initialized.",
it first tries with an empty interface name, which uses the first available
interface found, whether it is tap or tun, and if that fails then creates
the same default with the server name, which will prioritize wintun over
tap.

Instead, implement the following flow:

If the user did specify an interface name:
  - Try to find an adapter with the specified name (whether it's tun
    or tap) and use it.
  - If no adapter found, try to create a wintun adapter. If wintun is
    not available then bail out.
If the user did not specify an interface name:
  - Generate a default interface name based on the server URL.
  - If the generated interface already exists don't try to use it
    and fallback to using the first available adapter.
  - If the generated interface doesn't exist, try to create a wintun
    adapter. If wintun in not available then fallback to using the first
    available adapter.

See https://gitlab.com/openconnect/openconnect-gui/-/issues/357#note_1758999655
and https://gitlab.com/openconnect/openconnect/-/issues/699#note_1762029017

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoFix memory leaks. openconnect__win32_strerror returns a malloc\'ed string
Marios Paouris [Mon, 23 Sep 2024 06:12:27 +0000 (09:12 +0300)]
Fix memory leaks. openconnect__win32_strerror returns a malloc\'ed string

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoRework adapter search.
Marios Paouris [Mon, 23 Sep 2024 05:42:09 +0000 (08:42 +0300)]
Rework adapter search.

Enumerate adapters to a list to decouple searching from enumerating.
Add adapters with of not interested types to the list, to facilitate name
collision detection, if needed.
Get Wintun adapter guid by calling APIs instead of searching again.

Also, disabled list-taps on cross mingw builds

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
10 months agoMerge branch 'OpenSSL_3.1.2_PKCS7_sign' into 'master'
Nikos Mavrogiannopoulos [Sun, 3 Nov 2024 18:47:58 +0000 (18:47 +0000)]
Merge branch 'OpenSSL_3.1.2_PKCS7_sign' into 'master'

Fix CI pipeline failures

See merge request openconnect/openconnect!573

10 months agoFix CI pipeline failures
Charles Lane [Sun, 29 Sep 2024 21:58:55 +0000 (17:58 -0400)]
Fix CI pipeline failures

OpenSSL 3.1.2 doesn't like a NULL for the PKCS7_sign 'data' argument.

Signed-off-by: Charles Lane <lane@dchooz.org>
Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
11 months agoMerge branch 'tmp-mingw-nsis' into 'master'
Dimitri Papadopoulos Orfanos [Thu, 26 Sep 2024 06:09:42 +0000 (06:09 +0000)]
Merge branch 'tmp-mingw-nsis' into 'master'

Generate the NSIS installer when building on MSYS2/MinGW

See merge request openconnect/openconnect!563

13 months agoMerge branch 'handle_GP_ESP_magic_address_corner_case' into 'master'
Daniel Lenski [Tue, 30 Jul 2024 16:19:30 +0000 (16:19 +0000)]
Merge branch 'handle_GP_ESP_magic_address_corner_case' into 'master'

GP server may send only a Legacy IP client address but both Legacy and IPv6 magic addresses for ESP

See merge request openconnect/openconnect!565

13 months agoUpdate changelog
Daniel Lenski [Sun, 28 Jul 2024 00:38:01 +0000 (17:38 -0700)]
Update changelog

This also addresses the closely-related issue described in
https://gitlab.com/openconnect/openconnect/-/merge_requests/500, where
OpenConnect would prefer a GP server's IPv6 magic ping adress over its
Legacy IP magic ping address, even if `--disable-ipv6` is specified:
> Previous logic always preferred the ipv6 gateway address and magic for ESP
> even if ipv6 was explicitly disabled.  A VPN I use currently will only
> negotiate an ESP connection over ipv4 despite advertising a v6 gateway.

This similarly results in non-functional ESP:

> The result was that with ipv6 enabled, ESP pings were sent but would not
> renegotiate, with it disabled openconnect would erroneously report that
> the response did not contain a matching gateway and keys.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
13 months agoAdd a fake IPSEC/ESP configuration to fake-gp-server.py
Daniel Lenski [Sat, 27 Jul 2024 22:04:58 +0000 (15:04 -0700)]
Add a fake IPSEC/ESP configuration to fake-gp-server.py

This allows testing for correct interpretation of the ESP configuration, as in
https://lists.infradead.org/pipermail/openconnect-devel/2024-July/005447.html

Also needed to fix a mistake in the logout handler of fake-gp-server.py
("POST not GET"), and an oversight in how GP propagated errors when falling
back to TLS tunnel from ESP.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
13 months agoGP server may send only a Legacy IP client address, but both Legacy and IPv6 magic...
Daniel Lenski [Sat, 27 Jul 2024 17:58:28 +0000 (10:58 -0700)]
GP server may send only a Legacy IP client address, but both Legacy and IPv6 magic addresses for ESP

In this corner case, we need to use the Legacy IP magic address.  The
inverse corner case would be if the server sends ESP ping magic addresses of
both types, but only sends an IPv6 client address; we were already handling
that one correctly, because we had observed that GlobalProtect servers
require the client to use the IPv6 magic ping address if they want to send
both IPv6 and Legacy IP traffic.

The easiest and most straightforward way to handle all these cases robustly
is simply to save both versions of the ESP magic address, just as we save
both versions of the client address, until after we have parsed the whole
config. At that point we decide which ESP magic address should be used.

See logs attached to
https://lists.infradead.org/pipermail/openconnect-devel/2024-July/005447.html
for an example of this:

    POST https://vpnhost.example.com/ssl-vpn/getconfig.esp
    …
    <               <gw-address>REDACTEDIPV4ADDRESS7</gw-address>
    <               <gw-address-v6>REDACTEDIPV6ADDRESS7</gw-address-v6>
    <               <ipv6-connection>no</ipv6-connection>
    <               <ip-address>REDACTEDIPV4ADDRESS0</ip-address>
    <               <netmask>255.255.255.255</netmask>
    …
    <               <ipsec>…</ipsec>
    Did not receive ESP keys and matching gateway in GlobalProtect config; tunnel will be TLS only.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
13 months agoGenerate the NSIS installer when building on MSYS2/MinGW
Marios Paouris [Fri, 19 Jul 2024 05:36:16 +0000 (08:36 +0300)]
Generate the NSIS installer when building on MSYS2/MinGW

When building under MSYS2/MinGW generate windows-style paths for instfiles.nsh
as makensis on windows expects them that way.

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
13 months agoMerge branch 'tmp-wintun-long-names' into 'master'
Nikos Mavrogiannopoulos [Fri, 12 Jul 2024 14:44:21 +0000 (14:44 +0000)]
Merge branch 'tmp-wintun-long-names' into 'master'

Increase adapter name to the maximum size allowed by Wintun

See merge request openconnect/openconnect!561

13 months agoMerge branch 'empt-resp-log' into 'master'
Nikos Mavrogiannopoulos [Fri, 12 Jul 2024 14:40:54 +0000 (14:40 +0000)]
Merge branch 'empt-resp-log' into 'master'

http: print proper log message on empty response

See merge request openconnect/openconnect!562

14 months agoAdded test with all non-ASCII chars
Marios Paouris [Wed, 3 Jul 2024 05:51:33 +0000 (08:51 +0300)]
Added test with all non-ASCII chars

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
14 months agoIncrease adapter name to the maximum size allowed by Wintun
Marios Paouris [Fri, 21 Jun 2024 07:43:54 +0000 (10:43 +0300)]
Increase adapter name to the maximum size allowed by Wintun

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
14 months agoVerbose reporting on reading adapter name failure. Added test to exercise wintun...
Marios Paouris [Mon, 17 Jun 2024 06:10:03 +0000 (09:10 +0300)]
Verbose reporting on reading adapter name failure. Added test to exercise wintun max adapter name

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
14 months agoMerge branch '20240614-comment-fix' into 'master'
Nikos Mavrogiannopoulos [Sun, 30 Jun 2024 20:05:53 +0000 (20:05 +0000)]
Merge branch '20240614-comment-fix' into 'master'

auth.c: minor fix in comment

See merge request openconnect/openconnect!555

14 months agohttp: print proper log message on empty response
Simon Ser [Tue, 25 Jun 2024 16:14:13 +0000 (18:14 +0200)]
http: print proper log message on empty response

The same log message was used for both an error HTTP status and an
empty HTTP response. Use different messages for each case.

Signed-off-by: Simon Ser <contact@emersion.fr>
14 months agoAdded wintun.h and Makefile.dlldeps on distribution
Marios Paouris [Mon, 17 Jun 2024 13:43:46 +0000 (16:43 +0300)]
Added wintun.h and Makefile.dlldeps on distribution

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
14 months agocsd-wrapper: remove trailing part from URL
Antonio Borneo [Sat, 15 Jun 2024 12:32:23 +0000 (14:32 +0200)]
csd-wrapper: remove trailing part from URL

The Cisco ASA server I use got some update.
It suddenly stopped providing the reply:
<host-scan-base-uri>/CACHE</host-scan-base-uri>
and went back to the legacy reply:
<csdLinux
stuburl="/CACHE/sdesktop/install/binaries/sfinst"
starturl="/CACHE/sdesktop/install/result.htm"
waiturl="/+CSCOE+/sdesktop/wait.html"
/>

The csd-wrapper now receives in the command line
-url https://server/CACHE/sdesktop/install/result.htm
instead of
-url https://server/CACHE
and, obviously, the concatenation of $URL within the script makes
impossible to download the manifest.

Strip away the trailing "/sdesktop/*" from $URL.
This should work even in case of custom path in the ASA server.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
14 months agoauth.c: minor fix in comment
Antonio Borneo [Sat, 15 Jun 2024 12:21:25 +0000 (14:21 +0200)]
auth.c: minor fix in comment

The xml value of waiturl is saved in vpninfo->csd_waiturl.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
15 months agoMerge branch 'pschyska' into 'master'
Nikos Mavrogiannopoulos [Wed, 5 Jun 2024 18:24:26 +0000 (18:24 +0000)]
Merge branch 'pschyska' into 'master'

Initialize 'vpninfo->authgroup' to allow 'xmlpost_initial_req' to set '<group-select>'

See merge request openconnect/openconnect!554

15 months agoInitialize 'vpninfo->authgroup' to allow 'xmlpost_initial_req' to set '<group-select>'
Paul Schyska [Thu, 28 Mar 2024 18:57:30 +0000 (19:57 +0100)]
Initialize 'vpninfo->authgroup' to allow 'xmlpost_initial_req' to set '<group-select>'

Signed-off-by: Paul Schyska <pschyska@gmail.com>
16 months agoMerge branch 'tmp-reenable-ci' into 'master'
Nikos Mavrogiannopoulos [Fri, 10 May 2024 20:05:49 +0000 (20:05 +0000)]
Merge branch 'tmp-reenable-ci' into 'master'

.gitlab-ci.yml: use saas-linux-small-amd64 as tag

See merge request openconnect/openconnect!552

16 months ago.gitlab-ci.yml: use saas-linux-small-amd64 as tag
Nikos Mavrogiannopoulos [Fri, 10 May 2024 18:29:44 +0000 (20:29 +0200)]
.gitlab-ci.yml: use saas-linux-small-amd64 as tag

The linux and shared tags are deprecated:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=17.0#removal-of-tags-from-small-saas-runners-on-linux

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
17 months agoMerge branch 'Fedora_ppp-over-tls' into 'master'
David Woodhouse [Fri, 5 Apr 2024 10:07:08 +0000 (10:07 +0000)]
Merge branch 'Fedora_ppp-over-tls' into 'master'

Verbose logs to debug and fix ppp-over-tls

Closes #720

See merge request openconnect/openconnect!548