-
Notifications
You must be signed in to change notification settings - Fork 712
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
test: disallow explict use of "default" policy in tests #4750
Merged
Conversation
This file contains 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
toidiu
force-pushed
the
ak-explicitDefaultPolicy
branch
3 times, most recently
from
September 10, 2024 23:23
704982e
to
7b2b48f
Compare
10 tasks
toidiu
force-pushed
the
ak-explicitDefaultPolicy
branch
from
September 11, 2024 17:15
7b2b48f
to
6d0a465
Compare
goatgoose
reviewed
Sep 11, 2024
lrstewart
reviewed
Sep 11, 2024
goatgoose
approved these changes
Sep 16, 2024
toidiu
force-pushed
the
ak-explicitDefaultPolicy
branch
from
September 17, 2024 19:20
fd5c82d
to
e6f3b28
Compare
lrstewart
approved these changes
Sep 19, 2024
toidiu
force-pushed
the
ak-explicitDefaultPolicy
branch
from
September 20, 2024 01:45
e6f3b28
to
d45d31d
Compare
goatgoose
approved these changes
Sep 23, 2024
dougch
approved these changes
Sep 23, 2024
toidiu
added a commit
that referenced
this pull request
Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 of changes:
As a modern TLS library, s2n-tls aims to provide sane default. To uphold this promise, we are planning to add TLS1.3 support to the "default" and "default_fips" policies. However, making this change can result in broken tests since connections will now negotiate TLS1.3 and we have to assume that old tests were written to assume that TLS1.2 would be negotiated.
To prevent this regression, this PR attempts to find "explicit" usage of the "default" policy (implicit detection will be a followup)("default_fips" will be a followup) and replace it with the immutable numbered policy
20240501
. I audited both the C and Rust codebase for "default" security policy usage, allowing for exceptions for tests which didnt care about the protocol.Call-outs:
The detection logic can be viewed by looking at the detection logic cleanup commit.
s2n_find_security_policy_from_version
in file s2n_security_policies.cs2n_config_new()
The PR also adds an additional check to grep_simple_mistakes.sh
"default"
in C code andDEFAULT
in Rust codeTesting:
Tests should continue to pass.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.