Skip to content

test: confirm errors for no matching parameters#5679

Merged
jmayclin merged 5 commits intoaws:mainfrom
jmayclin:2025-12-15-protocol-errors
Dec 31, 2025
Merged

test: confirm errors for no matching parameters#5679
jmayclin merged 5 commits intoaws:mainfrom
jmayclin:2025-12-15-protocol-errors

Conversation

@jmayclin
Copy link
Copy Markdown
Contributor

Goal

This PR adds integration tests to confirm that errors that we return in the event that negotiation failures because there aren't any matching parameters.

Why

This issue was highlighted in #5655. The behavior changed during a recent PR. While unit tests covered this, there is so much noise in our unit tests that the error type change wasn't very obvious.

How

We add rust integration tests configuring an OpenSSL client with a particular parameter set that isn't supported by the s2n-tls server, and then assert on the error that the s2n-tls server returns.

Callouts

I was surprised to find that s2n-tls doesn't fail the handshake when there are no signature schemes in common. It's not immediately clear if this was an accident or intentional. The difficult with changing the behavior is that some clients may (very unfortunately) be relying on it.

Testing

We use brass-aphid-wire to assert on the exact content of the TLS transcript.

Related

#5655

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Dec 18, 2025
* feature gate tests to TLS 1.3

brass-aphid-wire-decryption = "0.0.1"
brass-aphid-wire-messages = "0.0.1"
brass-aphid-wire-decryption = "0.0.2"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to release a new version to handle plaintext alerts during the encrypted portion of the handshake.

jmayclin/wire@39fecb2

@jmayclin jmayclin marked this pull request as ready for review December 18, 2025 03:22
@jmayclin jmayclin added this pull request to the merge queue Dec 31, 2025
Merged via the queue into aws:main with commit 5defeee Dec 31, 2025
54 checks passed
@jmayclin jmayclin deleted the 2025-12-15-protocol-errors branch December 31, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants