testing: Add TKM scenarios with multiple key exchanges

This commit is contained in:
Tobias Brunner
2024-09-19 14:39:13 +02:00
parent 5a8f0767b8
commit 2b1885b892
19 changed files with 316 additions and 6 deletions
@@ -0,0 +1,17 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
ke_mapping {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
start-scripts {
swanctl = /usr/local/sbin/swanctl --load-all --noprompt
}
}
@@ -0,0 +1,26 @@
# pre-generated and modified as tkm_cfgtool doesn't support multiple KEs yet
connections {
conn1 {
local_addrs=192.168.0.1
remote_addrs=192.168.0.2
proposals=aes256-sha512-modp3072-ke1_modp4096
local {
id=moon.strongswan.org
certs=moonCert.pem
}
remote {
id=sun.strongswan.org
}
children {
conn1 {
reqid=1
life_time=60
rekey_time=30
mode=transport
esp_proposals=aes256-sha512-modp3072-ke1_modp4096
start_action=trap
}
}
}
}
@@ -0,0 +1,21 @@
<tkmconfig>
<local_identity id="1">
<identity>moon.strongswan.org</identity>
<certificate>moonCert.pem</certificate>
</local_identity>
<policy id="1">
<mode>transport</mode>
<local>
<identity_id>1</identity_id>
<ip>192.168.0.1</ip>
</local>
<remote>
<identity>sun.strongswan.org</identity>
<ip>192.168.0.2</ip>
</remote>
<lifetime>
<soft>30</soft>
<hard>60</hard>
</lifetime>
</policy>
</tkmconfig>
@@ -0,0 +1,25 @@
connections {
host-host {
local_addrs = PH_IP_SUN
remote_addrs = PH_IP_MOON
proposals = aes256-sha512-modp3072-ke1_modp4096
local {
auth = pubkey
certs = sunCert.pem
id = sun.strongswan.org
}
remote {
auth = pubkey
id = moon.strongswan.org
}
children {
host-host {
mode = transport
esp_proposals = aes256-sha512-modp3072-ke1_modp4096
}
}
}
}