Skip to content
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

Add API to retrieve the supported groups for a security policy #4273

Merged
merged 5 commits into from
Nov 13, 2023

Conversation

goatgoose
Copy link
Contributor

@goatgoose goatgoose commented Oct 30, 2023

Description of changes:

Adds a new API that gets a list of all the supported groups for a given config's security policy. The API can be used for logging, and to compare the server's supported groups with the client's supported groups with the s2n_client_hello_get_supported_groups() API.

Call-outs:

I tried to refactor the supported groups send so that the same logic could be used for the new API, but it ended up being a lot more complex than just having additional for loops for the kem and curve preferences. I think it's difficult because the extension needs to write to a stuffer and has to make decisions based on the protocol version (and potentially other connection fields in the future), and the API just needs to populate an array with all of the groups. If I'm missing something with this though and there should be a clean way to do this let me know.

Testing:

New unit tests for the API.

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 Oct 30, 2023
@goatgoose goatgoose force-pushed the config-supported-groups branch 12 times, most recently from 55b206f to e319a94 Compare November 1, 2023 21:14
@goatgoose goatgoose marked this pull request as ready for review November 1, 2023 21:26
api/s2n.h Outdated Show resolved Hide resolved
tls/s2n_config.c Show resolved Hide resolved
tls/s2n_config.c Show resolved Hide resolved
tests/unit/s2n_config_test.c Show resolved Hide resolved
tests/unit/s2n_config_test.c Show resolved Hide resolved
tests/unit/s2n_config_test.c Show resolved Hide resolved
api/s2n.h Outdated Show resolved Hide resolved
@goatgoose goatgoose merged commit b82a5d4 into aws:main Nov 13, 2023
27 checks passed
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.

None yet

3 participants