-
Notifications
You must be signed in to change notification settings - Fork 740
Use NIST P-256 for key generation when client do not specify curve #2265
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -636,6 +636,11 @@ int s2n_security_policies_init() | |
const struct s2n_ecc_preferences *ecc_preference = security_policy->ecc_preferences; | ||
notnull_check(ecc_preference); | ||
GUARD(s2n_check_ecc_preferences_curves_list(ecc_preference)); | ||
if (security_policy != &security_policy_null) { | ||
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. Nit: Might want a newline between line 638 and line 639 |
||
/* catch any offending security policy that does not support P-256 */ | ||
GUARD_AS_POSIX(s2n_ecc_preferences_includes_p256(ecc_preference)); | ||
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. Why does this require a separate method? Why not just use s2n_ecc_preferences_includes_curve directly? 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. And why do this is production code instead of in a unit test that iterates over all security policies? 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.
I can use s2n_ecc_preferences_includes_curve() if that's preferred
|
||
} | ||
|
||
for (int j = 0; j < cipher_preference->count; j++) { | ||
struct s2n_cipher_suite *cipher = cipher_preference->suites[j]; | ||
notnull_check(cipher); | ||
|
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.
Why store this as a blob instead of just executing it as part of the test? What's the benefit?
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 is not possible to execute the current test with code unless we can expose not sending supported_groups extension