mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Implement initial negotiation of EtM
Not implemented yet: - actually using EtM - conditions on renegotiation
This commit is contained in:
parent
b3c6a97b31
commit
699cafaea2
9 changed files with 308 additions and 2 deletions
|
|
@ -247,14 +247,14 @@ run_test() {
|
|||
if is_polar "$SRV_CMD"; then
|
||||
if grep "Performing the SSL/TLS handshake" $SRV_OUT >/dev/null; then :;
|
||||
else
|
||||
fail "server failed to start"
|
||||
fail "server or client failed to reach handshake stage"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if is_polar "$CLI_CMD"; then
|
||||
if grep "Performing the SSL/TLS handshake" $CLI_OUT >/dev/null; then :;
|
||||
else
|
||||
fail "client failed to start"
|
||||
fail "server or client failed to reach handshake stage"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
|
@ -440,6 +440,63 @@ run_test "Truncated HMAC: actual test" \
|
|||
0 \
|
||||
-s "dumping 'computed mac' (10 bytes)"
|
||||
|
||||
# Tests for Encrypt-then-MAC extension
|
||||
|
||||
run_test "Encrypt then MAC: default" \
|
||||
"$P_SRV debug_level=3" \
|
||||
"$P_CLI debug_level=3" \
|
||||
0 \
|
||||
-c "client hello, adding encrypt_then_mac extension" \
|
||||
-s "found encrypt then mac extension" \
|
||||
-s "server hello, adding encrypt then mac extension" \
|
||||
-c "found encrypt_then_mac extension" \
|
||||
-c "using encrypt then mac" \
|
||||
-s "using encrypt then mac"
|
||||
|
||||
run_test "Encrypt then MAC: client enabled, server disabled" \
|
||||
"$P_SRV debug_level=3 etm=0" \
|
||||
"$P_CLI debug_level=3 etm=1" \
|
||||
0 \
|
||||
-c "client hello, adding encrypt_then_mac extension" \
|
||||
-s "found encrypt then mac extension" \
|
||||
-S "server hello, adding encrypt then mac extension" \
|
||||
-C "found encrypt_then_mac extension" \
|
||||
-C "using encrypt then mac" \
|
||||
-S "using encrypt then mac"
|
||||
|
||||
run_test "Encrypt then MAC: client disabled, server enabled" \
|
||||
"$P_SRV debug_level=3 etm=1" \
|
||||
"$P_CLI debug_level=3 etm=0" \
|
||||
0 \
|
||||
-C "client hello, adding encrypt_then_mac extension" \
|
||||
-S "found encrypt then mac extension" \
|
||||
-S "server hello, adding encrypt then mac extension" \
|
||||
-C "found encrypt_then_mac extension" \
|
||||
-C "using encrypt then mac" \
|
||||
-S "using encrypt then mac"
|
||||
|
||||
run_test "Encrypt then MAC: client SSLv3, server enabled" \
|
||||
"$P_SRV debug_level=3" \
|
||||
"$P_CLI debug_level=3 force_version=ssl3" \
|
||||
0 \
|
||||
-C "client hello, adding encrypt_then_mac extension" \
|
||||
-S "found encrypt then mac extension" \
|
||||
-S "server hello, adding encrypt then mac extension" \
|
||||
-C "found encrypt_then_mac extension" \
|
||||
-C "using encrypt then mac" \
|
||||
-S "using encrypt then mac"
|
||||
|
||||
run_test "Encrypt then MAC: client enabled, server SSLv3" \
|
||||
"$P_SRV debug_level=3 force_version=ssl3" \
|
||||
"$P_CLI debug_level=3" \
|
||||
0 \
|
||||
-c "client hello, adding encrypt_then_mac extension" \
|
||||
-s "found encrypt then mac extension" \
|
||||
-S "server hello, adding encrypt then mac extension" \
|
||||
-C "found encrypt_then_mac extension" \
|
||||
-C "using encrypt then mac" \
|
||||
-S "using encrypt then mac"
|
||||
|
||||
# Tests for Extended Master Secret extension
|
||||
|
||||
run_test "Extended Master Secret: default" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue