testing: Convert keys and certificates for all TKM scenarios
This commit is contained in:
parent
0136852f19
commit
326bb5f2c5
|
@ -136,12 +136,27 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Convert moon private key and Root CA certificate into DER format
|
# Convert moon private key and Root CA certificate into DER format
|
||||||
HOST_KEY=${DIR}/hosts/moon/${SWANCTL_DIR}/rsa/moonKey.pem
|
for t in host2host-initiator host2host-responder host2host-xfrmproxy \
|
||||||
TEST="${TEST_DIR}/tkm/host2host-initiator"
|
net2net-initiator net2net-xfrmproxy xfrmproxy-expire xfrmproxy-rekey
|
||||||
TEST_KEY=${TEST}/hosts/moon/${TKM_DIR}/moonKey.der
|
do
|
||||||
TEST_CERT=${TEST}/hosts/moon/${TKM_DIR}/strongswanCert.der
|
HOST_KEY=${DIR}/hosts/moon/${SWANCTL_DIR}/rsa/moonKey.pem
|
||||||
openssl rsa -in ${HOST_KEY} -outform der -out ${TEST_KEY} 2> /dev/null
|
TEST="${TEST_DIR}/tkm/${t}"
|
||||||
openssl x509 -in ${CA_CERT} -outform der -out ${TEST_CERT}
|
TEST_KEY=${TEST}/hosts/moon/${TKM_DIR}/moonKey.der
|
||||||
|
TEST_CERT=${TEST}/hosts/moon/${TKM_DIR}/strongswanCert.der
|
||||||
|
openssl rsa -in ${HOST_KEY} -outform der -out ${TEST_KEY} 2> /dev/null
|
||||||
|
openssl x509 -in ${CA_CERT} -outform der -out ${TEST_CERT}
|
||||||
|
done
|
||||||
|
|
||||||
|
# Convert sun private key and Root CA certificate into DER format
|
||||||
|
for t in multiple-clients
|
||||||
|
do
|
||||||
|
HOST_KEY=${DIR}/hosts/sun/${SWANCTL_DIR}/rsa/sunKey.pem
|
||||||
|
TEST="${TEST_DIR}/tkm/${t}"
|
||||||
|
TEST_KEY=${TEST}/hosts/sun/${TKM_DIR}/sunKey.der
|
||||||
|
TEST_CERT=${TEST}/hosts/sun/${TKM_DIR}/strongswanCert.der
|
||||||
|
openssl rsa -in ${HOST_KEY} -outform der -out ${TEST_KEY} 2> /dev/null
|
||||||
|
openssl x509 -in ${CA_CERT} -outform der -out ${TEST_CERT}
|
||||||
|
done
|
||||||
|
|
||||||
# Put DER-encoded moon private key and Root CA certificate into tkm scenarios
|
# Put DER-encoded moon private key and Root CA certificate into tkm scenarios
|
||||||
for t in host2host-initiator host2host-responder host2host-xfrmproxy \
|
for t in host2host-initiator host2host-responder host2host-xfrmproxy \
|
||||||
|
|
Loading…
Reference in New Issue