2033 Commits

Author SHA1 Message Date
Tobias Brunner
36b1a6d76c 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.
2023-07-26 13:09:22 +02:00
Tobias Brunner
4ba857930c testing: Format total time in a more readable way 2023-07-26 13:06:40 +02:00
Tobias Brunner
99bd7ca2fd 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.
2023-07-20 15:59:49 +02:00
Tobias Brunner
732909ce1e 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).
2023-07-20 15:59:21 +02:00
Tobias Brunner
872781734d testing: Copy guest-specific files after default files
This allows overriding some files per guest.
2023-07-20 15:59:21 +02:00
Tobias Brunner
79ad33bfba testing: Use Debian 12 (bookworm) 2023-07-13 12:41:51 +02:00
Tobias Brunner
043e10ebb8 testing: Use Debian bookworm to test TKM 2023-07-13 12:41:51 +02:00
Tobias Brunner
dee9bfb682 testing: Update TKM dependencies to fix compilation with newer GNAT versions 2023-07-13 10:48:53 +02:00
Tobias Brunner
6f7fdcadd1 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
21bf3e41f9 testing: Use venv for strongTNC
Also updated to a newer version to fix dependency issues.
2023-07-13 10:48:53 +02:00
Tobias Brunner
9b8f26b407 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).
2023-07-13 10:48:53 +02:00
Tobias Brunner
995d7785b9 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).
2023-07-13 10:48:53 +02:00
Tobias Brunner
744955f8ce 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
e0f0f812c7 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
6b8b67be81 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
c1dbce29ed testing: Remove support for Debian stretch 2023-07-13 10:48:53 +02:00
Tobias Brunner
e604947df8 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
ab13c1c808 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.
2023-07-13 10:48:53 +02:00
Tobias Brunner
46d98bc249 testing: Fix example configure options for charon-tkm Docker build
Fixes: b1ce8772367f ("charon-tkm: Use built-in plugins instead of OpenSSL")
2023-07-11 18:02:13 +02:00
Tobias Brunner
4c2747fbfc Use wolfSSL 5.6.3 for tests 2023-06-21 15:31:53 +02:00
Tobias Brunner
43975f33ef Use wolfSSL 5.6.2 for tests
ECC keys can now be smaller so we can't access the private key directly
anymore.
2023-06-13 10:13:29 +02:00
Andreas Steffen
4e1dc0a224 Version bump to 5.9.11 2023-06-12 07:50:02 +02:00
Andreas Steffen
0ba7aefdc9 Version bump to 5.9.11rc1 2023-06-08 10:42:17 +02:00
Tobias Brunner
5db9b26e32 testing: Add libipsec scenarios that exchange raw ESP packets 2023-05-23 13:19:47 +02:00
Tobias Brunner
cb049e14c8 testing: Add libipsec/net2net-trap scenario 2023-05-23 11:53:53 +02:00
Andreas Steffen
b420857123 Version bump to 5.9.11dr3 2023-04-21 16:36:23 +02:00
Andreas Steffen
ef94a5b4ab Version bump to 5.9.11dr2 2023-04-19 04:24:18 +02:00
Tobias Brunner
e288c507b6 Use wolfSSL 5.6.0 for tests
The `--enable-heapmath` configure option has been deprecated.  As
already described in eae30af029b1 ("Use wolfSSL 5.4.0 for tests"), the
alternative is to configure `--with-max-rsa-bits=8192` instead in order
to test the modp6144 and modp8192 DH groups.
2023-03-30 10:32:45 +02:00
Andreas Steffen
67e9cb161d Version bump to 5.9.11dr1 2023-03-28 16:27:04 +02:00
Tobias Brunner
6abad65cd7 testing: Fix installation of swid-generator with newer versions of setuptools
With version 60.0.0 setuptools changed to a local installation of
distutils.  This seems to break the installation of swid-generator (causing
an `importlib.metadata.PackageNotFoundError: swid-generator` error).

Note that while Debian ships setuptools 52.0.0, `python-daemon` recently
added a dependency on `setuptools>=62.4.0`, which installs that version
that's then later used to install swid-generator.

The main difference seems to be that the local version installs the
package in `/usr/lib/python3.9/site-packages`, while the stdlib version
does so in `/usr/local/lib/python3.9/dist-packages` (similarly for the
`swid_generator` script and the `distro` dependency).

Not sure if there is a better/proper way to fix this.  Might just be an
issue with Debian bullseye and mixing system packages with those installed
via pip3.
2023-03-28 13:05:26 +02:00
Andreas Steffen
c0ae81fc83 Version bump to 5.9.10 2023-03-02 09:58:24 +01:00
Andreas Steffen
edd3c797b0 testing: Negotiate TLS 1.3 for part of the EAP-TLS scenarios 2023-03-02 09:02:38 +01:00
Andreas Steffen
350101abad Version bump to 5.9.10rc1 2023-02-22 20:00:18 +01:00
Tobias Brunner
bc1a5111bb testing: Add a failing client to the ikev2/rw-eap-tls-only scenario 2023-02-22 17:10:03 +01:00
Tobias Brunner
e1ff1eefcf kernel-netlink: Add manager for XFRM interfaces
The manager will allow charon-nm to create XFRM interfaces if supported
by the kernel instead of creating an unused dummy TUN interface.

The xfrmi tool is mostly obsolete nowadays as iproute2 supports creating
XFRM interfaces since 5.1.0 (2019-05).  Older Debians don't ship that and
early versions didn't list the interface IDs.  So there might still be
some uses for this tool.
2023-02-22 13:37:45 +01:00
Andreas Steffen
0c7bfec7af Version bump to 5.9.9 2023-01-01 11:55:50 +01:00
Andreas Steffen
7928deece1 Version bump to 5.9.9rc2 2022-12-23 11:19:06 +01:00
Tobias Brunner
a6312f2ae9 testing: Abort kernel build if patch can't be applied 2022-12-23 10:31:14 +01:00
Tobias Brunner
cf6f56f619 Fixed some typos, courtesy of codespell 2022-12-22 19:03:37 +01:00
Andreas Steffen
4aa5868d8e Version bump to 5.9.9rc1 2022-12-22 13:24:34 +01:00
Tobias Brunner
cb6516cc0a Use wolfSSL 5.5.4 for tests 2022-12-21 16:41:36 +01:00
Andreas Steffen
8329455628 testing: Check canonical OCSP/CRL serial numbers 2022-12-05 20:18:24 +01:00
Tobias Brunner
977ab29fc1 Use Botan 2.19.3 for tests 2022-11-28 16:02:25 +01:00
Tobias Brunner
c1250c56ae testing: Use HTTPS for strongSwan tarballs 2022-11-28 15:57:57 +01:00
Tobias Brunner
4242c81243 testing: Fix URL for kernel patches 2022-11-28 15:55:31 +01:00
Tobias Brunner
7db77fd32b Use wolfSSL 5.5.3 for tests 2022-11-10 16:15:36 +01:00
Andreas Steffen
e09bc70d12 Version bump to 5.9.8 2022-10-03 16:16:53 +02:00
Tobias Brunner
00fd78305c Use wolfSSL 5.5.1 for tests 2022-09-28 14:55:39 +02:00
Andreas Steffen
ef93c7e2ea Version bump to 5.9.8rc1 2022-09-26 10:34:04 +02:00
Tobias Brunner
5ce1c91b58 ikev2: Trigger ike_updown() event after all IKE-specific tasks ran
This makes sure the event is only triggered after the IKE_SA is fully
established and e.g. virtual IPs, additional peer addresses or
a modified reauth time (on the initiator) are assigned to it.  This was
e.g. a problem for the selinux plugin if virtual IPs are used.

We use a separate task to trigger the event that's queued before the
child-create task so the event is triggered before the child_updown()
event.  Same goes for the state change to IKE_ESTABLISHED.

A new condition is used to indicate the successful completion of all
authentication rounds, so we don't have to set the IKE_ESTABLISHED state
in the ike-auth task (it was used as condition in other tasks).

Since set_state() also sets the rekey and reauth times, this required
some minor changes in regards to how AUTH_LIFETIME notifies are handled.
2022-09-23 16:28:35 +02:00