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

feat: add s2n_peek_buffered #4490

Merged
merged 4 commits into from
Apr 6, 2024
Merged

feat: add s2n_peek_buffered #4490

merged 4 commits into from
Apr 6, 2024

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Apr 5, 2024

Description of changes:

Follow up to b169d76.

Add a method to check for buffered data.

Call-outs:

This returns a uint32_t to match s2n_peek, but should it? I'm not sure how useful knowing how much encrypted data exists is, since the caller can't map that to actual application data available. On the other hand, without recv_buffering the application could use recv + MSG_PEEK to get the same behavior, so maybe there's a use case we need to preserve.

Testing:

New unit test

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 Apr 5, 2024
@lrstewart lrstewart changed the title Add s2n_peek_buffered feat: add s2n_peek_buffered Apr 5, 2024
@lrstewart lrstewart marked this pull request as ready for review April 5, 2024 17:21
@lrstewart lrstewart requested review from camshaft and goatgoose April 5, 2024 17:21
api/s2n.h Outdated Show resolved Hide resolved
@lrstewart lrstewart requested a review from camshaft April 5, 2024 17:38
api/s2n.h Outdated Show resolved Hide resolved
api/s2n.h Outdated Show resolved Hide resolved
api/s2n.h Show resolved Hide resolved
@lrstewart lrstewart requested a review from goatgoose April 5, 2024 19:06
@lrstewart lrstewart enabled auto-merge (squash) April 6, 2024 00:22
@lrstewart lrstewart merged commit 34ad914 into aws:main Apr 6, 2024
32 checks passed
@lrstewart lrstewart deleted the recv_buffering_2 branch April 6, 2024 07:37
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.

3 participants