338 Commits

Author SHA1 Message Date
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 e74bca9e1952cfe4f27f68afeb72be2af56a1256.
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 9c2aba2735b5b54a892b50e2224008bc0cde4267.
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
Tobias Brunner
dff5a0cab8 testing: Support build with Debian bullseye base image 2021-10-01 15:05:44 +02:00
Andreas Steffen
3e2841572b testing: Switch to Python 3
Both swidGenerator and strongTNC were migrated to Python 3.
This allows to migrate all testing scripts to Python 3, too.
2021-09-21 09:47:43 +02:00
Tobias Brunner
e6a904de69 testing: Fix build of tkm and tkm-rpc 2021-08-17 19:20:45 +02:00
Tobias Brunner
4ae9b482f2 Ignore android-* tags when using git describe 2021-07-14 10:31:52 +02:00
Tobias Brunner
2f9114bce1 Use wolfSSL 4.8.0 for tests 2021-07-13 10:19:56 +02:00
Tobias Brunner
2cd5314de7 testing: Use specific versions of swidGenerator and strongTNC
This way we get updated versions automatically (referencing "master"
required manually deleting the downloaded archives and the unpacked
directories).  It also allows switching versions when working in different
branches (note that REV can also be set to a commit ID, e.g. to test
changes before tagging them later and merging the branch).
2021-06-30 16:17:39 +02:00
Tobias Brunner
19611b1d28 testing: Build wolfSSL from the Git repository
Use the same configure options etc. for both builds (no need for the cert
options as we don't use TLS or X.509 parsing) and switch to a Git commit
that includes the SHA-3 OID fix (it's actually the fix itself).
2021-06-22 17:54:15 +02:00
Adrian-Ken Rueegsegger
859dedeab7 testing: Update Anet to version 0.4.2 2021-06-17 09:53:51 +02:00
Stefan Berghofer
22e7900718 charon-tkm: Delegate encryption/decryption of IKE traffic to TKM
Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2021-06-17 09:53:51 +02:00
Andreas Steffen
cc4338267e testing: Added openssl-ikev2/net2net-sha3-rsa-cert scenario 2021-06-03 14:20:06 +02:00
Andreas Steffen
de5ca4021a testing: Test wolfssl plugin 2021-06-03 10:22:59 +02:00
Andreas Steffen
7c5a2974b9 testing: Reorganizing IKEv1 and IKEv2 examples
For documentation purposes the new folders ikev1-algs, ikev2-algs,
ikev1-multi-ca and ikev2-multi-ca have been created. Most of the
test cases have now been converted to the vici interface. The
remaining legacy stroke scenarios yet to be converted have been put
into the ikev2-stroke-bye folder.

For documentation purposes some legacy stroke scenarios will be kept
in the ikev1-stroke, ikev2-stroke and ipv6-stroke folders.
2021-05-21 09:42:50 +02:00
Tobias Brunner
d4c337a42f Use Botan 2.18.0 for tests 2021-05-07 14:48:17 +02:00
Noel Kuntze
5191c2b063 testing: Make sure $SHAREDDIR exists before mounting it
Closes strongswan/strongswan#344.
2021-05-06 17:21:59 +02:00
Andreas Steffen
68154033bb testing: Store mars credentials in the swanctl directory 2021-03-30 22:12:00 +02:00
Tobias Brunner
cc25d2195a testing: Copy /etc/resolv.conf from host in chroot script
This makes installing packages etc. easier.
2021-02-11 16:41:06 +01:00
Коренберг Марк
d8e4a2a777 identification: Change abbreviation for surname/serialNumber RDNs
To align with RFC 4519, section 2.31/32, the abbreviation for surname
is changed to "SN" that was previously used for serialNumber, which does
not have an abbreviation.

This mapping had its origins in the X.509 patch for FreeS/WAN that was
started in 2000.  It was aligned with how OpenSSL did this in earlier
versions.  However, there it was changed already in March 2002 (commit
ffbe98b7630d604263cfb1118c67ca2617a8e222) to make it compatible with
RFC 2256 (predecessor of RFC 4519).

Co-authored-by: Tobias Brunner <tobias@strongswan.org>

Closes strongswan/strongswan#179.
2021-01-18 17:41:37 +01:00
Tobias Brunner
5ef10ec326 testing: Add scenarios that use a CA with two intermediate CA certificates
Mainly to test TKM's ability for handling multiple CAs and that the
received intermediate CA certificates are passed in the right order.
But also added a regular scenario where two intermediate CA certificates
are sent by one of the clients.
2021-01-11 15:28:10 +01:00
Tobias Brunner
16fcdb460a charon-tkm: Don't use starter/stroke with charon-tkm anymore
For the tests, the unused init script that was used before switching to
charon-systemd is repurposed to manage the daemon.
2021-01-11 15:28:01 +01:00
Tobias Brunner
b322539ef5 charon-tkm: Deinitialize IKE tkm-rpc client
This is necessary if tkm-rpc supports multiple parallel client requests.
2021-01-08 17:22:37 +01:00
Adrian-Ken Rueegsegger
a0a0571bd1 charon-tkm: Reverse cert chain processing order
Verify certificate chains starting from the root CA certificate and
moving towards the leaf/user certificate.

Also update TKM-RPC and TKM in testing scripts to version supporting the
reworked CC handling.
2021-01-08 17:22:36 +01:00
Adrian-Ken Rueegsegger
532023dcf1 testing: Use latest TKM RPC library
Brings some cleanups and minor improvements.
2021-01-08 17:22:36 +01:00
Adrian-Ken Rueegsegger
eccca505aa testing: Use multi-CA aware TKM
Also add CA ID to tkm_keymanager command.
2021-01-08 17:22:36 +01:00
Adrian-Ken Rueegsegger
d6cf4a165b testing: Add CA ID mappings to TKM tests
Extend the build-certs-chroot script is to fill in the public key
fingerprint of the CA certificate in the appropriate strongswan.con
files.
2021-01-08 17:22:36 +01:00
Adrian-Ken Rueegsegger
524751ae76 testing: Switch to https for codelabs recipes 2021-01-08 17:22:36 +01:00
Tobias Brunner
fde5374a86 testing: Explicitly encode backing image format in metadata
Apparently, there is no probing anymore in newer versions of qemu due
to security considerations.
2021-01-08 11:39:44 +01:00
Tobias Brunner
b58740996f testing: Use build-strongswan to implement build-rootimage 2020-11-27 12:05:22 +01:00
Tobias Brunner
88c94063d2 testing: Make building guest images after strongSwan optional
This is basically only for the build-rootimage use case.
2020-11-27 12:05:22 +01:00
Tobias Brunner
386e9a96a1 testing: Optionally build strongSwan from a release tarball
This will allow us to replace the build-rootimage script.
2020-11-27 12:05:22 +01:00
Tobias Brunner
a7d920059e testing: Optionally replace root image when building strongSwan 2020-11-27 12:05:22 +01:00
Tobias Brunner
c1dc7c4149 testing: Optionally use a new strongSwan build directory
This can be useful when building completely different versions for the
first time to avoid issues with build artifacts of previous builds.
2020-11-27 12:05:22 +01:00
Tobias Brunner
543d09c4b4 testing: Add option to build all software recipes when building strongSwan
This is like building the root image but using a specific strongSwan
source tree, which is helpful if code changes depend on other software
packages (e.g. TKM-related or testing new crypto libraries).  If the script
is called and the root image does not exist, the new option is enabled
automatically.

The option to build in a specific guest image is now also moved to an
explicit command line option so that the source dir path is the only
remaining positional argument (see --help for details).
2020-11-27 12:05:22 +01:00
Tobias Brunner
edc55f0876 testing: Create root image if it does not exist yet when building strongSwan
This allows running the script directly after building the base image.
2020-11-27 12:05:22 +01:00
Tobias Brunner
29c59885ca Use Botan 2.17.1 for tests 2020-11-27 12:05:22 +01:00
Tobias Brunner
1c2f5eea2c testing: Improve building different revisions of Git-recipes
If we check out and build a certain revision of a dependency in a branch and
switch to another that requires a different revision and then switch back,
the previous approach installed the wrong revision as it would incorrectly
assume the required revision was already built and ready to install.
2020-11-27 12:05:22 +01:00
Tobias Brunner
60caa4f6c6 testing: Use silent rules to build strongSwan 2020-10-27 16:42:00 +01:00
Tobias Brunner
78015d14ac Use Botan 2.16.0 for tests 2020-10-07 12:38:52 +02:00
Tobias Brunner
64148f046e testing: Fix dependency issue with strongTNC
Apparently, djangorestframework-camel-case, in the referenced version,
uses `six` but does not itself require/install it (later versions removed
Python 2 support altogether).
2020-09-04 14:56:58 +02:00
Tobias Brunner
1f97415fe7 testing: Use latest x509-ada release
This fixes an issue with newer compiler versions where crashes would be
caused if functions of the generated C X.509 parser are not aligned.
2020-09-03 15:24:37 +02:00