Commit Graph
377 Commits
Author SHA1 Message Date
Tobias Brunner 307dea6b5f Use wolfSSL 5.7.4 for tests
This adds support for ML-KEM etc.
2024-11-22 14:03:17 +01:00
Tobias Brunner 2b1885b892 testing: Add TKM scenarios with multiple key exchanges 2024-09-19 14:39:13 +02:00
Stefan BerghoferandTobias Brunner 7975a0cfa4 charon-tkm: Adapt to interface changes to support multiple key exchanges
Also includes ESA flags.

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2024-09-19 14:39:13 +02:00
Tobias Brunner d759bd9efa Use wolfSSL 5.7.2 for tests 2024-07-11 15:57:12 +02:00
Maxim Uvarov dd256e730d testing: Enable error code checks for load-testconfig
Errors in load-testconfig are hidden due to not checking scp
return code and mute all errors. Add -e to trap script on
any errors in this script.

References strongswan/strongswan#2310

Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
2024-06-26 14:55:52 +02:00
Tobias Brunner 84166508f8 Use wolfSSL 5.7.0 for tests 2024-03-22 11:43:39 +01:00
Andreas Steffen 6f8275abab testing: Added RFC4806 tests 2024-03-13 15:11:00 +01:00
Tobias Brunner b7fdc10a3c Use Botan 3.3.0 for tests 2024-02-22 13:49:46 +01:00
Tobias Brunner eda91911fa Use wolfSSL 5.6.4 for tests 2023-11-03 09:28:51 +01:00
Tobias Brunner 578b561a22 Use Botan 3.2.0 for tests
This includes a change that allows checking EC keys for explicit
param encoding.
2023-10-13 09:10:46 +02:00
Tobias Brunner 5005c2e4ab testing: Use pip from venv to download dependencies
pip3 isn't installed in the base image anymore since 21bf3e41f9
("testing: Use venv for strongTNC").
2023-08-28 17:49:26 +02:00
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 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 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 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 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
Tobias Brunner e288c507b6 Use wolfSSL 5.6.0 for tests
The `--enable-heapmath` configure option has been deprecated.  As
already described in eae30af029 ("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
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
Tobias Brunner a6312f2ae9 testing: Abort kernel build if patch can't be applied 2022-12-23 10:31:14 +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
Tobias Brunner 00fd78305c Use wolfSSL 5.5.1 for tests 2022-09-28 14:55:39 +02:00
Tobias Brunner 023070b6d0 Use wolfSSL 5.5.0 for tests 2022-09-06 09:33:00 +02:00
Tobias Brunner eae30af029 Use wolfSSL 5.4.0 for tests
The 5.4.0 update changed the default bignum implementation to what
could explicitly be enabled via `--enable-sp-math-all`.  Since this uses
fixed-sized buffers sufficient for key sizes of SP_INT_BITS, with a default
of 4096, modp6144 and modp8192 didn't work anymore (wc_DhGenerateKeyPair()
returned MP_EXPTMOD_E).  So we have to adapt the feature checks for this.

To support the larger DH groups we can either increase the buffer size
via `--with-max-rsa-bits` or add `--enable-heapmath` so buffers get
(re-)allocated as needed.  We go with the latter for now.
2022-07-18 12:42:24 +02:00
Tobias Brunner 63f35993d9 testing: Use sans-serif font for test results
We could later extend the stylesheet more or even add something similar
to actual templates (e.g. a shared header/footer).
2022-05-24 08:11:56 +02:00
Tobias Brunner f62b942d6a Use wolfSSL 5.3.0 for tests 2022-05-06 12:03:48 +02:00
Tobias Brunner cc094c30d1 testing: Fix 'unsafe repository' error when accessing Git repository
A recent security fix for Git added a fatal error if the directory that
contains the .git directory is not owned by the user that runs git in
that directory tree:

  Determine strongSwan version fatal: unsafe repository ('...' is owned by someone else)

To avoid this, we call the git commands as owner of the source
directory (the script has to run as root, so this is no problem).

The user/group ID and name is now also determined via `stat(1)` so it
directly depends on the actual source dir and should work even when not
using sudo.
2022-05-02 11:09:14 +02:00
Tobias Brunner e69438450f Use wolfSSL 5.2.0 for tests 2022-02-22 09:35:01 +01:00
Tobias Brunner 1bb05006d3 Use Botan 2.19.1 for tests 2022-01-24 17:30:33 +01:00
Tobias Brunner cd0c9919d9 Use wolfSSL 5.1.1 for tests
Add --tags when fetching commits so we get tags that are not in any
branches, which is currently the case with this tag.
2022-01-04 15:47:16 +01:00
Andreas Steffen 903c68e069 sw-collector: Iterate through history logs
The logrotate function causes the apt history to be split into
several parts at arbitrary points in time. If history.log only
is parsed then some package installation changes stored in
zipped backup history files might get lost.

Thus sw-collector now searches all backup history files until
a date older than the current event stored in the collector.db
database is found, so that no entries get overlooked.
2021-12-31 14:33:22 +01:00
Andreas Steffen 54d7e39d40 wolfssl: Support of AES-CFB encryption 2021-12-06 12:53:11 +01:00
Tobias Brunner 43927e60a7 Revert "testing: Don't run tests when building tkm"
This reverts commit e74bca9e19.
2021-11-29 15:06:57 +01:00
Tobias Brunner 6b9c8a674f Revert "testing: Don't run tests when building tkm-rpc"
Let's try that again on current systems.

This reverts commit 9c2aba2735.
2021-11-29 15:06:57 +01:00
Tobias Brunner d1278ed926 Use wolfSSL 5.0.0 for tests 2021-11-02 09:41:25 +01:00
Tobias Brunner e19eb070fa Use Botan 2.18.2 for tests 2021-10-29 09:07:38 +02:00
Tobias Brunner 8c48de739d testing: Use AES and SHA-256 to protect PKCS#12 files
The -aes128 option is used when encrypting private keys read from a
PKCS#12 file, not when generating such a file.
2021-10-18 14:27:14 +02:00
Tobias Brunner 5b9c46b988 testing: Remove support for Debian jessie and FreeRADIUS 2 2021-10-01 15:05:44 +02:00