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

kTLS: implement recvmsg #4154

Merged
merged 6 commits into from
Aug 25, 2023
Merged

kTLS: implement recvmsg #4154

merged 6 commits into from
Aug 25, 2023

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Aug 17, 2023

Description of changes:

This PR adds an implementation for s2n_ktls_recvmsg.

The function is responsible for calling recvmsg and retrieving some plaintext data from the socket (remember kTLS is responsible for performing the decryption). It also retrieves the record_type via control data from the socket by calling the s2n_get_control_data fn which was added a couple of kTLS PRs ago.

With this we have a basis for sending (sendmsg) and receiving (recvmsg) data when using kTLS. After this we will start integrating with the existing s2n-tls s2n_send and s2n_recv functions.

Call-outs:

  • Note that this function simply propagates the errors up rather than act on them. Acting on errors (eg. closing connection) will happen in a following PR.

Testing:

Unit tests

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 Aug 17, 2023
@toidiu toidiu force-pushed the ak-ktls1_recvmsg branch 5 times, most recently from 4f4452f to 41adc0a Compare August 22, 2023 06:17
@toidiu toidiu changed the title Ak ktls1 recvmsg kTLS: implement recvmsg Aug 22, 2023
@toidiu toidiu mentioned this pull request Aug 22, 2023
32 tasks
@toidiu toidiu marked this pull request as ready for review August 22, 2023 06:38
@toidiu toidiu requested review from lrstewart and maddeleine August 22, 2023 06:38
tests/unit/s2n_ktls_io_test.c Outdated Show resolved Hide resolved
tls/s2n_ktls_io.c Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Outdated Show resolved Hide resolved
tests/testlib/s2n_ktls_test_utils.c Outdated Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Show resolved Hide resolved
tests/unit/s2n_ktls_io_test.c Show resolved Hide resolved
@toidiu toidiu requested a review from lrstewart August 24, 2023 21:06
@toidiu toidiu enabled auto-merge (squash) August 25, 2023 02:23
@toidiu toidiu merged commit b70868e into aws:main Aug 25, 2023
@toidiu toidiu deleted the ak-ktls1_recvmsg branch July 11, 2024 00:01
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