ssl-opt.sh: Duplicate context serialization tests for CID

This commit introduces a variant of each existing test for
context serialization in ssl-opt.sh that also uses the DTLS
Connection ID feature.
This commit is contained in:
Hanno Becker 2019-08-30 11:18:59 +01:00
parent 361b10d1c4
commit 1b18fd3afe

View File

@ -1290,6 +1290,15 @@ run_test "Context serialization, client serializes" \
-c "Deserializing connection..." \ -c "Deserializing connection..." \
-S "Deserializing connection..." -S "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, client serializes, with CID" \
"$P_SRV dtls=1 serialize=0 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=1 exchanges=2 cid=1 cid_val=beef" \
0 \
-c "Deserializing connection..." \
-S "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
run_test "Context serialization, server serializes" \ run_test "Context serialization, server serializes" \
"$P_SRV dtls=1 serialize=1 exchanges=2" \ "$P_SRV dtls=1 serialize=1 exchanges=2" \
@ -1298,6 +1307,15 @@ run_test "Context serialization, server serializes" \
-C "Deserializing connection..." \ -C "Deserializing connection..." \
-s "Deserializing connection..." -s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, server serializes, with CID" \
"$P_SRV dtls=1 serialize=1 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=0 exchanges=2 cid=1 cid_val=beef" \
0 \
-C "Deserializing connection..." \
-s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
run_test "Context serialization, both serialize" \ run_test "Context serialization, both serialize" \
"$P_SRV dtls=1 serialize=1 exchanges=2" \ "$P_SRV dtls=1 serialize=1 exchanges=2" \
@ -1306,6 +1324,15 @@ run_test "Context serialization, both serialize" \
-c "Deserializing connection..." \ -c "Deserializing connection..." \
-s "Deserializing connection..." -s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, both serialize, with CID" \
"$P_SRV dtls=1 serialize=1 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=1 exchanges=2 cid=1 cid_val=beef" \
0 \
-c "Deserializing connection..." \
-s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
run_test "Context serialization, re-init, client serializes" \ run_test "Context serialization, re-init, client serializes" \
"$P_SRV dtls=1 serialize=0 exchanges=2" \ "$P_SRV dtls=1 serialize=0 exchanges=2" \
@ -1314,6 +1341,15 @@ run_test "Context serialization, re-init, client serializes" \
-c "Deserializing connection..." \ -c "Deserializing connection..." \
-S "Deserializing connection..." -S "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, re-init, client serializes, with CID" \
"$P_SRV dtls=1 serialize=0 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=2 exchanges=2 cid=1 cid_val=beef" \
0 \
-c "Deserializing connection..." \
-S "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
run_test "Context serialization, re-init, server serializes" \ run_test "Context serialization, re-init, server serializes" \
"$P_SRV dtls=1 serialize=2 exchanges=2" \ "$P_SRV dtls=1 serialize=2 exchanges=2" \
@ -1322,6 +1358,15 @@ run_test "Context serialization, re-init, server serializes" \
-C "Deserializing connection..." \ -C "Deserializing connection..." \
-s "Deserializing connection..." -s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, re-init, server serializes, with CID" \
"$P_SRV dtls=1 serialize=2 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=0 exchanges=2 cid=1 cid_val=beef" \
0 \
-C "Deserializing connection..." \
-s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
run_test "Context serialization, re-init, both serialize" \ run_test "Context serialization, re-init, both serialize" \
"$P_SRV dtls=1 serialize=2 exchanges=2" \ "$P_SRV dtls=1 serialize=2 exchanges=2" \
@ -1330,6 +1375,15 @@ run_test "Context serialization, re-init, both serialize" \
-c "Deserializing connection..." \ -c "Deserializing connection..." \
-s "Deserializing connection..." -s "Deserializing connection..."
requires_config_enabled MBEDTLS_SSL_CONTEXT_SERIALIZATION
requires_config_enabled MBEDTLS_SSL_DTLS_CONNECTION_ID
run_test "Context serialization, re-init, both serialize, with CID" \
"$P_SRV dtls=1 serialize=2 exchanges=2 cid=1 cid_val=dead" \
"$P_CLI dtls=1 serialize=2 exchanges=2 cid=1 cid_val=beef" \
0 \
-c "Deserializing connection..." \
-s "Deserializing connection..."
# Tests for DTLS Connection ID extension # Tests for DTLS Connection ID extension
# So far, the CID API isn't implemented, so we can't # So far, the CID API isn't implemented, so we can't