Add small packet tests for DTLS
Add a DTLS small packet test for each of the following combinations: - DTLS version: 1.0 or 1.2 - Encrypt then MAC extension enabled - Truncated HMAC extension enabled Large packets tests for DTLS are currently not possible due to parameter constraints in ssl_server2.
This commit is contained in:
parent
278fc7aedd
commit
e214804625
1 changed files with 76 additions and 0 deletions
|
@ -3502,6 +3502,82 @@ run_test "Small packet TLS 1.2 AEAD shorter tag" \
|
|||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
# Tests for small packets in DTLS
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
run_test "Small packet DTLS 1.0" \
|
||||
"$P_SRV dtls=1 force_version=dtls1" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
run_test "Small packet DTLS 1.0, without EtM" \
|
||||
"$P_SRV dtls=1 force_version=dtls1 etm=0" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
requires_config_enabled MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
run_test "Small packet DTLS 1.0, truncated hmac" \
|
||||
"$P_SRV dtls=1 force_version=dtls1" \
|
||||
"$P_CLI dtls=1 request_size=1 trunc_hmac=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
requires_config_enabled MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
run_test "Small packet DTLS 1.0, without EtM, truncated MAC" \
|
||||
"$P_SRV dtls=1 force_version=dtls1 \
|
||||
etm=0" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \
|
||||
trunc_hmac=1"\
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
run_test "Small packet DTLS 1.2" \
|
||||
"$P_SRV dtls=1 force_version=dtls1_2" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
run_test "Small packet DTLS 1.2, without EtM" \
|
||||
"$P_SRV dtls=1 force_version=dtls1_2 \
|
||||
etm=0" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
requires_config_enabled MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
run_test "Small packet DTLS 1.2, truncated hmac" \
|
||||
"$P_SRV dtls=1 force_version=dtls1_2" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \
|
||||
trunc_hmac=1" \
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_DTLS
|
||||
requires_config_enabled MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
run_test "Small packet DTLS 1.2, without EtM, truncated MAC" \
|
||||
"$P_SRV dtls=1 force_version=dtls1_2 \
|
||||
etm=0" \
|
||||
"$P_CLI dtls=1 request_size=1 \
|
||||
force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \
|
||||
trunc_hmac=1"\
|
||||
0 \
|
||||
-s "Read from client: 1 bytes read"
|
||||
|
||||
# A test for extensions in SSLv3
|
||||
|
||||
requires_config_enabled MBEDTLS_SSL_PROTO_SSL3
|
||||
|
|
Loading…
Reference in a new issue