-
Notifications
You must be signed in to change notification settings - Fork 717
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
utils: add map iteration iterator #4377
Merged
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
jmayclin
force-pushed
the
map-iterator
branch
from
January 25, 2024 05:34
865479d
to
5537772
Compare
jmayclin
force-pushed
the
map-iterator
branch
from
January 25, 2024 07:51
5537772
to
968e43d
Compare
* shadow variables in test * fix pointer alignment, because clang won't?
lrstewart
reviewed
Jan 25, 2024
- use S2N_CLEANUP_RESULT - use init rather than new
jmayclin
commented
Jan 25, 2024
This is necessary to allow for us to construct an s2n_map_iterator on the stack.
lrstewart
reviewed
Jan 29, 2024
- remove pre-increment usage - add explicit flag to track consumption - remove unused header - minimize diff in test file
lrstewart
reviewed
Jan 30, 2024
- add missed return assertions - switch to expect-error-with-errno - has_next returns bool - define test constants
- remove unused variables - remove unused functions
camshaft
approved these changes
Jan 31, 2024
lrstewart
reviewed
Feb 1, 2024
- switch error message for no more next - add additional ensure ref - call has_next rather than checking iterator - fix error in test case
- missed the removal of a direct iterator check
- some incredibly kind and thoughtful person added return-value-checks to our CI☺️
lrstewart
approved these changes
Feb 2, 2024
This reverts commit f4c2bdb.
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:
For #4339 we need to be able to iterate through the certs that are stored on the
s2n_config.domain_name_to_cert_map
. This PR adds iteration functionality to allow iteration over the values in a map. It also adds a simple helper to retrieve the size of a map.Call-outs:
I purposely am not returning
S2N_RESULT
from thes2n_map_iterator_free
function to avoid an "unused return value" warning when using DEFER_CLEANUP.Testing:
Unit test cases have been added to test new functionality.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.