]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
4 days agoandroid: Fix typo for split-tunneling settings in managed config description
Tobias Brunner [Wed, 1 Oct 2025 12:39:53 +0000 (14:39 +0200)] 
android: Fix typo for split-tunneling settings in managed config description

We use the American spelling "tunneling" throughout the app.

5 days agoandroid: Make a certificate alias pre-selectable in managed profiles
Tobias Brunner [Tue, 30 Sep 2025 14:47:42 +0000 (16:47 +0200)] 
android: Make a certificate alias pre-selectable in managed profiles

This allows associating a pre-installed certificate/key with a VPN
profile.  For instance, one locally generated on the device via
SCEP/ETS by the MDM.  It only works if the app is granted access to the
certificate/key (alias) by the MDM.

For now, users may still select a different certificate if one is
available (since this requires the certificate to be installed as
user-selectable there might not be).

5 days agoandroid: Prompt the user to edit the profile if no certificate is selected
Tobias Brunner [Tue, 30 Sep 2025 12:19:12 +0000 (14:19 +0200)] 
android: Prompt the user to edit the profile if no certificate is selected

5 days agoandroid: Don't print "null" if no user certificate is selected
Tobias Brunner [Fri, 26 Sep 2025 11:49:53 +0000 (13:49 +0200)] 
android: Don't print "null" if no user certificate is selected

5 days agoandroid: Allow selecting a user certificate for managed profiles
Tobias Brunner [Thu, 25 Sep 2025 16:37:15 +0000 (18:37 +0200)] 
android: Allow selecting a user certificate for managed profiles

This is only enabled for profiles that are not distributed with a
certificate.

5 days agoandroid: Explicitly pull in androidx.localbroadcastmanager
Tobias Brunner [Thu, 25 Sep 2025 15:31:03 +0000 (17:31 +0200)] 
android: Explicitly pull in androidx.localbroadcastmanager

Seems to not get pulled in automatically anymore.  This has actually been
deprecated for years apparently.  Unfortunately, it's not that easy to
replace, so keep it for now.

5 days agoandroid: Remove redundant namespace and fix indentation in state fragment layout
Tobias Brunner [Mon, 4 Aug 2025 13:44:16 +0000 (15:44 +0200)] 
android: Remove redundant namespace and fix indentation in state fragment layout

5 days agoandroid: Use correct title for proxy server port field in managed configs
Tobias Brunner [Mon, 4 Aug 2025 13:42:21 +0000 (15:42 +0200)] 
android: Use correct title for proxy server port field in managed configs

5 days agoandroid: Simplify theme definition due to minSdkVersion
Tobias Brunner [Mon, 4 Aug 2025 13:39:10 +0000 (15:39 +0200)] 
android: Simplify theme definition due to minSdkVersion

5 days agoandroid: Remove obsolete TargetApi attribute
Tobias Brunner [Mon, 4 Aug 2025 13:38:26 +0000 (15:38 +0200)] 
android: Remove obsolete TargetApi attribute

5 days agoandroid: Update syntax for three values Gradle warns about
Tobias Brunner [Mon, 4 Aug 2025 13:18:02 +0000 (15:18 +0200)] 
android: Update syntax for three values Gradle warns about

Others seem to be fine or even get an explicit error if changed, like
targetSdkVersion.

5 days agoandroid: Increase targetSdkVersion to 36 (Android 16)
Tobias Brunner [Mon, 4 Aug 2025 12:50:25 +0000 (14:50 +0200)] 
android: Increase targetSdkVersion to 36 (Android 16)

5 days agoandroid: Update NDK version
Tobias Brunner [Mon, 4 Aug 2025 12:50:13 +0000 (14:50 +0200)] 
android: Update NDK version

5 days agoandroid: Apply UI changes for edge-to-edge views in Android 15+
Tobias Brunner [Mon, 4 Aug 2025 12:35:11 +0000 (14:35 +0200)] 
android: Apply UI changes for edge-to-edge views in Android 15+

When targeting Android 15, edge-to-edge is the default and when targeting
Android 16, apps can't opt-out from this anymore.  So we update our views
and enable edge-to-edge also for older versions (avoids the black bar
behind the system UI at the bottom).  For most views we just use automatic
margins via android:fitsSystemWindows (or programmatically via
setDecorFitsSystemWindows).  However, for the profile lists and log views,
we take some extra measures that allow the lists to go behind the bottom
system UI.  Appropriate padding is applied at the bottom of the lists so
the last item(s) can be scrolled into full view.

5 days agoandroid: Avoid crash if read-only profile selection dialog is hidden
Tobias Brunner [Mon, 4 Aug 2025 12:31:26 +0000 (14:31 +0200)] 
android: Avoid crash if read-only profile selection dialog is hidden

5 days agoandroid: Update dependencies
Tobias Brunner [Mon, 28 Jul 2025 12:31:27 +0000 (14:31 +0200)] 
android: Update dependencies

5 days agoandroid: Update Gradle plugin
Tobias Brunner [Mon, 28 Jul 2025 12:31:17 +0000 (14:31 +0200)] 
android: Update Gradle plugin

9 days agogithub: Use latest SonarQube action
Tobias Brunner [Fri, 26 Sep 2025 13:22:24 +0000 (15:22 +0200)] 
github: Use latest SonarQube action

Updating this although the fixed security issue only affects Windows
builds.

12 days agoRemove support for MD2
Tobias Brunner [Tue, 23 Sep 2025 12:59:37 +0000 (14:59 +0200)] 
Remove support for MD2

No part of IKE/IPsec or X.509 uses MD2 anymore, so there really is no
reason to still support it (unlike MD4 that is used in EAP-MSCHAPv2,
MD5 that's used in EAP-MD5, or SHA-1 that's used for e.g. NAT-D hashes).

It caused test vectors to fail on systems where OpenSSL is built with
MD2 support but has it disabled at runtime.

13 days agoVersion bump to 6.0.3dr1 6.0.3dr1
Andreas Steffen [Mon, 22 Sep 2025 16:57:54 +0000 (18:57 +0200)] 
Version bump to 6.0.3dr1

2 weeks agoMerge branch 'testing-trixie'
Tobias Brunner [Thu, 18 Sep 2025 09:27:38 +0000 (11:27 +0200)] 
Merge branch 'testing-trixie'

Use Debian trixie as base image for testing.

2 weeks agotesting: Add delay after qemu-nbd -c
Tobias Brunner [Mon, 18 Aug 2025 16:05:01 +0000 (18:05 +0200)] 
testing: Add delay after qemu-nbd -c

Seems that there is a delay before the disk can be used when using newer
QEMU versions (e.g. on Debian trixie). We get errors like these:

  sfdisk: cannot open /dev/nbd0: Inappropriate ioctl for device

or

  mount: /srv/strongswan-testing/build/loop: special device /dev/nbd0p1 does not exist.

A sleep before the next command seems to help.

Also see [1].

[1] https://gitlab.com/qemu-project/qemu/-/issues/1413

2 weeks agotesting: Add option to run tests without leak detective
Tobias Brunner [Fri, 15 Aug 2025 16:32:24 +0000 (18:32 +0200)] 
testing: Add option to run tests without leak detective

This new option allows to disable leak detective to reduce the runtime
during development.  Either only for the command line (swanctl, pki etc.)
or optionally also for the daemon(s).

Disabling leak detective only for the CLI tools already brings a
considerable reduction in runtime (from 48m to 38m on my dev host) as
there are many such calls in the post-test stage.  Any leaks in those
tools are also a lot less of an issue than leaks in the daemon.  So using
this during development should be fine as long as a full test run is done
regularly (in particular before releases).  Disabling leak detective
completely further reduces the runtime (to 30m on my dev host). But that
should probably only be used for functional regression tests after
verifying new code didn't introduce new leaks.

This also fixes the service script which is used for charon-tkm since
16fcdb460afd ("charon-tkm: Don't use starter/stroke with charon-tkm anymore").

2 weeks agotesting: Use Debian trixie to test TKM
Tobias Brunner [Fri, 15 Aug 2025 13:10:21 +0000 (15:10 +0200)] 
testing: Use Debian trixie to test TKM

2 weeks agotesting: Use Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 13:10:09 +0000 (15:10 +0200)] 
testing: Use Debian trixie

2 weeks agotesting: Use proper directory for slapd PID files
Tobias Brunner [Mon, 18 Aug 2025 10:43:50 +0000 (12:43 +0200)] 
testing: Use proper directory for slapd PID files

2 weeks agolibimcv: Add Debian 13 (trixie) to database
Tobias Brunner [Mon, 18 Aug 2025 10:40:18 +0000 (12:40 +0200)] 
libimcv: Add Debian 13 (trixie) to database

2 weeks agotesting: Increase memory for guest hosts to run Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:48:49 +0000 (14:48 +0200)] 
testing: Increase memory for guest hosts to run Debian trixie

While some increase was necessary anyway because the idle system requires
about 5-10 MiB more memory, the main issue is resolving the code line and
function name in case of a memory leak.  Calling addr2line requires a lot
more memory than before.  Using backtraces via libbfd doesn't help either
because the trigger is the bfd_find_nearest_line() call we use as well.
And because we'd try to resolve all symbols that way (for whitelisting),
the memory overhead would be even higher and affect every shutdown, even
if no leak occurred.  It also causes a significant time overhead (running
all tests took 75m instead of 48m).

I also tested switching to ASAN/LSAN.  The peak memory usage is slightly
higher than when using libbfd, but enabling it also increased the runtime
overhead a lot (the daemon and swanctl both required about 10-20 MiB more
memory, not just during the shutdown).

2 weeks agotesting: Add support for Debian trixie base images
Tobias Brunner [Fri, 15 Aug 2025 12:47:44 +0000 (14:47 +0200)] 
testing: Add support for Debian trixie base images

2 weeks agotesting: Use pipx to install swidGenerator on Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:46:13 +0000 (14:46 +0200)] 
testing: Use pipx to install swidGenerator on Debian trixie

We could use the same approach on bookworm (if the base image is updated),
but just use the old approach there for now.

2 weeks agotesting: Install required packages in venv of updated strongTNC
Tobias Brunner [Fri, 15 Aug 2025 12:45:13 +0000 (14:45 +0200)] 
testing: Install required packages in venv of updated strongTNC

Update revision for some dependency updates.  While python3-setuptools is
installed on the system, the venv apparently can't use it.  legacy-cgi is
required to use that old Django version with newer Python releases.

2 weeks agotesting: Update TKM RPC to be compatible with newer compilers
Tobias Brunner [Fri, 15 Aug 2025 12:43:46 +0000 (14:43 +0200)] 
testing: Update TKM RPC to be compatible with newer compilers

2 weeks agotesting: Use newer version of TKM on trixie
Tobias Brunner [Fri, 15 Aug 2025 12:40:38 +0000 (14:40 +0200)] 
testing: Use newer version of TKM on trixie

The API for libgmpada has change with 1.6 in a way that's not
backwards-compatible.  So we use a different revision that includes
the required changes depending on the Debian version.

This also adds support for esa_select(), to support seamless rekeyings,
which requires updating xfrm-ada as well.

2 weeks agotesting: Run commands in chroot in a login shell
Tobias Brunner [Fri, 15 Aug 2025 12:36:45 +0000 (14:36 +0200)] 
testing: Run commands in chroot in a login shell

Similar to the previous commit, this ensures we have the same environment
we do later on the system.

2 weeks agotesting: Start a login shell in chroot script
Tobias Brunner [Fri, 15 Aug 2025 12:34:17 +0000 (14:34 +0200)] 
testing: Start a login shell in chroot script

This ensures we have the same environment (e.g. stuff from /etc/profile.d)
as when logging in via SSH later.

2 weeks agotesting: Ignore unknown memory in leak detective
Tobias Brunner [Fri, 15 Aug 2025 13:11:48 +0000 (15:11 +0200)] 
testing: Ignore unknown memory in leak detective

This is set in two locations for systemd services and login shells. The
memory is freed by OPENSSL_cleanup().

2 weeks agoleak-detective: Include OpenSSL symbol seen on Debian trixie
Tobias Brunner [Fri, 15 Aug 2025 12:33:16 +0000 (14:33 +0200)] 
leak-detective: Include OpenSSL symbol seen on Debian trixie

2 weeks agotesting: Pass base image codename to application Makefiles
Tobias Brunner [Wed, 13 Aug 2025 12:01:08 +0000 (14:01 +0200)] 
testing: Pass base image codename to application Makefiles

Some might require it to use different revisions or commands.

2 weeks agotesting: Mount /proc in the chroot to make systemctl happy
Tobias Brunner [Wed, 13 Aug 2025 11:57:13 +0000 (13:57 +0200)] 
testing: Mount /proc in the chroot to make systemctl happy

2 weeks agotesting: Use new recommended approach to install key for custom apt repository
Tobias Brunner [Wed, 13 Aug 2025 11:54:01 +0000 (13:54 +0200)] 
testing: Use new recommended approach to install key for custom apt repository

apt-key add is deprecated (and not available in trixie) as it makes the
available for all sources.  The recommended approach makes the key very
specifically available for just our repository.

2 weeks agotesting: Remove unnecessary workaround for DHCP
Tobias Brunner [Wed, 13 Aug 2025 11:52:20 +0000 (13:52 +0200)] 
testing: Remove unnecessary workaround for DHCP

2 weeks agotesting: Move sysctl settings to sysctl.d and add some memory settings
Tobias Brunner [Wed, 13 Aug 2025 11:38:52 +0000 (13:38 +0200)] 
testing: Move sysctl settings to sysctl.d and add some memory settings

Debian trixie doesn't provide a 99-sysctl.conf symlink in that directory
anymore.  The memory settings are also useful there as the default of
one changed and overbooking helps when forking a process with large
memory footprint (e.g. the IKE daemon).

2 weeks agotesting: Remove xconsole config for rsyslogd
Tobias Brunner [Wed, 13 Aug 2025 11:37:36 +0000 (13:37 +0200)] 
testing: Remove xconsole config for rsyslogd

This produces a warning and we don't have X.

2 weeks agogithub: Use AWS-LC 1.61.1 for tests
Tobias Brunner [Thu, 18 Sep 2025 06:29:39 +0000 (08:29 +0200)] 
github: Use AWS-LC 1.61.1 for tests

2 weeks agohost: Don't try to resolve %any* keywords with mismatched address family
Tobias Brunner [Mon, 15 Sep 2025 13:56:26 +0000 (15:56 +0200)] 
host: Don't try to resolve %any* keywords with mismatched address family

While host_create_from_string_and_family() usually replaces %any*
keywords, this fails if the address family doesn't match (e.g. %any4 with
AF_INET6).  There is no point in trying to resolve these keywords via
DNS as % is no valid character for host names.

Closes strongswan/strongswan#2880

2 weeks agogithub: Use latest SonarQube action
Tobias Brunner [Mon, 15 Sep 2025 15:46:03 +0000 (17:46 +0200)] 
github: Use latest SonarQube action

2 weeks agocurl: Fix types enforced by compiler check in newer libcurl headers
Tobias Brunner [Mon, 15 Sep 2025 14:50:26 +0000 (16:50 +0200)] 
curl: Fix types enforced by compiler check in newer libcurl headers

6 weeks agoMerge branch 'plugin-versions'
Tobias Brunner [Fri, 22 Aug 2025 14:46:10 +0000 (16:46 +0200)] 
Merge branch 'plugin-versions'

This adds a symbol with the current version number to all existing
plugins (the PLUGIN_DEFINE() macro makes this easy).  The version is
checked when a plugin is loaded from a file in order to prevent loading
old plugins from any previous build, which could cause all sorts of
issues.

References strongswan/strongswan#2835

6 weeks agoplugin-loader: Check version of loaded plugins
Tobias Brunner [Mon, 11 Aug 2025 14:28:46 +0000 (16:28 +0200)] 
plugin-loader: Check version of loaded plugins

This prevents loading plugins from older builds that can cause all sorts
of issues as they might access struct members in different locations.

We don't check the version for statically linked plugins.

6 weeks agoDefine plugin version in all existing plugins
Tobias Brunner [Mon, 11 Aug 2025 14:35:32 +0000 (16:35 +0200)] 
Define plugin version in all existing plugins

6 weeks agoplugin: Add macro to define plugin version and constructor
Tobias Brunner [Mon, 11 Aug 2025 14:28:14 +0000 (16:28 +0200)] 
plugin: Add macro to define plugin version and constructor

6 weeks agoplugin-loader: Don't prevent dynamic linking in addition to static constructors
Tobias Brunner [Mon, 11 Aug 2025 13:55:03 +0000 (15:55 +0200)] 
plugin-loader: Don't prevent dynamic linking in addition to static constructors

When built with static plugins and constructors, we might still want to
be able to load external plugins.

Fixes: d860c26e9533 ("plugin-loader: Properly support compilation without dlopen()/dlsym() etc.")
6 weeks agopkcs11: Improve detection of already unwrapped CKA_EC_POINTs
Tobias Brunner [Thu, 21 Aug 2025 08:24:37 +0000 (10:24 +0200)] 
pkcs11: Improve detection of already unwrapped CKA_EC_POINTs

If an uncompressed point is already unwrapped (incorrect but some tokens/
modules do this) and therefore still looks like an ASN.1 octet string,
there could be false positives with the previous checks that lead to
mangled points.

By ensuring that we unwrapped the complete ASN.1 chunk, we can already
reduce the false positive rate when the assumed length is smaller than
the chunk, which we previously accepted but isn't the case in correctly
encoded points.

And while we already checked that the first byte indicates a valid point
type/encoding, there could still be false positives.  We can avoid those
with some checks on the length of the unwrapped point.  In particular,
enforcing a multiple of 4/8 should fail for valid unwrapped points where
three bytes were removed in the process (ASN.1 tag and length, point
encoding).

Closes strongswan/strongswan#2872

6 weeks agocharon-cmd: Cache shared secret under identities if available
Tobias Brunner [Mon, 11 Aug 2025 13:37:51 +0000 (15:37 +0200)] 
charon-cmd: Cache shared secret under identities if available

We won't have identities for private key passwords, but we do for EAP
identities and they might get reused if redirected.

6 weeks agoike-sa-manager: Avoid deadlock due to race condition during shutdown
Tobias Brunner [Mon, 11 Aug 2025 12:24:16 +0000 (14:24 +0200)] 
ike-sa-manager: Avoid deadlock due to race condition during shutdown

If an entry is added while we wait for a checked out SA in flush() (e.g.
due to an action performed by that SA), new entries might get inserted
before the one we wait for.  If that was the first entry in the row, we
didn't correctly update the table and the new entries were basically lost
by overwriting the first entry in the row.  As the SA count was still
increased but the new entries couldn't get enumerated, the daemon wasn't
terminated properly but was stuck in the loop in flush().

6 weeks agotrap-manager: Migrate tracked IKE SA in case of redirect during IKE_AUTH
Tobias Brunner [Mon, 11 Aug 2025 08:33:00 +0000 (10:33 +0200)] 
trap-manager: Migrate tracked IKE SA in case of redirect during IKE_AUTH

6 weeks agocontroller: Migrate tracked IKE SA in case of redirect during IKE_AUTH
Tobias Brunner [Mon, 11 Aug 2025 08:26:55 +0000 (10:26 +0200)] 
controller: Migrate tracked IKE SA in case of redirect during IKE_AUTH

6 weeks agoike-sa: Avoid reusing established IKE_SAs that got redirected
Tobias Brunner [Thu, 7 Aug 2025 09:56:25 +0000 (11:56 +0200)] 
ike-sa: Avoid reusing established IKE_SAs that got redirected

These will get terminated by the peer after a while.  So we don't want
to reuse them.

6 weeks agovici: Fix indentation for some add_kv() calls
Tobias Brunner [Thu, 21 Aug 2025 13:53:40 +0000 (15:53 +0200)] 
vici: Fix indentation for some add_kv() calls

6 weeks agovici: Include configured local and remote ports in list-conns
Mathias Aerts [Thu, 21 Aug 2025 10:59:00 +0000 (12:59 +0200)] 
vici: Include configured local and remote ports in list-conns

Closes strongswan/strongswan#2869

6 weeks agogithub: Only run CI for latest commit in a branch, cancel old runs
Tobias Brunner [Fri, 22 Aug 2025 10:21:50 +0000 (12:21 +0200)] 
github: Only run CI for latest commit in a branch, cancel old runs

6 weeks agolibipsec: Run unit tests with TESTS_PLUGINS if specified
Tobias Brunner [Fri, 22 Aug 2025 10:11:11 +0000 (12:11 +0200)] 
libipsec: Run unit tests with TESTS_PLUGINS if specified

6 weeks agolibtls: Fix double-free when enumerating private keys
Tobias Brunner [Fri, 22 Aug 2025 09:46:52 +0000 (11:46 +0200)] 
libtls: Fix double-free when enumerating private keys

6 weeks agotesting: Disable deprecated features in Botan
Tobias Brunner [Fri, 22 Aug 2025 06:34:01 +0000 (08:34 +0200)] 
testing: Disable deprecated features in Botan

We keep MD5 enabled for now as we need it for TLS 1.0/1.1.  Once we
remove that we can reconsider (although, it's also needed for EAP-MD5
and since MD4 is disabled as well, which means EAP-MSCHAPv2 won't
be available, we'd be left with only EAP-GTC for simple username/password
authentication, which nobody else supports).

6 weeks agobotan: Replace calls to deprecated botan_privkey|pubkey_export()
Tobias Brunner [Mon, 12 May 2025 14:14:17 +0000 (16:14 +0200)] 
botan: Replace calls to deprecated botan_privkey|pubkey_export()

6 weeks agogithub: Use OpenSSL 3.5.2 for tests
Tobias Brunner [Fri, 8 Aug 2025 08:28:06 +0000 (10:28 +0200)] 
github: Use OpenSSL 3.5.2 for tests

6 weeks agogithub: Use AWS-LC 1.58.1 for tests
Tobias Brunner [Mon, 28 Jul 2025 08:30:02 +0000 (10:30 +0200)] 
github: Use AWS-LC 1.58.1 for tests

6 weeks agoopenssl: Add support for Ed25519 via AWS-LC
Tobias Brunner [Fri, 8 Aug 2025 15:17:12 +0000 (17:17 +0200)] 
openssl: Add support for Ed25519 via AWS-LC

6 weeks agogithub: Check active transforms against reference files
Tobias Brunner [Fri, 8 Aug 2025 09:49:48 +0000 (11:49 +0200)] 
github: Check active transforms against reference files

Also collect current results so we can update reference files easily.

Enabled AES-CFB in wolfSSL as we have already support for it in the
plugin.

6 weeks agounit-tests: Add option to collect active crypto transforms
Tobias Brunner [Fri, 8 Aug 2025 09:10:29 +0000 (11:10 +0200)] 
unit-tests: Add option to collect active crypto transforms

This will allow us to compare new library versions against previous ones,
so we don't suddenly loose some algorithms like it happened with KDFs
recently after updating OpenSSL to 3.5.1.

6 weeks agocredential-factory: Avoid deadlock during unit tests
Tobias Brunner [Mon, 4 Aug 2025 08:16:31 +0000 (10:16 +0200)] 
credential-factory: Avoid deadlock during unit tests

If a unit test times out while generating a private key (e.g. because of
a lack of entropy), this avoids a deadlock by still releasing the read
lock that'd prevent acquiring the write lock when plugins are unloaded.

Closes strongswan/strongswan#2850

6 weeks agoopenssl: Simplify wrapping private key objects
Tobias Brunner [Thu, 24 Jul 2025 14:03:15 +0000 (16:03 +0200)] 
openssl: Simplify wrapping private key objects

6 weeks agoopenssl: Support EdDSA keys in PKCS#12 containers
Tobias Brunner [Thu, 24 Jul 2025 13:52:37 +0000 (15:52 +0200)] 
openssl: Support EdDSA keys in PKCS#12 containers

References strongswan/strongswan#2848

6 weeks agovici: Add support for P-CSCF server attributes
Tobias Brunner [Fri, 11 Jul 2025 06:04:26 +0000 (08:04 +0200)] 
vici: Add support for P-CSCF server attributes

Was apparently forgotten when support was added to the attr plugin
with 98a3ba8a5a16 ("attr: Add p-cscf keyword for P-CSCF server addresses").

For consistency, using an underscore like the `split*` options and not a
dash like in the attr plugin.

References strongswan/strongswan#2396

6 weeks agoeap-authenticator: Assume IKE identity as EAP-Identity if client doesn't send one
Tobias Brunner [Mon, 14 Jul 2025 16:13:04 +0000 (18:13 +0200)] 
eap-authenticator: Assume IKE identity as EAP-Identity if client doesn't send one

Apparently, some clients (e.g. native Android) just send an empty
EAP-Identity response.  We silently ignored that previously and then
used the IKE identity for the actual EAP method.  This change tries to
do something similar (i.e. don't fail if the response is empty), but by
assuming the IKE identity as EAP-Identity, we match that and possibly
can switch configs.

Closes strongswan/strongswan#2833
Fixes: 2f2e4abe3c52 ("ikev2: Add support to switch peer configs based on EAP-Identities")
2 months agogithub: Use provided actions for SonarQube installation and scan
Tobias Brunner [Mon, 4 Aug 2025 14:28:42 +0000 (16:28 +0200)] 
github: Use provided actions for SonarQube installation and scan

Also switch to the cloud cache (which doesn't seem to work either way
anyway).

2 months agocertexpire: Double size of internal buffer for identities
Tobias Brunner [Wed, 23 Jul 2025 15:10:31 +0000 (17:10 +0200)] 
certexpire: Double size of internal buffer for identities

The error-notify, lookip, and whitelist (previous commit) plugins already
use the same buffer size for identities.

2 months agowhitelist: Double the length of the id field in the messages
seantywork [Thu, 17 Jul 2025 11:29:31 +0000 (11:29 +0000)] 
whitelist: Double the length of the id field in the messages

Closes strongswan/strongswan#2842

2 months agoUse wolfSSL 5.8.2 for tests
Tobias Brunner [Sat, 19 Jul 2025 10:11:29 +0000 (12:11 +0200)] 
Use wolfSSL 5.8.2 for tests

2 months agowolfssl: Store RNG on object for curve25519
Tobias Brunner [Sat, 19 Jul 2025 10:10:25 +0000 (12:10 +0200)] 
wolfssl: Store RNG on object for curve25519

5.8.2 enables blinding for curve25519 by default, so the RNG set when
making the key is also used later on.

2 months agoml: Disable versioning for shared object
Rob Shearman [Mon, 14 Jul 2025 11:14:57 +0000 (12:14 +0100)] 
ml: Disable versioning for shared object

Avoid generating versioned shared objects which would need to be
installed along with the version-independent symlink by specifying
"-avoid-version" in the libtool LDFLAGS for the plugin. Avoid any
unwanted surprises by also specifying the "-module" option, making the
LDFLAGS consistent with all other libstrongswan plugins.

Closes strongswan/strongswan#2844

2 months agoMerge branch 'whitelist-watcher'
Tobias Brunner [Fri, 18 Jul 2025 14:16:17 +0000 (16:16 +0200)] 
Merge branch 'whitelist-watcher'

Use watcher and non-blocking I/O for client connections to avoid issues
with clients that stay connected for a long time.

Closes strongswan/strongswan#2827

2 months agowhitelist: Add error handling to socket reads and fix a memory leak
Tobias Brunner [Fri, 18 Jul 2025 10:07:45 +0000 (12:07 +0200)] 
whitelist: Add error handling to socket reads and fix a memory leak

This now adds some state (basically a message buffer), but simplifies
error handling as we don't have to handle two potential failure paths
and could avoid some potential issues by still calling the blocking
read_all().

It also fixes a memory leak when clients disconnect.

2 months agowhitelist: Use a watcher for control socket reading rather than blocking
Rob Shearman [Wed, 1 Jun 2022 18:41:08 +0000 (19:41 +0100)] 
whitelist: Use a watcher for control socket reading rather than blocking

Performing a stream read_all call (which is a blocking read) from
within the accept callback has the issue that if a whitelist client is
still connected whilst a shutdown of the charon deamon is triggered
then that shutdown won't complete gracefully due to the accept task
never exiting.

So fix shutting down gracefully by using the socket watcher rather than
a blocking read upon connection accept. Fall back to a blocking read
for partial messages to avoid the complexity associated (i.e. storing
state) for incomplete reads, which shouldn't block and cause the
original problem if the client only sends whole messages.

2 months agonm: Version bump to 1.6.3
Tobias Brunner [Mon, 14 Jul 2025 09:01:14 +0000 (11:01 +0200)] 
nm: Version bump to 1.6.3

2 months agoVersion bump to 6.0.2 6.0.2
Andreas Steffen [Sun, 13 Jul 2025 07:56:49 +0000 (09:56 +0200)] 
Version bump to 6.0.2

2 months agotesting: Use alternative approach for retransmits in ikev1/dpd-restart scenario
Tobias Brunner [Fri, 11 Jul 2025 09:45:37 +0000 (11:45 +0200)] 
testing: Use alternative approach for retransmits in ikev1/dpd-restart scenario

With a long delay, the retransmit might not get sent before further tests
are evaluated on faster machines, while more retransmits should still allow
the scenario to succeed on slower ones.

2 months agochild-cfg: Actually force narrowing TS in transport mode only as initiator
Tobias Brunner [Fri, 11 Jul 2025 06:50:30 +0000 (08:50 +0200)] 
child-cfg: Actually force narrowing TS in transport mode only as initiator

Closes strongswan/strongswan#2830

Fixes: ad1ad2159f0b ("child-cfg: Use traffic selector list")
2 months agoopenssl: Don't allocate salt if PRF/hash is unknown
Tobias Brunner [Fri, 11 Jul 2025 09:42:47 +0000 (11:42 +0200)] 
openssl: Don't allocate salt if PRF/hash is unknown

This can happen if e.g. AES-XCBC is selected.

Fixes: 2dbeecfc029b ("openssl: Fix testing KDF_PRF in the constructor with OpenSSL 3.5.1")
2 months agogithub: Shorten name for crypto-plugin job and reverse matrix arguments
Tobias Brunner [Thu, 10 Jul 2025 17:07:13 +0000 (19:07 +0200)] 
github: Shorten name for crypto-plugin job and reverse matrix arguments

This gives us more readable names in the UI.  Instead of

  crypto-plugins (ubuntu-latest, b...
  crypto-plugins (ubuntu-latest, b...
  crypto-plugins (ubuntu-latest, ...
  crypto-plugins (ubuntu-latest, ...
  crypto-plugins (ubuntu-latest, o...
  crypto-plugins (ubuntu-latest, o...

we now get

  crypto (botan, ubuntu-latest, no)
  crypto (botan, ubuntu-latest, yes)
  crypto (wolfssl, ubuntu-latest, no)
  crypto (wolfssl, ubuntu-latest, yes)
  crypto (openssl, ubuntu-latest, no)
  crypto (openssl, ubuntu-latest, yes)

2 months agoopenssl: Fix testing KDF_PRF in the constructor with OpenSSL 3.5.1
Tobias Brunner [Thu, 10 Jul 2025 16:11:19 +0000 (18:11 +0200)] 
openssl: Fix testing KDF_PRF in the constructor with OpenSSL 3.5.1

Setting the salt to NULL now fails, so we set it to hash length's zeroes,
which is the default value for HKDF-Extract if no salt is passed.

Fixes strongswan/strongswan#2828

2 months agoDoxyfile: Don't hide set_seed() method
Tobias Brunner [Tue, 8 Jul 2025 11:13:06 +0000 (13:13 +0200)] 
Doxyfile: Don't hide set_seed() method

2 months agoFixed some typos, courtesy of codespell
Tobias Brunner [Tue, 8 Jul 2025 08:54:49 +0000 (10:54 +0200)] 
Fixed some typos, courtesy of codespell

2 months agoVersion bump to 6.0.2rc1 6.0.2rc1
Andreas Steffen [Mon, 7 Jul 2025 08:57:25 +0000 (10:57 +0200)] 
Version bump to 6.0.2rc1

2 months agoNEWS: Add news for 6.0.2
Tobias Brunner [Mon, 7 Jul 2025 08:31:56 +0000 (10:31 +0200)] 
NEWS: Add news for 6.0.2

2 months agogithub: Use AWS-LC 1.55.0 for tests
Tobias Brunner [Tue, 1 Jul 2025 06:32:46 +0000 (08:32 +0200)] 
github: Use AWS-LC 1.55.0 for tests

2 months agogithub: Use OpenSSL 3.5.1 for tests
Tobias Brunner [Tue, 1 Jul 2025 12:16:49 +0000 (14:16 +0200)] 
github: Use OpenSSL 3.5.1 for tests

2 months agovici: Allow backlog size configuration via compile option
Thomas Egerer [Wed, 2 Jul 2025 10:46:30 +0000 (12:46 +0200)] 
vici: Allow backlog size configuration via compile option

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2 months agogithub: Make sure at least one run with the same content is not skipped
Tobias Brunner [Mon, 7 Jul 2025 09:55:01 +0000 (11:55 +0200)] 
github: Make sure at least one run with the same content is not skipped

3 months agoVersion bump to 6.0.2dr3 6.0.2dr3
Andreas Steffen [Thu, 3 Jul 2025 09:43:53 +0000 (11:43 +0200)] 
Version bump to 6.0.2dr3