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.
This commit is contained in:
Adrian-Ken Rueegsegger 2020-09-25 10:47:46 +02:00 committed by Tobias Brunner
parent f8242127a2
commit d6cf4a165b
12 changed files with 92 additions and 16 deletions

View File

@ -1925,3 +1925,30 @@ do
-e "s|SUN_PUB_DNS|${SUN_PUB_DNS}|g" \
${TEST_DATA}.in > ${TEST_DATA}
done
################################################################################
# TKM CA ID mapping #
################################################################################
for t in host2host-initiator host2host-responder host2host-xfrmproxy \
net2net-initiator net2net-xfrmproxy xfrmproxy-expire xfrmproxy-rekey
do
for h in moon
do
TEST_DATA="${TEST_DIR}/tkm/${t}/hosts/moon/etc/strongswan.conf"
sed -e "s/CA_SPK_HEX/${CA_SPK_HEX}/g" \
-e "s/CA_SPKI_HEX/${CA_SPKI_HEX}/g" \
${TEST_DATA}.in > ${TEST_DATA}
done
done
for t in multiple-clients
do
for h in sun
do
TEST_DATA="${TEST_DIR}/tkm/${t}/hosts/${h}/etc/strongswan.conf"
sed -e "s/CA_SPK_HEX/${CA_SPK_HEX}/g" \
-e "s/CA_SPKI_HEX/${CA_SPKI_HEX}/g" \
${TEST_DATA}.in > ${TEST_DATA}
done
done

View File

@ -1 +1,2 @@
*.der
strongswan.conf

View File

@ -5,4 +5,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -5,4 +5,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -5,4 +5,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -5,4 +5,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -1,8 +0,0 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
dh_mapping {
15 = 1
16 = 2
}
}

View File

@ -0,0 +1,14 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
dh_mapping {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -1,8 +0,0 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
dh_mapping {
15 = 1
16 = 2
}
}

View File

@ -0,0 +1,14 @@
# /etc/strongswan.conf - strongSwan configuration file
charon-tkm {
dh_mapping {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -7,4 +7,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}

View File

@ -7,4 +7,10 @@ charon-tkm {
15 = 1
16 = 2
}
ca_mapping {
strongswan_ca {
id = 1
fingerprint = CA_SPK_HEX
}
}
}