Commit Graph
19631 Commits
Author SHA1 Message Date
Tobias Brunner ba2bc3f4fe vici: Add event listener of Python bindings to release tarball
Fixes: 4e065a9624 ("vici: Add decorators to Python bindings to simplify listening for events")
2025-10-24 15:15:45 +02:00
Tobias Brunner d3a05165d4 NEWS: Add news for 6.0.3 2025-10-17 17:20:13 +02:00
Tobias Brunner eaf0c22e8e Fixed some typos, courtesy of codespell 2025-10-17 17:20:13 +02:00
Tobias Brunner 7c74925fa1 pkcs11: Fix comment
Fixes: e9fa338e23 ("pkcs11: Improve detection of already unwrapped CKA_EC_POINTs")
2025-10-17 17:20:13 +02:00
Tobias Brunner 6b6bec7295 Merge branch 'python-decorators'
Adds decorators to simplify listening for events.

References strongswan/strongswan#2772
2025-10-16 15:05:22 +02:00
Tobias Brunner 4840507d7a vici: Allow callers of listen() to distinguish between disconnects and intended breaks 2025-10-08 16:53:01 +02:00
Tobias Brunner 8bfdf2fb60 vici: Export timeout in event listener of Python bindings
This allows running periodic tasks (e.g. check some outside condition)
and stop listening by raising the StopListening exception.
2025-10-07 09:22:40 +02:00
Tobias Brunner 79da117283 vici: Provide a way to stop listening and re-connect in Python bindings
This allows re-connecting to a new session in a disconnect listener and
continue listening without having to return from listen().  The exception
can also be used to stop listening after some condition (e.g. to wait
until a specific SA got created and then stop).
2025-10-07 09:22:38 +02:00
Tobias Brunner 4e065a9624 vici: Add decorators to Python bindings to simplify listening for events 2025-10-07 09:20:57 +02:00
Tobias Brunner a24429c678 appveyor: Change OpenSSL directory on Windows Server 2019 image
The default OpenSSL version has changed to 1.1.1 and the -v111 dir was
removed.
2025-10-06 14:45:49 +02:00
Tobias Brunner 404111b46f Merge branch 'vici-alerts'
Exposes alerts via vici protocol.

Closes strongswan/strongswan#2894
2025-10-02 10:22:51 +02:00
Martin Willi f5f04b7d20 bus: Clarify that ALERT_TS_NARROWED is issued for local narrowing as well 2025-10-02 10:22:36 +02:00
Martin Willi 86a50d1618 child-create: Raise an ALERT_TS_MISMATCH when receiving TS_UNACCEPTABLE
When sending a TS_UNACCEPTABLE notify, a ALERT_TS_MISMATCH is sent, but
not when receiving one. This seems inconsistent compared to proposal
mismatch handling, so extend the child_create task to raise such an alert.
2025-10-02 10:22:36 +02:00
Martin Willi d46529fe2d vici: Raise alert events from the bus alert listener hook
The bus alert infrastructure is currently exposed through the error-notify
plugin using a dedicated socket using a rather archaic message format.
Vici clients would need a dedicated socket connection just to receive such
alert messages, making their implementation more complex.

With vici, it is rather trivial to expose bus alerts through a dedicated
event message that vici clients may subscribe to. Add such an "alert"
event type to vici. Alert names are mapped to strings for simple consumption by
clients.

For now, the error-notify string message is omitted from events, as it mostly
contains static information without much value; instead add the IKE_SA details
for alerts associated to an IKE_SA. Other alert specific data may be added in
the future if needed; preferably using a structured format instead of the
arbitrary string messages used by error-notify. To allow future extensions,
wrap IKE_SA details under a dedicated "ike-sa" property.
2025-10-02 10:22:32 +02:00
Tobias Brunner b83aed1362 libtls: Use correct constant in error message
Closes strongswan/strongswan#2896

Fixes: e731396280 ("tls-server: Check if peer sent hash and signature algorithms")
2025-10-02 10:02:49 +02:00
Tobias Brunner eb2d8768d8 github: Use OpenSSL 3 for macOS builds and enable additional plugins
The Homebrew formula has been using OpenSSL 3 for a while.  The eap-peap
and pkcs11 plugins also have been enabled in the formula.  The dhcp plugin
is enabled to test the port (the farp plugin was already enabled since
its port to FreeBSD/macOS).  The drbg plugin is enabled to run the ML-KEM
test vectors.
2025-10-02 09:03:37 +02:00
Tobias Brunner 6a55de1fa2 github: Build on macOS 14 instead of the deprecated macOS 13
While macos-13 was running on Intel, both macos-latest (macOS 15) and
macos-14 run on ARM64.  While there are Intel-based images for 14 and 15,
they will only be available until August 2027 (and there aren't any Intel
devices anymore anyway).
2025-10-01 19:08:51 +02:00
Tobias Brunner d0770e5362 github: Use OpenSSL 3.6.0 for tests 2025-10-01 19:08:49 +02:00
Tobias Brunner 61daa338c7 vici: Remove deprecated license classifier in Python metadata 2025-10-01 19:08:34 +02:00
Tobias Brunner bfed29705e Merge branch 'android-updates'
This fixes GUI-related compatibility issues with Android 16 and allows
(pre-)selecting on-device certificates/keys with managed profiles.  Also
fixes a typo in the managed config description that prevented
split-tunneling settings from working.
2025-10-01 15:19:18 +02:00
Tobias Brunner 74a4700b6d android: New release after updating target SDK and allowing cert selection in managed profiles 2025-10-01 15:18:27 +02:00
Tobias Brunner ce8b5ff394 android: Fix typo for split-tunneling settings in managed config description
We use the American spelling "tunneling" throughout the app.
2025-10-01 14:47:02 +02:00
Tobias Brunner cde39f4c1a 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).
2025-09-30 16:51:08 +02:00
Tobias Brunner 11f043c3de android: Prompt the user to edit the profile if no certificate is selected 2025-09-30 16:51:08 +02:00
Tobias Brunner 1a16b2c0cb android: Don't print "null" if no user certificate is selected 2025-09-30 11:26:41 +02:00
Tobias Brunner 4918e681ee android: Allow selecting a user certificate for managed profiles
This is only enabled for profiles that are not distributed with a
certificate.
2025-09-30 11:26:41 +02:00
Tobias Brunner eac76a1a5a 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.
2025-09-30 11:26:41 +02:00
Tobias Brunner e26d974fe3 android: Remove redundant namespace and fix indentation in state fragment layout 2025-09-30 11:26:40 +02:00
Tobias Brunner 357b93e99d android: Use correct title for proxy server port field in managed configs 2025-09-30 11:26:40 +02:00
Tobias Brunner 3bf34f1cd5 android: Simplify theme definition due to minSdkVersion 2025-09-30 11:26:40 +02:00
Tobias Brunner 13426bd2ea android: Remove obsolete TargetApi attribute 2025-09-30 11:26:40 +02:00
Tobias Brunner 59b74c767a android: Update syntax for three values Gradle warns about
Others seem to be fine or even get an explicit error if changed, like
targetSdkVersion.
2025-09-30 11:26:40 +02:00
Tobias Brunner 19ef347628 android: Increase targetSdkVersion to 36 (Android 16) 2025-09-30 11:26:40 +02:00
Tobias Brunner 86508cdf2b android: Update NDK version 2025-09-30 11:26:40 +02:00
Tobias Brunner 2404b2bee6 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.
2025-09-30 11:26:40 +02:00
Tobias Brunner 216a9dbb8d android: Avoid crash if read-only profile selection dialog is hidden 2025-09-30 11:26:40 +02:00
Tobias Brunner 3eb2f58a51 android: Update dependencies 2025-09-30 11:26:40 +02:00
Tobias Brunner ff5fc29285 android: Update Gradle plugin 2025-09-30 11:26:40 +02:00
Tobias Brunner b1275f26a6 github: Use latest SonarQube action
Updating this although the fixed security issue only affects Windows
builds.
2025-09-26 15:34:28 +02:00
Tobias Brunner b3011e8e87 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.
2025-09-23 15:59:35 +02:00
Andreas Steffen 2b13873c0f Version bump to 6.0.3dr1 2025-09-22 18:57:54 +02:00
Tobias Brunner 7af0caeee1 Merge branch 'testing-trixie'
Use Debian trixie as base image for testing.
2025-09-18 11:27:38 +02:00
Tobias Brunner 1043fa32de 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
2025-09-18 11:13:32 +02:00
Tobias Brunner e9ebe49d44 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
16fcdb460a ("charon-tkm: Don't use starter/stroke with charon-tkm anymore").
2025-09-18 11:13:32 +02:00
Tobias Brunner 906205b7ee testing: Use Debian trixie to test TKM 2025-09-18 11:13:32 +02:00
Tobias Brunner a0a5bd7669 testing: Use Debian trixie 2025-09-18 11:13:32 +02:00
Tobias Brunner f3cc9bec18 testing: Use proper directory for slapd PID files 2025-09-18 11:13:32 +02:00
Tobias Brunner d8a1747fa1 libimcv: Add Debian 13 (trixie) to database 2025-09-18 11:13:32 +02:00
Tobias Brunner 3aa7e1d418 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).
2025-09-18 11:13:32 +02:00
Tobias Brunner 1767ba2a13 testing: Add support for Debian trixie base images 2025-09-18 11:13:32 +02:00