-
Notifications
You must be signed in to change notification settings - Fork 722
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
refactor: combine TLS1.2 and TLS1.3 sig scheme representations #4498
Conversation
/* ECDSA */ | ||
&s2n_ecdsa_sha384, | ||
|
||
/* RSA PSS - TLS 1.3 */ | ||
&s2n_rsa_pss_pss_sha384, | ||
|
||
/* ECDSA - TLS 1.2 */ | ||
&s2n_ecdsa_sha384, /* same iana value as TLS 1.3 s2n_ecdsa_secp384r1_sha384 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter that the TLS1.3 and the TLS1.2 version were separated by RSA-PSS-PSS, because TLS1.2 can't use RSA-PSS-PSS. So s2n_ecdsa_sha384 was always the first TLS1.2 option, and moving it up doesn't change that.
/* ECDSA - TLS 1.3 */ | ||
&s2n_ecdsa_secp384r1_sha384, | ||
/* ECDSA */ | ||
&s2n_ecdsa_sha384, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you expand the diff, there were no other options between s2n_ecdsa_secp384r1_sha384 and s2n_ecdsa_sha384. Just a big comment.
@@ -54,60 +54,6 @@ static S2N_RESULT s2n_test_security_policies_compatible(const struct s2n_securit | |||
return S2N_RESULT_OK; | |||
} | |||
|
|||
static S2N_RESULT s2n_test_get_missing_duplicate_signature_scheme( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It served its purpose 😔
Resolved issues:
Resolves #3916
Description of changes:
Combine the separate TLS1.2 and TLS1.3 ECDSA signature scheme structs into one single struct that can represent both.
This does not change any behavior because:
Testing:
Deleted tests related to using duplicate IANAs safely, since we don't have duplicate IANAs anymore :) Added a test to enforce that we don't have any duplicate IANAs.
I also added a self-talk test that uses a different curve/hash for every possible use of a curve/hash, to prove they're all properly independent.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.