1248 Commits

Author SHA1 Message Date
Andreas Steffen
edd3c797b0 testing: Negotiate TLS 1.3 for part of the EAP-TLS scenarios 2023-03-02 09:02:38 +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
Tobias Brunner
cf6f56f619 Fixed some typos, courtesy of codespell 2022-12-22 19:03:37 +01: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
Andreas Steffen
bf3f678551 testing: Fixed two issues 2022-09-06 21:14:07 +02:00
Andreas Steffen
e4cb9a59d2 testing: Fixed typo of mfg1 to mgf1 plugin 2022-08-26 12:31:33 +02:00
Tobias Brunner
96c7692661 wolfssl: Implement prf+ via wolfSSL's HKDF implementation 2022-04-14 19:02:56 +02:00
Tobias Brunner
cb8f924051 botan: Implement prf+ via Botan's HKDF implementation 2022-04-14 19:02:56 +02:00
Tobias Brunner
3a52fc83f8 testing: Load kdf plugin in all scenarios that require it
Once we use plugin-provided prf+() these won't work otherwise.
2022-04-14 19:02:48 +02:00
Tobias Brunner
6910347d1a testing: Add DSCP scenario that uses simple labels
Instead of creating two IKE_SAs with different identities, this scenario
uses simple labels to select the correct child config.
2022-04-14 18:42:01 +02:00
Andreas Steffen
85d626e9ae testing: Modified ikev2/net2net-rfc3779 scenario 2022-01-10 21:14:11 +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
f0935a63ed testing: Optimized plugin use in pkcs8 scenarios 2021-10-23 11:44:15 +02:00
Andreas Steffen
9c7288d6f1 testing: Minimum required plugins for net2net-pkcs12 scenarios 2021-10-22 11:39:20 +02:00
Andreas Steffen
8cc89b505e testing: Correctly remove pkcs8 key after test case 2021-10-18 11:45:31 +02:00
Tobias Brunner
bc51815839 testing: Determine Debian version in TNC scenarios automatically again
Was statically set to 10 since f3d96b7bc9e2 ("Version bump to 5.9.1dr1").
2021-10-01 15:05:44 +02:00
Tobias Brunner
1ec01f10a2 testing: Replace arp with ip neigh
The net-tools package, which provides arp and other older utilities like
ifconfig, is not installed anymore on Debian bullseye.
2021-10-01 15:05:44 +02:00
Tobias Brunner
ccac9c3047 testing: Allow DNS via TCP in net2net-dnscert scenario
New versions of Bind limit the maximum UDP message size to 1232 bytes,
which is the same that newer versions of libunbound propose as maximum via
EDNS in requests, so increasing the limit on the server wouldn't help.

Instead we allow DNS via TCP so the client can switch after receiving the
truncated UDP response.
2021-10-01 15:05:44 +02:00
Tobias Brunner
5b9c46b988 testing: Remove support for Debian jessie and FreeRADIUS 2 2021-10-01 15:05:44 +02:00
Tobias Brunner
6467f0416f testing: Fix updown script in route-based/net2net-xfrmi-ike scenario
With the update to Python 3 the encoding of the values in vici messages
changed to bytestrings (the keys are properly decoded).  And getting the
first CHILD_SA also needs a change.

The logger is now also initialized after daemonizing to avoid that opened
sockets are closed etc.
2021-09-21 12:50:12 +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
23e46ea5ab ikev2: Only request reauth during IKE_AUTH if active reauth is not possible
If we can initiate the reauthentication ourselves, there is no reason to
explicitly request the peer to do so (at basically the same time).
2021-08-24 14:31:55 +02:00
Tobias Brunner
f6aafb3005 Fixed some typos, courtesy of codespell
Main change is the conversion from the British cancelling/-ed to the
American canceling/-ed.
2021-06-25 11:32:29 +02:00
Andreas Steffen
4baca5ca80 testing: Fixed ikev2/farp scenario 2021-06-22 12:32:35 +02:00
Andreas Steffen
eba2622587 testing: Migrate ikev2-stroke-bye scenarios to vici 2021-06-22 10:23:06 +02:00
Andreas Steffen
706c58b291 testing: Fixed pretest script of ikev1/rw-psk-aggressive scenario 2021-06-21 12:03:36 +02:00
Tobias Brunner
6d8890767c testing: Migrate ikev2/host2host-transport-nat scenario to vici
This also restores the test as it was before the referenced commit so it
again, as written in the description, demonstrates that venus is unable
to ping sun without IPsec tunnel.

Fixes: f27fb58ae0ec ("testing: Update description and test evaluation of host2host-transport-nat")
2021-06-21 12:03:36 +02:00
Tobias Brunner
2b5c743952 testing: Migrate MOBIKE tests to vici
Note that the mobike-nat test has been removed as it basically did the same
as the mobike-virtual-ip-nat test.  Instead, the mobike-nat-mapping scenario
is added, which simulates a NAT router restart.
2021-06-21 12:03:36 +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
Andreas Steffen
66ba50b217 testing: Migrated p2pnat/medsrv-psk scenario to vici 2021-03-30 22:12:00 +02:00
Andreas Steffen
03e1272ff2 testing: Migrated p2pnat/behind-same-nat scenario to vici 2021-03-30 22:12:00 +02:00
Andreas Steffen
2cbf7da51a testing: Migrated redirect-active scenario to vici 2021-03-30 22:12:00 +02:00
Andreas Steffen
511b860916 testing: Migrated ha/both-active scenario to vici 2021-03-30 18:57:49 +02:00
Andreas Steffen
5c22e94f0f testing: Migrated ha/active-passive scenario to vici 2021-03-30 18:57:49 +02:00
Andreas Steffen
737f7fce51 testing: Switched PTS measurements to /usr/sbin
Due to Debian 10 linking /bin to /usr/bin which drastically
increased the number of files in /bin, the PTS measurement
was switched to /usr/sbin with a lesser number of files.
2021-03-23 10:54:48 +01:00
Andreas Steffen
20c47af319 testing: Use TLS 1.3 in TNC PT-TLS tests 2021-02-21 09:48:34 +01:00
Andreas Steffen
9f55246018 testing: Added mgf1 plugin to load statement 2021-02-19 17:41:44 +01:00
Tobias Brunner
d5606ec350 testing: Adapt some checks as SHA-384 is now preferred for TLS signatures 2021-02-18 12:02:54 +01:00
Andreas Steffen
0d43b39931 testing: extended sleep time tkm/xfrmproxy tests 2021-02-12 09:44:00 +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
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
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
Tobias Brunner
a6f0e19bf5 Fixed some typos, courtesy of codespell 2020-11-04 10:06:46 +01:00
Andreas Steffen
f3d96b7bc9 Version bump to 5.9.1dr1 2020-10-07 16:54:32 +02:00