Added check in TLX_Parse to check if KeyShare extension is present SupportedGroups must be present too (and viceversa) #9250
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.
Description
Added check in TLX_Parse to check if KeyShare extension is present SupportedGroups must be present too (and viceversa)
From RFC 8446 Section 9.2.
Addresses #9247
Testing
From the instructions in #9247.
default config:
./configurerun server:
./build/examples/server/server -v 4 -l 'TLS_AES_128_GCM_SHA256' -p 3000 --force-curve SECP256Rsend client hello from another window:
echo "16030300ab010000a703030101010101010101010101010101010101010101010101010101010101010101200303030303030303030303030303030303030303030303030303030303030303000213010100005c000d000600040401080400330047004500170041040c901d423c831ca85e27c73c263ba132721bb9d7a84c4f0380b2a6756fd601331c8870234dec878504c174144fa4b14b66a651691606d8173e55bd37e381569e002b0003020304" | xxd -r -p | nc 127.0.0.1 3000with the patch applied it rejects the Client Hello with -422 as error (MISSING_HANDSHAKE_DATA).
Checklist