-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add basic handshake defragmentation tests in ssl-opt #9989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gilles-peskine-arm
merged 33 commits into
Mbed-TLS:features/tls-defragmentation/development
from
minosgalanakis:issue9887_add_basic_defragmentation_tests
Feb 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
79a8ded
Add TLS Hanshake defragmentation tests
waleed-elmelegy-arm 0e0d5d4
Improve TLS handshake defragmentation tests
waleed-elmelegy-arm c0118d8
Fix typo in TLS Handshake defrafmentation tests
waleed-elmelegy-arm fccd014
Remove unnecessary string check in handshake defragmentation tests
waleed-elmelegy-arm f912031
Require openssl to support TLS 1.3 in handshake defragmentation tests
waleed-elmelegy-arm 48874b3
Add client authentication to handshake defragmentation tests
waleed-elmelegy-arm 39d83dd
Remove unneeded mtu option from handshake fragmentation tests
waleed-elmelegy-arm 61b8e2d
Enforce client authentication in handshake fragmentation tests
waleed-elmelegy-arm f162249
Add a comment to elaborate using split_send_frag in handshake defragm…
waleed-elmelegy-arm a75c7e0
Add guard to handshake defragmentation tests for client certificate
waleed-elmelegy-arm 5f21537
Test Handshake defragmentation only for TLS 1.3 only for small values
waleed-elmelegy-arm 4028cfd
Add missing client certificate check in handshake defragmentation tests
waleed-elmelegy-arm 270dd74
ssl-opt: Updated the keywords to look up during handshake fragmentati…
minosgalanakis a1b9117
ssl-opt: Added requires_openssl_3_x to defragmentation tests.
minosgalanakis a8a298c
ssl-opt: Adjusted the wording on handshake fragmentation tests.
minosgalanakis a4dde77
ssl-opt: Dependency resolving set to use to requires_protocol_version…
minosgalanakis 85fe73d
ssl-opt: Added tls 1.2 tests for HS defragmentation.
minosgalanakis 41782a9
ssl-opt: Added negative-assertion testing, (HS Fragmentation disabled)
minosgalanakis 1c106af
ssl-opt: Added handshake fragmentation tests for 4 byte fragments.
minosgalanakis 74ce749
ssl-opt: Added negative tests for handshake fragmentation.
minosgalanakis 36c81f5
ssl-opt: Added DSA-RSA dependency on TLS1.2 defragmentation testing.
minosgalanakis d708a63
ssl-opt: Updated documentation.
minosgalanakis eddbb5a
ChangeLog: Updated the entry for tls-hs-defragmentation
minosgalanakis a5a8c9f
ssl-opt: Added coverage for hs defragmentation TLS 1.2 tests.
minosgalanakis 99ca668
ssl-opt: Replaced max_send_frag with split_send_frag
minosgalanakis cd6a24b
ssl-opt.sh: Disabled HS Defrag Tests for TLS1.2 where len < 16
minosgalanakis c8709c6
ssl-opt: Removed redundant dependencies: requires_openssl_3_x
minosgalanakis 17170a5
ssl-opt: Updated documentation of HS-Defrag tests.
minosgalanakis 19dbbe0
analyze_outcomes: Temporary disabled 3 HS Degragmentation tests.
minosgalanakis 76957cc
ssl-opt: Minor typos and documentation fixes.
minosgalanakis d01ac30
ssl-opt: Adjusted reference hs defragmentation tests.
minosgalanakis 0dd57a9
ssl-opt: Removed dependencies for HS defrag negative tests.
minosgalanakis 4354dc6
ssl-opt: Re-introduce certificate dependency for HS negative tests.
minosgalanakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13874,10 +13874,9 @@ run_test "TLS 1.2 ClientHello indicating support for deflate compression meth | |
|
|
||
| # Handshake defragmentation testing | ||
|
|
||
mpg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # To warrant that the handhake messages are large enough and need to be split | ||
| # To guarantee that the handhake messages are large enough and need to be split | ||
| # into fragments, the tests require certificate authentication. The party in control | ||
| # of the fragmentation operations is OpenSSL and will always use server5.crt (548 Bytes) | ||
| # either from O_NEXT_SRV or test data. | ||
| # of the fragmentation operations is OpenSSL and will always use server5.crt (548 Bytes). | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
gilles-peskine-arm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on client (no fragmentation, for reference)" \ | ||
|
|
@@ -13897,9 +13896,7 @@ run_test "Handshake defragmentation on client: len=512, TLS 1.3" \ | |
| -c "handshake fragment: 0 \\.\\. 512 of [0-9]\\+ msglen 512" \ | ||
mpg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| -c "waiting for more fragments (512 of [0-9]\\+" | ||
|
|
||
| # Since the removal of the DHE-RSA key exchange, the default openssl server | ||
| # certificate does not match what is provided by the testing client. Those | ||
| # use-cases are out of scope for defregmentation testing, and should be skipped. | ||
| #The server uses an ECDSA cert, so make sure we have a compatible key exchange | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_certificate_authentication | ||
| requires_config_enabled MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED | ||
|
|
@@ -14220,12 +14217,12 @@ run_test "Handshake defragmentation on server: len=128, TLS 1.3" \ | |
| -s "handshake fragment: 0 \\.\\. 128 of [0-9]\\+ msglen 128" \ | ||
| -s "waiting for more fragments (128" | ||
|
|
||
| # Server-side ClientHello degfragmentation is only supported for MBEDTLS_SSL_PROTO_TLS1_3. For TLS 1.2 testing | ||
| # Server-side ClientHello defragmentationis only supported for MBEDTLS_SSL_PROTO_TLS1_3. For TLS 1.2 testing | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Introducing a typo: missing space defragmentationis (no need to fix if there's nothing else). |
||
| # the server should suport both protocols and downgrade to client-requested TL1.2 after proccessing the ClientHello. | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=128, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=128, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 128 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14246,7 +14243,7 @@ run_test "Handshake defragmentation on server: len=64, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=64, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=64, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 64 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14267,7 +14264,7 @@ run_test "Handshake defragmentation on server: len=36, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=36, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=36, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 36 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14288,7 +14285,7 @@ run_test "Handshake defragmentation on server: len=32, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=32, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=32, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 32 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14309,7 +14306,7 @@ run_test "Handshake defragmentation on server: len=16, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=16, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=16, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 16 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14330,7 +14327,7 @@ run_test "Handshake defragmentation on server: len=13, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=13, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=13, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 13 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14351,7 +14348,7 @@ run_test "Handshake defragmentation on server: len=5, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=5, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=5, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 5 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14372,7 +14369,7 @@ run_test "Handshake defragmentation on server: len=4, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
minosgalanakis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=4, TLS 1.2 TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=4, TLS 1.2 TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 4 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 0 \ | ||
|
|
@@ -14393,7 +14390,7 @@ run_test "Handshake defragmentation on server: len=3, TLS 1.3" \ | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=3, TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=3, TLS 1.3 ClientHello -> 1.2 Handshake" \ | ||
| "$P_SRV debug_level=4 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 3 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 1 \ | ||
|
|
@@ -14404,7 +14401,7 @@ run_test "Handshake defragmentation on server: len=3, TLS 1.3 Client-Hallo -> | |
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 | ||
| requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3 | ||
| requires_certificate_authentication | ||
| run_test "Handshake defragmentation on server: len=32, TLS 1.3 Client-Hallo -> 1.2 Handhsake" \ | ||
| run_test "Handshake defragmentation on server: len=32, TLS 1.2 ClientHello" \ | ||
| "$P_SRV debug_level=4 force_version=tls12 auth_mode=required" \ | ||
| "$O_NEXT_CLI -tls1_2 -split_send_frag 32 -cert $DATA_FILES_PATH/server5.crt -key $DATA_FILES_PATH/server5.key" \ | ||
| 1 \ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.