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.
This commit is contained in:
Tobias Brunner
2021-01-11 15:28:10 +01:00
parent 16fcdb460a
commit 5ef10ec326
23 changed files with 489 additions and 2 deletions
@@ -0,0 +1,25 @@
connections {
host-host {
local_addrs = PH_IP_CAROL
remote_addrs = PH_IP_MOON
proposals = aes256-sha512-modp4096
local {
auth = pubkey
certs = carolCert.pem
id = [email protected]
}
remote {
auth = pubkey
id = moon.strongswan.org
}
children {
host-host {
mode = transport
esp_proposals = aes256-sha512-modp4096
}
}
}
}
@@ -0,0 +1,25 @@
connections {
host-host {
local_addrs = PH_IP_DAVE
remote_addrs = PH_IP_MOON
proposals = aes256-sha512-modp4096
local {
auth = pubkey
certs = daveCert.pem
id = [email protected]
}
remote {
auth = pubkey
id = moon.strongswan.org
}
children {
host-host {
mode = transport
esp_proposals = aes256-sha512-modp4096
}
}
}
}
@@ -0,0 +1,21 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
dh_mapping {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
levels_ca {
id = 2
fingerprint = LEVELS_SPK_HEX
}
}
start-scripts {
swanctl = /usr/local/sbin/swanctl --load-all --noprompt
}
}
@@ -0,0 +1,36 @@
<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>[email protected]</identity>
<ip>192.168.0.100</ip>
</remote>
<lifetime>
<soft>30</soft>
<hard>60</hard>
</lifetime>
</policy>
<policy id="2">
<mode>transport</mode>
<local>
<identity_id>1</identity_id>
<ip>192.168.0.1</ip>
</local>
<remote>
<identity>[email protected]</identity>
<ip>192.168.0.200</ip>
</remote>
<lifetime>
<soft>30</soft>
<hard>60</hard>
</lifetime>
</policy>
</tkmconfig>