mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 04:08:20 +00:00
x509: trailing bytes in DER: add integration tests
This commit is contained in:
parent
8c4472af39
commit
0b2423403c
8 changed files with 58 additions and 0 deletions
BIN
tests/data_files/server5-der0.crt
Normal file
BIN
tests/data_files/server5-der0.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der1a.crt
Normal file
BIN
tests/data_files/server5-der1a.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der1b.crt
Normal file
BIN
tests/data_files/server5-der1b.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der2.crt
Normal file
BIN
tests/data_files/server5-der2.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der4.crt
Normal file
BIN
tests/data_files/server5-der4.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der8.crt
Normal file
BIN
tests/data_files/server5-der8.crt
Normal file
Binary file not shown.
BIN
tests/data_files/server5-der9.crt
Normal file
BIN
tests/data_files/server5-der9.crt
Normal file
Binary file not shown.
|
@ -1554,6 +1554,64 @@ run_test "Renego ext: gnutls client unsafe, server break legacy" \
|
|||
-S "received TLS_EMPTY_RENEGOTIATION_INFO\|found renegotiation extension" \
|
||||
-S "server hello, secure renegotiation extension"
|
||||
|
||||
# Tests for silently dropping trailing extra bytes in .der certificates
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: no trailing bytes" \
|
||||
"$P_SRV crt_file=data_files/server5-der0.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with a trailing zero byte" \
|
||||
"$P_SRV crt_file=data_files/server5-der1a.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with a trailing random byte" \
|
||||
"$P_SRV crt_file=data_files/server5-der1b.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with 2 trailing random bytes" \
|
||||
"$P_SRV crt_file=data_files/server5-der2.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with 4 trailing random bytes" \
|
||||
"$P_SRV crt_file=data_files/server5-der4.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with 8 trailing random bytes" \
|
||||
"$P_SRV crt_file=data_files/server5-der8.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
requires_gnutls
|
||||
run_test "DER format: with 9 trailing random bytes" \
|
||||
"$P_SRV crt_file=data_files/server5-der9.crt \
|
||||
key_file=data_files/server5.key" \
|
||||
"$G_CLI " \
|
||||
0 \
|
||||
-c "Handshake was completed" \
|
||||
|
||||
# Tests for auth_mode
|
||||
|
||||
run_test "Authentication: server badcert, client required" \
|
||||
|
|
Loading…
Reference in a new issue