]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
8 months agoandroid: New release after updating target SDK to 33 android-2.4.2
Tobias Brunner [Tue, 29 Aug 2023 16:09:33 +0000 (18:09 +0200)] 
android: New release after updating target SDK to 33

8 months agoandroid: Increase compile-/targetSdkVersion to 33 (Android 13)
Tobias Brunner [Tue, 29 Aug 2023 15:57:29 +0000 (17:57 +0200)] 
android: Increase compile-/targetSdkVersion to 33 (Android 13)

8 months agoandroid: Request permission to display notifications on Android 13
Tobias Brunner [Tue, 29 Aug 2023 15:45:32 +0000 (17:45 +0200)] 
android: Request permission to display notifications on Android 13

Note that displaying the notification for the background service is
apparently not strictly necessary.  So it's fine if the user wants to
hide it.  That the service is running can still be seen in the task
manager (pull down the status drawer twice, there is a bullet with a number
at the bottom if the service is running).

Simply use the system dialog.  If the user denies it twice, it won't show
up again.  The explanation dialog would not show up the first time (i.e.
shouldShowRequestPermissionRationale() returns false), only once the user
denied the permission once.  Currently seems like a bit much work
as we don't need the user to allow notifications.

8 months agoandroid: Compile OpenSSL with hardware acceleration
Tobias Brunner [Tue, 29 Aug 2023 15:41:46 +0000 (17:41 +0200)] 
android: Compile OpenSSL with hardware acceleration

8 months agoandroid: Use new sockets to determine source IP
Tobias Brunner [Wed, 17 May 2023 08:17:14 +0000 (10:17 +0200)] 
android: Use new sockets to determine source IP

Particularly on Samsung devices, the connect() call to dissolve the
previous connection on an existing socket via AF_UNSPEC does fail in
some situations with ECONNREFUSED:

  [KNL] failed to disconnect socket: Connection refused

While creating a new socket is potentially a bit more overhead, this
should avoid the issue.

Closes strongswan/strongswan#1691

8 months agotesting: Use pip from venv to download dependencies
Tobias Brunner [Mon, 28 Aug 2023 15:49:26 +0000 (17:49 +0200)] 
testing: Use pip from venv to download dependencies

pip3 isn't installed in the base image anymore since 21bf3e41f94a
("testing: Use venv for strongTNC").

9 months agokernel-pfroute: Maintain virtual flag when repopulating interface addrs
Tobias Brunner [Tue, 25 Jul 2023 08:21:40 +0000 (10:21 +0200)] 
kernel-pfroute: Maintain virtual flag when repopulating interface addrs

When adding a virtual IP on a TUN interface, the interface might get
activated (in terms of receiving the event) after we've already set the
virtual flag for the added address.  As the activation repopulates the
addresses on the interface, this cleared the flag and the address would
no longer be treated as virtual IP when installing routes for CHILD_SAs
that reference it in their local traffic selectors.

Closes strongswan/strongswan#1807

9 months agoMerge branch 'netlink-buf'
Tobias Brunner [Wed, 26 Jul 2023 13:15:24 +0000 (15:15 +0200)] 
Merge branch 'netlink-buf'

Fixes an infinite loop if e.g. Netlink event sockets get too many
packets queued and poll() just returns POLLERR for the socket.  Also
increases the default receive buffer size for Netlink sockets to better
support systems with lots of route updates.

Closes strongswan/strongswan#1757

9 months agowatcher: Change handling of POLLERR and remove WATCHER_EXCEPT
Tobias Brunner [Fri, 21 Jul 2023 08:01:41 +0000 (10:01 +0200)] 
watcher: Change handling of POLLERR and remove WATCHER_EXCEPT

We can't actually explicitly listen for errors by passing POLLERR in
`events` (the man page for poll() clearly states it's ignored).  On the
other hand, POLLERR can be returned for any FD and, even worse, it might
be the only event indicated.

The latter caused an infinite loop as we didn't notify the callback nor
clear the error by calling `getsockopt(..., SOL_SOCKET, SO_ERROR, ...)`.
And while the latter would be able to reset the state to break the loop,
it seems to leave the FD in a defunct state where no further events will
be returned by poll().  Notifying the callback works better (the error
is then reported by e.g. recvfrom()) and automatically happened already
if POLLERR was returned together with e.g. POLLIN.

So we now treat POLLERR like the other error indicators we handle (POLLHUP
and POLLINVAL) and just notify the callbacks.

9 months agokernel-netlink: Also set the receive buffer size on event sockets
Tobias Brunner [Fri, 21 Jul 2023 07:39:09 +0000 (09:39 +0200)] 
kernel-netlink: Also set the receive buffer size on event sockets

This was weirdly overlooked and could cause issues e.g. on hosts with
lots of route changes.

9 months agokernel-netlink: Increase the default receive buffer size
Tobias Brunner [Fri, 21 Jul 2023 07:34:22 +0000 (09:34 +0200)] 
kernel-netlink: Increase the default receive buffer size

Also simplify how we try to exceed the system-wide maximum.  We basically
just try to force the value and simply fall back to the regular call.
The kernel actually won't let the latter fail if the value is too big,
it just caps it at the internal maximum.

9 months agoike: Fix untracking IKE_SA_INITs with non-zero MIDs and SPIs as half-open SAs
Tobias Brunner [Wed, 5 Jul 2023 08:41:11 +0000 (10:41 +0200)] 
ike: Fix untracking IKE_SA_INITs with non-zero MIDs and SPIs as half-open SAs

We track all IKE_SA_INIT requests as half-open IKE_SAs but didn't
correctly untrack them if their message ID or responder SPI was non-zero.

References strongswan/strongswan#1775

Fixes: b866ee88bf54 ("ike: Track unprocessed initial IKE messages like half-open IKE_SAs")
9 months agochild-rekey: Correctly encode protocol/SPI in CHILD_SA_NOT_FOUND notify
Tobias Brunner [Wed, 21 Jun 2023 13:57:38 +0000 (15:57 +0200)] 
child-rekey: Correctly encode protocol/SPI in CHILD_SA_NOT_FOUND notify

As specified in RFC 7296, section 2.25:

   The SA that the initiator attempted to rekey is indicated by the SPI
   field in the Notify payload, which is copied from the SPI field in
   the REKEY_SA notification.

So we copy that and the protocol verbatim.

9 months agonotify-payload: Add methods to simplify encoding and retrieving IKE SPIs
Tobias Brunner [Thu, 16 Mar 2023 14:42:11 +0000 (15:42 +0100)] 
notify-payload: Add methods to simplify encoding and retrieving IKE SPIs

The get_spi_data() method is currently not used, so that has been
simplified so it can be used for any protocol type and any SPI length.
Same for set_spi_data(), which is currently used for IKEv1 to encode
two SPIs.

9 months agosha3: Make sure to wipe the internal Keccak state
Tobias Brunner [Tue, 11 Jul 2023 09:59:46 +0000 (11:59 +0200)] 
sha3: Make sure to wipe the internal Keccak state

9 months agopki: Make sure to wipe decrypted PKCS#7 data
Tobias Brunner [Tue, 11 Jul 2023 09:44:35 +0000 (11:44 +0200)] 
pki: Make sure to wipe decrypted PKCS#7 data

9 months agopkcs12: Make sure to wipe potentially decrypted PKCS#7 data
Tobias Brunner [Tue, 11 Jul 2023 09:44:11 +0000 (11:44 +0200)] 
pkcs12: Make sure to wipe potentially decrypted PKCS#7 data

9 months agopkcs7: Make sure to wipe decrypted content
Tobias Brunner [Tue, 11 Jul 2023 09:39:49 +0000 (11:39 +0200)] 
pkcs7: Make sure to wipe decrypted content

9 months agoaesni: Make sure to wipe salt
Tobias Brunner [Tue, 11 Jul 2023 09:35:09 +0000 (11:35 +0200)] 
aesni: Make sure to wipe salt

9 months agoccm: Make sure to wipe salt
Tobias Brunner [Tue, 11 Jul 2023 09:34:48 +0000 (11:34 +0200)] 
ccm: Make sure to wipe salt

9 months agogcm: Make sure to wipe salt and H
Tobias Brunner [Tue, 11 Jul 2023 09:30:44 +0000 (11:30 +0200)] 
gcm: Make sure to wipe salt and H

9 months agocharon-nm: Use configured interface name if available
Tobias Brunner [Fri, 23 Jun 2023 10:13:31 +0000 (12:13 +0200)] 
charon-nm: Use configured interface name if available

If connection.interface-name is configured, we use that instead of the
randomly generated name.

References strongswan/strongswan#1747

9 months agocharon-nm: Also log basic connection details
Tobias Brunner [Fri, 23 Jun 2023 10:07:34 +0000 (12:07 +0200)] 
charon-nm: Also log basic connection details

9 months agocharon-nm: Actually use the created XFRM interface
Tobias Brunner [Fri, 23 Jun 2023 10:04:14 +0000 (12:04 +0200)] 
charon-nm: Actually use the created XFRM interface

The created XFRM interface was not actually used (no interface IDs on the
SAs, no routes via interface).  It was basically treated like the dummy
TUN device.  To actually install the routes via XFRM interface, we have
to create it before we install the SAs and policies, signal_ip_config()
happens too late.  We also have to mark the ESP packets the same as IKE
the packets to avoid a routing loop if the server's IP is included in
the remote traffic selector (in particular if it's 0.0.0.0/0 or ::/0).

Fixes: 58f278f93239 ("charon-nm: Use an XFRM interface if available")
9 months agoUse Botan 3.1.1 for tests
Tobias Brunner [Fri, 14 Apr 2023 07:30:35 +0000 (09:30 +0200)] 
Use Botan 3.1.1 for tests

The all-zero Ed25519 public key is rejected by botan_pubkey_check_key()
when the key is loaded.

Note that Botan 3 requires GCC 11 or CLANG 14, i.e. can't easily be built
on Debian bullseye or Ubuntu 20.04.

The thread-local storage function gets flagged via various botan FFI
functions when using Botan 3, whitelist that instead of all of them.

9 months agoMerge branch 'testing-bookworm'
Tobias Brunner [Wed, 26 Jul 2023 11:07:37 +0000 (13:07 +0200)] 
Merge branch 'testing-bookworm'

Use Debian bookworm as base image for testing.

9 months agotesting: Format total time in a more readable way
Tobias Brunner [Wed, 26 Jul 2023 11:05:56 +0000 (13:05 +0200)] 
testing: Format total time in a more readable way

9 months agotesting: Change memory allocation for alice and winnetou and switch to MiB
Tobias Brunner [Fri, 14 Jul 2023 12:30:14 +0000 (14:30 +0200)] 
testing: Change memory allocation for alice and winnetou and switch to MiB

The services running on alice seem to require a bit more memory with
Debian bookworm, so increase the memory allocation.  But at the same
time reduce winnetou's allocation by the same amount as it really doesn't
require that much memory.

The unit change makes it easier to read.

9 months agotesting: Hardcode /testresults mount point in winnetou's fstab
Tobias Brunner [Thu, 20 Jul 2023 13:29:35 +0000 (15:29 +0200)] 
testing: Hardcode /testresults mount point in winnetou's fstab

Because do-tests runs the restore-defaults script, fstab would get reset
to the default version and the mount point wouldn't be available anymore
after stopping and restarting the guests (unless the guest images were
rebuilt in between).

9 months agotesting: Copy guest-specific files after default files
Tobias Brunner [Thu, 20 Jul 2023 13:28:51 +0000 (15:28 +0200)] 
testing: Copy guest-specific files after default files

This allows overriding some files per guest.

9 months agotesting: Use Debian 12 (bookworm)
Tobias Brunner [Wed, 28 Jun 2023 13:56:28 +0000 (15:56 +0200)] 
testing: Use Debian 12 (bookworm)

9 months agotesting: Use Debian bookworm to test TKM
Tobias Brunner [Thu, 13 Jul 2023 08:47:51 +0000 (10:47 +0200)] 
testing: Use Debian bookworm to test TKM

9 months agotesting: Update TKM dependencies to fix compilation with newer GNAT versions
Tobias Brunner [Wed, 28 Jun 2023 13:55:21 +0000 (15:55 +0200)] 
testing: Update TKM dependencies to fix compilation with newer GNAT versions

9 months agotesting: Add support for Debian bookworm base images
Tobias Brunner [Wed, 28 Jun 2023 13:54:54 +0000 (15:54 +0200)] 
testing: Add support for Debian bookworm base images

By default, rsyslog is not installed anymore to avoid storing everything
twice (since journald is the default).  If this becomes an issue, we
could delete /var/log/journal to only log via rsyslog.

9 months agotesting: Use venv for strongTNC
Tobias Brunner [Wed, 28 Jun 2023 13:52:57 +0000 (15:52 +0200)] 
testing: Use venv for strongTNC

Also updated to a newer version to fix dependency issues.

9 months agotesting: Install python-daemon via Debian package
Tobias Brunner [Wed, 28 Jun 2023 13:49:32 +0000 (15:49 +0200)] 
testing: Install python-daemon via Debian package

System-wide installation via pip isn't easily possible anymore on Debian
bookworm, so just use the Debian package for this (is available in old
releases as well).

9 months agolibimcv: Add Debian 12 (bookworm) to database
Tobias Brunner [Tue, 27 Jun 2023 17:03:32 +0000 (19:03 +0200)] 
libimcv: Add Debian 12 (bookworm) to database

Because libcrypto and libssl are measured, we need a new group for Debian
versions with OpenSSL 3 (I've rather added a suffix to the old group as
that could eventually get removed, although we might need a 3.1 variant
in the future - maybe we should measure some other files?).

9 months agotesting: Fix vici updown script on Debian bookworm
Tobias Brunner [Tue, 27 Jun 2023 16:45:53 +0000 (18:45 +0200)] 
testing: Fix vici updown script on Debian bookworm

OOM-killer is now already triggered with `import daemon`, so set the
limit before that.  Also some PEP8 fixes (including an exclusion for
the above fix as that causes imports to not be at the beginning of the
file).

9 months agotesting: Whitelist all Git repositories in the root image
Tobias Brunner [Tue, 27 Jun 2023 16:41:42 +0000 (18:41 +0200)] 
testing: Whitelist all Git repositories in the root image

Without this, Git refuses to operate on the build dirs that are mounted
with weird ownership.  When running as root in the chroot, Git checks
SUDO_UID, which won't match.

9 months agotesting: Create traditional RSA keys with OpenSSL 3
Tobias Brunner [Tue, 27 Jun 2023 16:40:24 +0000 (18:40 +0200)] 
testing: Create traditional RSA keys with OpenSSL 3

This is necessary because TKM can't read PKCS#8 files and in some
scenarios we don't have the pkcs8 plugin loaded that would be required
to read/decrypt the non-traditional files.

9 months agotesting: Fix systemctl wrapper and adapt enabling services on winnetou
Tobias Brunner [Tue, 27 Jun 2023 16:01:29 +0000 (18:01 +0200)] 
testing: Fix systemctl wrapper and adapt enabling services on winnetou

The wrapper called the command twice for any unit but "strongswan" and
it didn't return the correct exit code.  This was noticed when an
if-updown script tried to check if systemd-resolved is active and always
succeeded, which caused failing attempts to configure it.

But now that the return code is correct, trying to enable bind9 won't
fail silently anymore if the unit doesn't exist (similar on older systems
for named), so this is adapted.

9 months agotesting: Remove support for Debian stretch
Tobias Brunner [Mon, 26 Jun 2023 12:36:03 +0000 (14:36 +0200)] 
testing: Remove support for Debian stretch

9 months agoleak-detective: Whitelist C++'s __cxa_get_globals()
Tobias Brunner [Mon, 26 Jun 2023 12:30:01 +0000 (14:30 +0200)] 
leak-detective: Whitelist C++'s __cxa_get_globals()

9 months agotesting: Switch to MDB backend for OpenLDAP (slapd)
Tobias Brunner [Mon, 26 Jun 2023 12:25:35 +0000 (14:25 +0200)] 
testing: Switch to MDB backend for OpenLDAP (slapd)

The BDB and HDB backends were long deprecated and have finally been
removed with OpenLDAP 2.5 that's shipped with Debian bookworm.

9 months agotesting: Configure curve25519-sha256 as key exchange for SSH
Tobias Brunner [Mon, 26 Jun 2023 12:20:14 +0000 (14:20 +0200)] 
testing: Configure curve25519-sha256 as key exchange for SSH

With Debian bookworm, the PQC KE sntrup761x25519-sha512 is negotiated, by
default.  This increases the overhead significantly, in particular, the
size of the KE message, which wouldn't get through IPsec tunnels without
MSS clamping.

9 months agosonarcloud: Update filter rules as recommended
Tobias Brunner [Wed, 12 Jul 2023 09:21:27 +0000 (11:21 +0200)] 
sonarcloud: Update filter rules as recommended

9 months agotesting: Fix example configure options for charon-tkm Docker build
Tobias Brunner [Tue, 11 Jul 2023 16:02:13 +0000 (18:02 +0200)] 
testing: Fix example configure options for charon-tkm Docker build

Fixes: b1ce8772367f ("charon-tkm: Use built-in plugins instead of OpenSSL")
10 months agoUse wolfSSL 5.6.3 for tests
Tobias Brunner [Wed, 21 Jun 2023 13:31:53 +0000 (15:31 +0200)] 
Use wolfSSL 5.6.3 for tests

10 months agodhcp: Fix warning with newer compilers
Tobias Brunner [Fri, 16 Jun 2023 07:35:12 +0000 (09:35 +0200)] 
dhcp: Fix warning with newer compilers

10 months agoresolve: Maintain order of DNS servers also when installing in resolv.conf
Tobias Brunner [Fri, 16 Jun 2023 11:46:17 +0000 (13:46 +0200)] 
resolve: Maintain order of DNS servers also when installing in resolv.conf

This always writes the complete set of DNS servers to make modifications
simpler.

10 months agoresolve: Try to maintain the order of DNS servers if using resolvconf
Tobias Brunner [Thu, 15 Jun 2023 15:54:08 +0000 (17:54 +0200)] 
resolve: Try to maintain the order of DNS servers if using resolvconf

Since 17fd304e60df ("resolve: Don't install individual servers via
resolvconf"), DNS servers were sorted if getting installed via resolvconf.
In some setups the order might be important (even though relying on it
isn't a good idea in general as stub resolvers are free to use all of
the servers as they please).

10 months agocharon-svc: Add missing closing parenthesis in version output
Tobias Brunner [Mon, 19 Jun 2023 12:54:06 +0000 (14:54 +0200)] 
charon-svc: Add missing closing parenthesis in version output

10 months agoUse wolfSSL 5.6.2 for tests
Tobias Brunner [Tue, 13 Jun 2023 08:13:10 +0000 (10:13 +0200)] 
Use wolfSSL 5.6.2 for tests

ECC keys can now be smaller so we can't access the private key directly
anymore.

10 months agoVersion bump to 5.9.11 5.9.11
Andreas Steffen [Mon, 12 Jun 2023 05:50:02 +0000 (07:50 +0200)] 
Version bump to 5.9.11

10 months agoVersion bump to 5.9.11rc1 5.9.11rc1
Andreas Steffen [Thu, 8 Jun 2023 08:42:17 +0000 (10:42 +0200)] 
Version bump to 5.9.11rc1

10 months agoNEWS: Add news for 5.9.11
Tobias Brunner [Fri, 2 Jun 2023 13:46:57 +0000 (15:46 +0200)] 
NEWS: Add news for 5.9.11

10 months agopki: Add --label options to --est* command synopsis
Tobias Brunner [Fri, 2 Jun 2023 10:55:07 +0000 (12:55 +0200)] 
pki: Add --label options to --est* command synopsis

Also fixes some formatting in the man pages.

10 months agogithub: Use new cache storage properties for sonarcloud
Tobias Brunner [Fri, 2 Jun 2023 09:37:06 +0000 (11:37 +0200)] 
github: Use new cache storage properties for sonarcloud

10 months agoopenssl: Fix memory leak if FIPS provider isn't available
Tobias Brunner [Fri, 2 Jun 2023 09:27:39 +0000 (11:27 +0200)] 
openssl: Fix memory leak if FIPS provider isn't available

10 months agoFixed some typos, courtesy of codespell
Tobias Brunner [Fri, 2 Jun 2023 08:19:32 +0000 (10:19 +0200)] 
Fixed some typos, courtesy of codespell

10 months agocredential-manager: Improve selection of local certificate and trust chain
Tobias Brunner [Fri, 12 May 2023 16:36:30 +0000 (18:36 +0200)] 
credential-manager: Improve selection of local certificate and trust chain

The previous code was problematic if a certificate request for a known
but unrelated CA was received and the local trust chain was incomplete.
Due to the received anchor, the incomplete trust chain was dismissed and
any intermediate CA certificates were, therefore, not sent to the peer.

This new approach doesn't dismiss an incomplete trust chain, but prefers
one that can be resolved to a received anchor.  If no such chain is found,
the first one is used.

11 months agogithub: Use OpenSSL 3.1.1 for tests
Tobias Brunner [Wed, 31 May 2023 13:45:02 +0000 (15:45 +0200)] 
github: Use OpenSSL 3.1.1 for tests

11 months agoMerge branch 'libipsec-raw-esp'
Tobias Brunner [Tue, 23 May 2023 11:19:57 +0000 (13:19 +0200)] 
Merge branch 'libipsec-raw-esp'

This adds support for sending/receiving ESP packets without UDP
encapsulation to libipsec and kernel-libipsec.  Only Linux is currently
supported and the feature is disabled by default.

11 months agotesting: Add libipsec scenarios that exchange raw ESP packets
Tobias Brunner [Mon, 15 May 2023 13:55:30 +0000 (15:55 +0200)] 
testing: Add libipsec scenarios that exchange raw ESP packets

11 months agokernel-libipsec: Add support to send/receive raw ESP packets
Tobias Brunner [Thu, 11 May 2023 16:34:58 +0000 (18:34 +0200)] 
kernel-libipsec: Add support to send/receive raw ESP packets

This is currently only supported on Linux and with the appropriate
permissions.

Since it's experimental, it's disabled by default.

The log messages for each sent and received ESP message are logged in NET
like the ones in the socket-default plugin for UDP-encapsulated messages.

11 months agolibipsec: Move restrictions regarding UDP encapsulation to users
Tobias Brunner [Thu, 11 May 2023 15:04:00 +0000 (17:04 +0200)] 
libipsec: Move restrictions regarding UDP encapsulation to users

11 months agolibipsec: Instruct ESP sender whether to use UDP encapsulation
Tobias Brunner [Thu, 11 May 2023 14:56:07 +0000 (16:56 +0200)] 
libipsec: Instruct ESP sender whether to use UDP encapsulation

11 months agoandroid: Use CALLBACK for libipsec-related callbacks
Tobias Brunner [Thu, 11 May 2023 14:21:07 +0000 (16:21 +0200)] 
android: Use CALLBACK for libipsec-related callbacks

11 months agokernel-libipsec: Use CALLBACK for libipsec callbacks
Tobias Brunner [Thu, 11 May 2023 14:17:09 +0000 (16:17 +0200)] 
kernel-libipsec: Use CALLBACK for libipsec callbacks

11 months agoipsec-sa: Store whether to use UDP encapsulation on the SA
Tobias Brunner [Thu, 11 May 2023 13:46:03 +0000 (15:46 +0200)] 
ipsec-sa: Store whether to use UDP encapsulation on the SA

11 months agoMerge branch 'libipsec-trap'
Tobias Brunner [Tue, 23 May 2023 11:17:19 +0000 (13:17 +0200)] 
Merge branch 'libipsec-trap'

This adds support for trap policies to libipsec.

11 months agotesting: Add libipsec/net2net-trap scenario
Tobias Brunner [Thu, 4 May 2023 14:00:37 +0000 (16:00 +0200)] 
testing: Add libipsec/net2net-trap scenario

11 months agokernel-libipsec: Forward acquires from libipsec to the daemon
Tobias Brunner [Thu, 4 May 2023 12:42:53 +0000 (14:42 +0200)] 
kernel-libipsec: Forward acquires from libipsec to the daemon

11 months agoipsec-processor: Trigger acquire if no matching outbound SA is found
Tobias Brunner [Thu, 4 May 2023 12:32:49 +0000 (14:32 +0200)] 
ipsec-processor: Trigger acquire if no matching outbound SA is found

11 months agoipsec-sa-mgr: Optionally keep track of acquires for outbound SAs
Tobias Brunner [Thu, 4 May 2023 12:20:09 +0000 (14:20 +0200)] 
ipsec-sa-mgr: Optionally keep track of acquires for outbound SAs

Currently just based on the reqid.  An acquire for the same reqid is
triggered at most every 10 seconds (gets ignored in trap_manager_t if
the SA is still getting established).

Entries are only cleaned up if an SA is eventually installed (similar to
the allocated SPIs).  Should that ever be a problem, we could probably
schedule a job that regularly flushes old entries.

11 months agolibipsec: Add possibility to relay acquire events
Tobias Brunner [Fri, 20 Sep 2013 06:43:46 +0000 (08:43 +0200)] 
libipsec: Add possibility to relay acquire events

Keeping it simple and just forwarding the reqid.

11 months agoike: Use a struct to store retransmission settings
Tobias Brunner [Tue, 2 May 2023 15:54:07 +0000 (17:54 +0200)] 
ike: Use a struct to store retransmission settings

The calculation of the timeout is also shared now and the total
timeout in seconds is corrected in case retransmit_base is <= 1.

This could make it easier in the future to apply different retransmission
settings to messages/exchanges.

11 months agopki: Make --dn optional for certificate renewals via --scep command
Tobias Brunner [Thu, 11 May 2023 10:29:10 +0000 (12:29 +0200)] 
pki: Make --dn optional for certificate renewals via --scep command

When using OpenXPKI, the subject DN in the renewal request has to match
the previous DN exactly.  However, because OpenXPKI may add a bunch of
DC/O RDNs to subjects of issued certificates, running --scep with the
same --dn that was used for the original request won't work (results in
a "Client error / malformed request badRequest" error even after enabling
`renewal_via_pkcs_req`).  This simplifies renewals as --dn can just be
omitted and extracted from the original certificate to avoid this issue.

References strongswan/strongswan#1689

11 months agoMerge branch 'debug-level-build'
Tobias Brunner [Tue, 16 May 2023 10:48:22 +0000 (12:48 +0200)] 
Merge branch 'debug-level-build'

This fixes the build with DEBUG_LEVEL < 4, which was broken when building
from the repository since --enable-warnings was made the default.

Although, most issues only occurred with the level reduced to 0/-1.  And
while removing debug statements at compile time completely is probably
not useful in production, there might be use cases in certain benchmarking
scenarios.  Also, with the recent changes to the controller there should
only rarely be a listener registered at a higher log level so the overhead
for those higher-level DBG statements is minimal.

Anyway, reducing the log level at compile time is a documented feature and
at least DEBUG_LEVEL=3 could be useful to prevent leaking sensitive
information via logs from the outset.  So we should make sure compilation
doesn't fail.

11 months agogithub: Add build with DBG completely disabled
Tobias Brunner [Mon, 1 May 2023 10:35:08 +0000 (12:35 +0200)] 
github: Add build with DBG completely disabled

11 months agosec-updater: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Tue, 2 May 2023 12:16:02 +0000 (14:16 +0200)] 
sec-updater: Fix build with DEBUG_LEVEL < 1

11 months agosw-collector: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Tue, 2 May 2023 12:15:43 +0000 (14:15 +0200)] 
sw-collector: Fix build with DEBUG_LEVEL < 1

11 months agoconftest: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:31:45 +0000 (12:31 +0200)] 
conftest: Fix build with DEBUG_LEVEL < 1

11 months agopki: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:28:03 +0000 (12:28 +0200)] 
pki: Fix build with DEBUG_LEVEL < 1

11 months agoselinux: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:18:46 +0000 (12:18 +0200)] 
selinux: Fix build with DEBUG_LEVEL < 1

11 months agoradattr: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:29:36 +0000 (12:29 +0200)] 
radattr: Fix build with DEBUG_LEVEL < 1

11 months agosystime-fix: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:17:25 +0000 (12:17 +0200)] 
systime-fix: Fix build with DEBUG_LEVEL < 1

11 months agokernel-netlink: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 10:16:12 +0000 (12:16 +0200)] 
kernel-netlink: Fix build with DEBUG_LEVEL < 2

11 months agoha: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:14:57 +0000 (12:14 +0200)] 
ha: Fix build with DEBUG_LEVEL < 1

11 months agodhcp: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:12:54 +0000 (12:12 +0200)] 
dhcp: Fix build with DEBUG_LEVEL < 1

11 months agotnc-ifmap: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:28:51 +0000 (12:28 +0200)] 
tnc-ifmap: Fix build with DEBUG_LEVEL < 2

11 months agoeap-peap: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:27:48 +0000 (12:27 +0200)] 
eap-peap: Fix build with DEBUG_LEVEL < 1

11 months agoeap-ttls: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:23:58 +0000 (12:23 +0200)] 
eap-ttls: Fix build with DEBUG_LEVEL < 1

11 months agoeap-radius: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:11:32 +0000 (12:11 +0200)] 
eap-radius: Fix build with DEBUG_LEVEL < 1

11 months agoeap-dynamic: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:22:05 +0000 (12:22 +0200)] 
eap-dynamic: Fix build with DEBUG_LEVEL < 2

11 months agoeap-mschapv2: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:10:11 +0000 (12:10 +0200)] 
eap-mschapv2: Fix build with DEBUG_LEVEL < 1

11 months agovici: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 10:06:59 +0000 (12:06 +0200)] 
vici: Fix build with DEBUG_LEVEL < 2

11 months agoforecast: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:16:15 +0000 (12:16 +0200)] 
forecast: Fix build with DEBUG_LEVEL < 2

11 months agosave-keys: Fix build with DEBUG_LEVEL < 0
Tobias Brunner [Wed, 3 May 2023 08:52:14 +0000 (10:52 +0200)] 
save-keys: Fix build with DEBUG_LEVEL < 0

11 months agomode-config: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:05:59 +0000 (12:05 +0200)] 
mode-config: Fix build with DEBUG_LEVEL < 1