]> www.infradead.org Git - users/dwmw2/openconnect.git/log
users/dwmw2/openconnect.git
4 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>
4 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>
4 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>
4 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

4 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

4 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>
5 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>
5 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>
5 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

5 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>
6 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

8 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

8 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>
8 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>
8 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>
9 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>
9 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

9 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

9 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>
9 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>
9 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>
9 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

10 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>
10 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>
10 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>
10 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

10 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>
11 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

11 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>
12 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

12 months agoVerbose socat logs for debugging, Add '-4' to listen on Legacy IP (for sockwrap)
Dimitri Papadopoulos Orfanos [Mon, 1 Apr 2024 13:58:56 +0000 (15:58 +0200)]
Verbose socat logs for debugging, Add '-4' to listen on Legacy IP (for sockwrap)

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
12 months agoMerge branch 'LOAD_LIBRARY_SEARCH_SYSTEM32' into 'master'
Dimitri Papadopoulos Orfanos [Sun, 31 Mar 2024 11:32:29 +0000 (11:32 +0000)]
Merge branch 'LOAD_LIBRARY_SEARCH_SYSTEM32' into 'master'

Search wintun.dll in the application directory only

See merge request openconnect/openconnect!541

13 months agoSearch wintun.dll in the application directory only
Dimitri Papadopoulos [Wed, 28 Feb 2024 06:31:00 +0000 (07:31 +0100)]
Search wintun.dll in the application directory only

Now that wintun.dll is installed in the application directory by
both openconnect and openconnect-gui packages, we can get rid of
LOAD_LIBRARY_SEARCH_SYSTEM32.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
13 months agoMerge branch 'rekey' into master
Daniel Lenski [Wed, 28 Feb 2024 05:42:32 +0000 (21:42 -0800)]
Merge branch 'rekey' into master

Fix logging of rekey / trojan invocation delay

See merge request openconnect/openconnect!539

13 months agoUpdate changelog
Daniel Lenski [Tue, 27 Feb 2024 23:39:53 +0000 (15:39 -0800)]
Update changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
13 months agoFix logging of rekey / trojan invocation delay
Wade Cline [Wed, 28 Feb 2024 03:19:00 +0000 (19:19 -0800)]
Fix logging of rekey / trojan invocation delay

Closes #677

The rekey / trojan invocation is supposed to happen in the future.
Therefore subtract current time from expected time of rekey / invocation,
not the reverse.

These delays have been shown incorrectly ever since the SIGUSR1 handler was
added in b156b581e894b03e7169827b9e293ca2f13e1366.

Originally submitted at
https://lists.infradead.org/pipermail/openconnect-devel/2024-February/005400.html

Signed-off-by: Cline, Wade <wade.cline@intel.com>
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
13 months agoMerge branch 'tmp-build-mingw' into 'master'
Daniel Lenski [Sun, 25 Feb 2024 19:13:39 +0000 (19:13 +0000)]
Merge branch 'tmp-build-mingw' into 'master'

MinGW build improvements

See merge request openconnect/openconnect!537

14 months agoMinGW build improvements
Marios Paouris [Thu, 22 Feb 2024 10:03:01 +0000 (12:03 +0200)]
MinGW build improvements

- Decoupled wintun and vpnc-script-win.js from building installer.
- Added required dependencies for downloading wintun and vpnc-script-win.js.
- Install wintun, vpnc-script-win.js and list-system-keys by default.
- Added configure option to disable building installer (doesn't work in
  msys/mingw builds, can also speedup build when no installer required).

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
14 months agoMerge branch 'tmp-fix-openssl-3.0.6' into 'master'
Daniel Lenski [Thu, 22 Feb 2024 22:15:20 +0000 (22:15 +0000)]
Merge branch 'tmp-fix-openssl-3.0.6' into 'master'

Fix compatibility with openssl 3.1 and later versions

See merge request openconnect/openconnect!536

14 months agoUpdate changelog
Daniel Lenski [Thu, 22 Feb 2024 21:58:48 +0000 (13:58 -0800)]
Update changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoopenssl-dtls: use DTLS 1.2 for PSK-NEGOTIATE
Nikos Mavrogiannopoulos [Wed, 21 Feb 2024 21:24:56 +0000 (22:24 +0100)]
openssl-dtls: use DTLS 1.2 for PSK-NEGOTIATE

Avoid reducing the security level for PSK-NEGOTIATE by
setting DTLS 1.2. This works well because all PSK-NEGOTIATE
ocserv servers are using gnutls that supports DTLS 1.2.

This addresses a previously undetermined issue with DTLS on centos7.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
14 months ago.gitlab-ci.yml: use fedora39 for all builds
Nikos Mavrogiannopoulos [Wed, 21 Feb 2024 20:59:20 +0000 (21:59 +0100)]
.gitlab-ci.yml: use fedora39 for all builds

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
14 months agoopenssl-dtls: set security level to zero when negotiating DTLS 1.0 or earlier
Nikos Mavrogiannopoulos [Wed, 21 Feb 2024 20:56:03 +0000 (21:56 +0100)]
openssl-dtls: set security level to zero when negotiating DTLS 1.0 or earlier

This addresses the issue of openssl 3.1 running in fedora39.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoMerge branch 'tmp-fix-dtls-disable' into 'master'
Nikos Mavrogiannopoulos [Wed, 21 Feb 2024 20:01:22 +0000 (20:01 +0000)]
Merge branch 'tmp-fix-dtls-disable' into 'master'

openconnect_disable_dtls: allow disabling DTLS unless already connected

Closes #697

See merge request openconnect/openconnect!523

14 months agoopenconnect_disable_dtls: allow disabling DTLS unless already connected
Nikos Mavrogiannopoulos [Thu, 11 Jan 2024 13:07:37 +0000 (14:07 +0100)]
openconnect_disable_dtls: allow disabling DTLS unless already connected

The openconnect client disables DTLS if it fails to
connect. Openconnect-gui couldn't do that because of
the restrictions of openconnect_disable_dtls(). This
MR removes those restrictions and allows disabling DTLS
even if we attempted connection before.

Resolves: #697

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
14 months agoMerge branch 'priority' into 'master'
Daniel Lenski [Tue, 20 Feb 2024 19:27:59 +0000 (19:27 +0000)]
Merge branch 'priority' into 'master'

GlobalProtect: Add priority-rule set support

Closes #663

See merge request openconnect/openconnect!498

14 months agoUpdate changelog
Daniel Lenski [Sat, 30 Sep 2023 04:36:37 +0000 (21:36 -0700)]
Update changelog

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoModify `fake-gp-server.py` to add regionalized priority-rules to the gateway list
Daniel Lenski [Fri, 29 Sep 2023 20:51:07 +0000 (13:51 -0700)]
Modify `fake-gp-server.py` to add regionalized priority-rules to the gateway list

The fake GP server will now assign the connecting user to a random planet in
its portal prelogin response, then randomly and haphazardly prioritize the
gateways by planet.

For example, start fake-gp-server.py, then configure it with 3 gateways:

    $ curl -k https://localhost:8080/CONFIGURE -d gateways=Red,Orange,Yellow
    $ curl -k https://localhost:8080/CONFIGURE
    Current configuration of fake GP server configuration:
    TestConfiguration(gateways=['Red', 'Orange', 'Yellow'], ...)

Then attempt to connect to it:

    $ openconnect --protocol=gp --dump-http-traffic localhost:8080
    ...
    Greetings, user from MERCURY. Please login to this fake GP VPN portal
    Username: bar
    Password:
    POST https://localhost:8080/global-protect/getconfig.esp
    ...
    < <?xml version="1.0" encoding="UTF-8" ?>
    < <policy><version> 6.7.8-9 </version><gateways><external><list>
    < <entry name="localhost:8080">
    <   <description>Red</description>
    <   <priority-rule>
    <     <entry name="VENUS"><priority>1</priority></entry>
    <     <entry name="Any"><priority>99</priority></entry>
    <   </priority-rule>
    < </entry>
    < <entry name="localhost:8080">
    <   <description>Orange</description>
    <   <priority-rule>
    <     <entry name="JUPITER"><priority>2</priority></entry>
    <     <entry name="MARS"><priority>1</priority></entry>
    <   </priority-rule>
    < </entry>
    < <entry name="localhost:8080">
    <   <description>Yellow</description>
    <   <priority-rule>
    <     <entry name="MERCURY"><priority>1</priority></entry>
    <     <entry name="EARTH"><priority>2</priority></entry>
    <   </priority-rule>
    < </entry></list>
    < </external></gateways>
    < <hip-collection><hip-report-interval>600</hip-report-interval></hip-collection>
    < </policy>
    Portal reports GlobalProtect version 6.7.8-9; we will report the same client version.
    Portal set HIP report interval to 10 minutes).
    5 gateway servers available:
      Red (localhost:8080) [priority 99]
      Orange (localhost:8080) [unprioritized]
      Yellow (localhost:8080) [priority 1]
    Please select GlobalProtect gateway.
    GATEWAY: [Yellow|Red|Orange]:

Note that the gateways are now presented to the user in the priority order
for the user's "region" of MERCURY.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoGlobalProtect: Add priority-rule set support
Jan-Michael Brummer [Thu, 28 Sep 2023 17:46:32 +0000 (19:46 +0200)]
GlobalProtect: Add priority-rule set support

Starting from version 8.0, PAN GlobalProtect portal servers are able to send
a priority rule list for each gateway.  Per
https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClSsCAK,
the gateways can be prioritized by geographic region.

The gateways should then be presented to the user in order of geographic
priority, rather than just in their order of appearance in
policy/gateways/external/list (from the portal config XML).

How does the client know which geographic region it is in?

1. The client itself may have some way to figure out which region it is
   connecting from (e.g. geolocation, not implemented yet for OpenConnect).
2. The client may have an option to explicitly specifiy the desired region
   (not implemented yet in OpenConnect).
3. The *server* tells the client which region it thinks the client is
   connecting from, in the portal *prelogin* response, and the client
   follows that (implemented here).

Fixes: https://gitlab.com/openconnect/openconnect/-/issues/663
[DRL fixed a small mistake in qsort usage, and tweaked code structure,
comments, and log messages.]

Signed-off-by: Jan-Michael Brummer <jan-michael.brummer1@volkswagen.de>
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoMerge branch 'fix_gp_IPv6_split_include' into 'master'
Daniel Lenski [Tue, 20 Feb 2024 06:14:03 +0000 (22:14 -0800)]
Merge branch 'fix_gp_IPv6_split_include' into 'master'

14 months agoUpdate changelog
Daniel Lenski [Tue, 20 Feb 2024 06:12:20 +0000 (22:12 -0800)]
Update changelog

This bug in GlobalProtect IPv6 split-include handling was introduced in
https://gitlab.com/openconnect/openconnect/-/commit/a2b8134edf8e5f8e942dedf105e2813a0824b919;
see also
https://gitlab.com/openconnect/openconnect/-/merge_requests/367#note_1780223796.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoFix GlobalProtect config-parsing bug that misidentified IPv6 split-include routes...
Daniel Loxtermann [Tue, 20 Feb 2024 01:59:47 +0000 (17:59 -0800)]
Fix GlobalProtect config-parsing bug that misidentified IPv6 split-include routes as split-exclude

As reported on the mailing list at
https://lists.infradead.org/pipermail/openconnect-devel/2024-January/005386.html,
the relevant code wasn't handling the IPv6 case correctly.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoSend 'cas-support=yes' in GlobalProtect prelogin request
Daniel Lenski [Mon, 25 Sep 2023 14:14:37 +0000 (07:14 -0700)]
Send 'cas-support=yes' in GlobalProtect prelogin request

Per https://gitlab.com/openconnect/openconnect/-/issues/651, some newer GP
servers are responding to prelogin.esp requests with an error:

    CAS is not supported by the client.  Minimum client version is 6.0

It appears that CAS ("Central Authentication Server";
https://apereo.github.io/cas/index.html) is a standardized single-sign-on
protocol requiring an external browser.

Per https://gitlab.com/openconnect/openconnect/-/issues/651#note_1576596243,
the field 'cas-support=yes' needs to be sent in the POST *body* of the
prelogin request, in order to avoid this error message; the error message's
claim that a specific client software version is necessary isn't very
helpful.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoReal GlobalProtect SAML authentication forms won't work without JavaScript
Daniel Lenski [Tue, 26 Sep 2023 19:08:45 +0000 (12:08 -0700)]
Real GlobalProtect SAML authentication forms won't work without JavaScript

This adds a 'saml_needs_js' option to fake-gp-server.py.  If set, the fake
SAML login form that it generates won't work correctly without JavaScript
execution, just like a "real" GlobalProtect SAML server.

See 64a0ba69e53d065f4d2ba4e89e6ff10926d6c895 for the use case for this fake
SAML authentication endpoint.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
14 months agoMerge branch 'JScript' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 10 Feb 2024 13:20:34 +0000 (13:20 +0000)]
Merge branch 'JScript' into 'master'

Force the Windows script host to use the JScript engine

Closes #703

See merge request openconnect/openconnect!534

14 months agoMerge branch 'xmlstarlet' into 'master'
Dimitri Papadopoulos Orfanos [Mon, 5 Feb 2024 07:42:16 +0000 (07:42 +0000)]
Merge branch 'xmlstarlet' into 'master'

Force final newline in xmlstarlet

See merge request openconnect/openconnect!535

14 months agoForce final newline in xmlstarlet
Jon DeVree [Sat, 3 Feb 2024 17:09:58 +0000 (12:09 -0500)]
Force final newline in xmlstarlet

By default xmlstarlet does not include a final newline on the output.
Because POSIX says that all lines must end in a newline, this causes the
final line of output to be skipped by the 'while read ...' loop in bash.
Adding a '-n' after the '-v ...' causes xmlstarlet to include a final
newline at the end of its output.

Signed-off-by: Jon DeVree <nuxi@vault24.org>
14 months agoForce the Windows script host to use the JScript engine
Dimitri Papadopoulos Orfanos [Fri, 2 Feb 2024 10:31:50 +0000 (11:31 +0100)]
Force the Windows script host to use the JScript engine

This bypasses rogue programs that register as handlers
for the ".js" file extension but fail to run the script.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
14 months agoMerge branch 'gcc14-fix' into 'master'
Dimitri Papadopoulos Orfanos [Wed, 31 Jan 2024 09:04:17 +0000 (09:04 +0000)]
Merge branch 'gcc14-fix' into 'master'

Fix implicit declaration of function 'malloc'

See merge request openconnect/openconnect!533

Signed-off-by: default avatarBrahmajit Das <brahmajit.xyz@gmail.com>
14 months agoMerge branch 'main' into 'master'
Dimitri Papadopoulos Orfanos [Wed, 31 Jan 2024 08:59:26 +0000 (08:59 +0000)]
Merge branch 'main' into 'master'

main() signature compliant with C standard

See merge request openconnect/openconnect!516

14 months agoMerge branch 'tmp-external-browser' into 'master'
Nikos Mavrogiannopoulos [Wed, 31 Jan 2024 08:48:05 +0000 (08:48 +0000)]
Merge branch 'tmp-external-browser' into 'master'

configure.ac: print external browser and vpnc script

See merge request openconnect/openconnect!531

14 months agoMove <stdlib.h> around, match existing ordering
Dimitri Papadopoulos [Wed, 31 Jan 2024 08:39:17 +0000 (09:39 +0100)]
Move <stdlib.h> around, match existing ordering

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
14 months agoFix implicit declaration of function 'malloc'
Brahmajit Das [Mon, 29 Jan 2024 17:58:53 +0000 (23:28 +0530)]
Fix implicit declaration of function 'malloc'

First observed on Gentoo Linux with GCC 14. This is due to GCC 14
enabling -Werror=implicit-function-declaration by default.
Thus resulting in errors such as:

openconnect-internal.h: In function 'alloc_pkt':
openconnect-internal.h:911:27: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]
  911 |         struct pkt *pkt = malloc(alloc_len);
      |                           ^~~~~~

Plese refer gentoo bug: https://bugs.gentoo.org/923173
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
14 months agoImport translations from GNOME
David Woodhouse [Mon, 29 Jan 2024 17:46:01 +0000 (09:46 -0800)]
Import translations from GNOME

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
14 months agoMerge branch 'AppVeyor' into 'master'
Dimitri Papadopoulos Orfanos [Mon, 29 Jan 2024 16:10:18 +0000 (16:10 +0000)]
Merge branch 'AppVeyor' into 'master'

Fix compiler warnings when buliding on AppVeyor

See merge request openconnect/openconnect!532

14 months agoFix compiler warnings when buliding on AppVeyor
Dimitri Papadopoulos Orfanos [Sun, 28 Jan 2024 19:43:03 +0000 (20:43 +0100)]
Fix compiler warnings when buliding on AppVeyor

../mtucalc.c: In function 'calculate_mtu':
../mtucalc.c:75:33: warning: passing argument 4 of 'getsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
   75 |                                 &mss, &mss_size)) {
      |                                 ^~~~
      |                                 |
      |                                 int *
In file included from ../openconnect-internal.h:31,
                 from ../mtucalc.c:20:
C:/msys64/mingw64/include/winsock2.h:1010:82: note: expected 'char *' but argument is of type 'int *'
 1010 |   WINSOCK_API_LINKAGE int WSAAPI getsockopt(SOCKET s,int level,int optname,char *optval,int *optlen);
      |                                                                            ~~~~~~^~~~~~
  CC       libopenconnect_la-lzo.lo

../cstp.c: In function 'calculate_dtls_mtu':
../cstp.c:134:33: warning: passing argument 4 of 'getsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
  134 |                                 &mss, &mss_size)) {
      |                                 ^~~~
      |                                 |
      |                                 int *
In file included from ../openconnect-internal.h:31,
                 from ../cstp.c:21:
C:/msys64/mingw64/include/winsock2.h:1010:82: note: expected 'char *' but argument is of type 'int *'
 1010 |   WINSOCK_API_LINKAGE int WSAAPI getsockopt(SOCKET s,int level,int optname,char *optval,int *optlen);
      |                                                                            ~~~~~~^~~~~~

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
14 months agoconfigure.ac: print external browser and vpnc script
Nikos Mavrogiannopoulos [Sat, 27 Jan 2024 09:55:03 +0000 (10:55 +0100)]
configure.ac: print external browser and vpnc script

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
15 months agoMerge branch 'openconnect-gui' into 'master'
Nikos Mavrogiannopoulos [Thu, 25 Jan 2024 08:28:43 +0000 (08:28 +0000)]
Merge branch 'openconnect-gui' into 'master'

Update URL of OpenConnect-gui home page

See merge request openconnect/openconnect!530

15 months agoUpdate URL of OpenConnect-gui home page
Dimitri Papadopoulos Orfanos [Thu, 25 Jan 2024 08:12:00 +0000 (09:12 +0100)]
Update URL of OpenConnect-gui home page

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months agoMerge branch 'mingw-test-fix' into 'master'
Nikos Mavrogiannopoulos [Sun, 21 Jan 2024 09:17:43 +0000 (09:17 +0000)]
Merge branch 'mingw-test-fix' into 'master'

Added WINEPATH to fix MinGW CI tests

Closes #689

See merge request openconnect/openconnect!529

15 months agoAdded WINEPATH to fix MinGW CI tests
Marios Paouris [Sat, 20 Jan 2024 08:43:12 +0000 (10:43 +0200)]
Added WINEPATH to fix MinGW CI tests

Signed-off-by: Marios Paouris <mspaourh@gmail.com>
15 months agoMerge branch 'fortinet_chunk-size' into 'master'
Dimitri Papadopoulos Orfanos [Fri, 19 Jan 2024 10:54:31 +0000 (10:54 +0000)]
Merge branch 'fortinet_chunk-size' into 'master'

Be lenient when parsing HTTP chunk-size

Closes #698

See merge request openconnect/openconnect!524

15 months agoMerge branch 'tmp-nsi-merge' into 'master'
Nikos Mavrogiannopoulos [Fri, 19 Jan 2024 05:18:07 +0000 (05:18 +0000)]
Merge branch 'tmp-nsi-merge' into 'master'

nsis: create a self-contained nsi file

See merge request openconnect/openconnect!522

15 months agomain() signature compliant with C standard
Dimitri Papadopoulos Orfanos [Fri, 29 Dec 2023 10:58:21 +0000 (11:58 +0100)]
main() signature compliant with C standard

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months agoMerge branch 'report-android-as-android' into 'master'
Nikos Mavrogiannopoulos [Thu, 18 Jan 2024 05:01:17 +0000 (05:01 +0000)]
Merge branch 'report-android-as-android' into 'master'

Correctly report Android and iOS for globalprotect

See merge request openconnect/openconnect!527

15 months agoCorrectly report Android and iOS for globalprotect
Art Pinch [Tue, 16 Jan 2024 17:37:06 +0000 (20:37 +0300)]
Correctly report Android and iOS for globalprotect

Signed-off-by: Art Pinch <leonardo906@mail.ru>
15 months agoMerge branch 'tmp-latest-fedora' into 'master'
Nikos Mavrogiannopoulos [Mon, 15 Jan 2024 16:55:19 +0000 (16:55 +0000)]
Merge branch 'tmp-latest-fedora' into 'master'

Run openconnect on latest fedora (39)

See merge request openconnect/openconnect!504

15 months agoUse latest fedora (39) for CI
Nikos Mavrogiannopoulos [Tue, 21 Nov 2023 14:09:53 +0000 (15:09 +0100)]
Use latest fedora (39) for CI

This moves all CI images to Fedora39 except OpenSSL builds
that still use Fedora38 due to compatibility issues.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
15 months agoBe lenient when parsing HTTP chunk-size
Dimitri Papadopoulos Orfanos [Fri, 12 Jan 2024 16:15:10 +0000 (17:15 +0100)]
Be lenient when parsing HTTP chunk-size

Fortinet servers appear to be abusing RFC 9112:

     chunk          = chunk-size [ chunk-ext ] CRLF
                      chunk-data CRLF

     chunk-size     = 1*HEXDIG

     chunk-ext      = *( BWS ";" BWS chunk-ext-name
                         [ BWS "=" BWS chunk-ext-val ] )

They add spaces (BWS) at the end of chunk-size, even in the absence of chunk-ext.

Be lenient when parsing chunk:
1. Accept bogus chunk-ext, with ";" not followed by chunk-ext-name.
2. Discard leading/trailing spaces in chunk-size, strtol() will do that for us.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months agonsis: create self-contained nsi file
Nikos Mavrogiannopoulos [Wed, 10 Jan 2024 19:51:37 +0000 (20:51 +0100)]
nsis: create self-contained nsi file

Including from a relative path is interpreted differently
depending on where the caller is started. This allows running
nsis on the output nsi even if not located at the build directory.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
15 months agoMerge branch 'nsis_keywords' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 21:42:08 +0000 (21:42 +0000)]
Merge branch 'nsis_keywords' into 'master'

Avoid warnings while building the NSIS installer

See merge request openconnect/openconnect!513

15 months agoMerge branch 'bad_dtls_test' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 21:27:50 +0000 (21:27 +0000)]
Merge branch 'bad_dtls_test' into 'master'

bad_dtls_test: set security level to 0

See merge request openconnect/openconnect!478

15 months agoAvoid warnings while building the NSIS installer
Dimitri Papadopoulos Orfanos [Fri, 22 Dec 2023 10:53:18 +0000 (11:53 +0100)]
Avoid warnings while building the NSIS installer

warning 9100: Generating version information for language
              "1033-English" without standard key "FileVersion"
warning 9100: Generating version information for language
              "1033-English" without standard key "FileDescription"

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months agoMerge branch 'bugfix/win-external-browser-flag' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 20:40:09 +0000 (20:40 +0000)]
Merge branch 'bugfix/win-external-browser-flag' into 'master'

Support --external-browser flag on _WIN32 systems

See merge request openconnect/openconnect!489

15 months agoMerge branch 'libxml/parser' into 'master'
Dimitri Papadopoulos Orfanos [Sat, 6 Jan 2024 20:16:42 +0000 (20:16 +0000)]
Merge branch 'libxml/parser' into 'master'

Include <libxml/tree.h> from a single place

See merge request openconnect/openconnect!507

15 months agoMerge branch 'tmp-android-fixes' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 18:16:00 +0000 (18:16 +0000)]
Merge branch 'tmp-android-fixes' into 'master'

.gitlab-ci.yml: specify the toolchain image used

See merge request openconnect/openconnect!520

15 months agoInclude <libxml/tree.h> from a single place
Dimitri Papadopoulos Orfanos [Sat, 6 Jan 2024 15:48:28 +0000 (16:48 +0100)]
Include <libxml/tree.h> from a single place

<libxml/tree.h> used to be included both by "openconnect-internal.h"
and from *.c source files. We don't need both. Let's settle on including
from "openconnect-internal.h" only.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months ago.gitlab-ci.yml: specify the toolchain image used
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 15:38:46 +0000 (16:38 +0100)]
.gitlab-ci.yml: specify the toolchain image used

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
15 months agoMerge branch 'stricter_chunked_encoding_error_detection' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 12:11:27 +0000 (12:11 +0000)]
Merge branch 'stricter_chunked_encoding_error_detection' into 'master'

Stricter chunked-encoding error detection

See merge request openconnect/openconnect!468

15 months agoMerge branch 'asctime_newline' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 12:06:05 +0000 (12:06 +0000)]
Merge branch 'asctime_newline' into 'master'

Remove trailing new line returned by ctime()

Closes #598

See merge request openconnect/openconnect!469

15 months agoMerge branch 'change_default_UA_string_to_be_compatible_with_newer_Cisco_servers...
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 10:39:30 +0000 (10:39 +0000)]
Merge branch 'change_default_UA_string_to_be_compatible_with_newer_Cisco_servers' into 'master'

Change default user-agent string to be compatible with newer Cisco servers

Closes #544, #593, #602, #618, #635, #657, #662, and #665

See merge request openconnect/openconnect!497

15 months agoMerge branch 'reading' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 10:34:38 +0000 (10:34 +0000)]
Merge branch 'reading' into 'master'

Get rid of repeated "reading" in comment

See merge request openconnect/openconnect!510

15 months agoMerge branch 'mailmap' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 10:32:41 +0000 (10:32 +0000)]
Merge branch 'mailmap' into 'master'

Update .mailmap

See merge request openconnect/openconnect!512

15 months agoMerge branch 'doc_vpnc-script' into 'master'
Nikos Mavrogiannopoulos [Sat, 6 Jan 2024 10:29:30 +0000 (10:29 +0000)]
Merge branch 'doc_vpnc-script' into 'master'

Remove extraneous period from the documentation

See merge request openconnect/openconnect!515

15 months agoMerge branch 'tmp-update-uris' into 'master'
Dimitri Papadopoulos Orfanos [Fri, 5 Jan 2024 23:43:06 +0000 (23:43 +0000)]
Merge branch 'tmp-update-uris' into 'master'

www: updated links to ocserv web pages

See merge request openconnect/openconnect!517

15 months agoMerge branch 'mingw-fix' into 'master'
Dimitri Papadopoulos Orfanos [Fri, 5 Jan 2024 22:44:32 +0000 (22:44 +0000)]
Merge branch 'mingw-fix' into 'master'

use the unsigned printf qualifier for size_t : fixes MinGW{32,64} build

See merge request openconnect/openconnect!506

15 months agoMerge branch 'bugfix/cstp_sso_detect_done' into 'master'
Dimitri Papadopoulos Orfanos [Fri, 5 Jan 2024 22:41:04 +0000 (22:41 +0000)]
Merge branch 'bugfix/cstp_sso_detect_done' into 'master'

cstp: Check if uri is NULL in sso_detect_done

See merge request openconnect/openconnect!511

15 months agoRemove extraneous period from the documentation
Dimitri Papadopoulos Orfanos [Mon, 25 Dec 2023 19:47:41 +0000 (20:47 +0100)]
Remove extraneous period from the documentation

Be consistent, other ttles don't end with a period.

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
15 months agoMerge branch 'xmlReadMemory' into 'master'
Dimitri Papadopoulos Orfanos [Fri, 5 Jan 2024 22:38:31 +0000 (22:38 +0000)]
Merge branch 'xmlReadMemory' into 'master'

include <libxml/parser.h> : fix xmlReadMemory build error

Closes #685

See merge request openconnect/openconnect!505

15 months agoUpdate .mailmap
Dimitri Papadopoulos [Fri, 22 Dec 2023 10:43:23 +0000 (11:43 +0100)]
Update .mailmap

One more address to consolidate

Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>