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(bindings): Associate an application context with a Connection #4563

Merged
merged 5 commits into from
May 25, 2024

Conversation

goatgoose
Copy link
Contributor

@goatgoose goatgoose commented May 18, 2024

Resolved issues:

Resolves #4264

Description of changes:

Adds new APIs to set and retrieve an arbitrary struct on a Connection.

This allows applications to associate connection-specific application data with each connection, and retrieve the data from within s2n-tls callbacks.

Call-outs:

I made an example that demonstrates how the application context can be used with the session resumption callback to solve #4264. I intend to submit this example in a subsequent PR, but you can view it on a branch for now if you want.

Testing:

I added new tests that set and retrieve the application context.

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 May 18, 2024
@goatgoose goatgoose marked this pull request as ready for review May 20, 2024 14:37
@goatgoose goatgoose requested review from lrstewart and jmayclin May 20, 2024 14:37
bindings/rust/s2n-tls/src/testing/s2n_tls.rs Outdated Show resolved Hide resolved
bindings/rust/s2n-tls/src/testing/s2n_tls.rs Outdated Show resolved Hide resolved
bindings/rust/s2n-tls/src/connection.rs Outdated Show resolved Hide resolved
bindings/rust/s2n-tls/src/connection.rs Show resolved Hide resolved
@goatgoose goatgoose requested review from lrstewart and jmayclin May 22, 2024 15:25
@goatgoose goatgoose enabled auto-merge (squash) May 25, 2024 03:43
@goatgoose goatgoose merged commit 16efec9 into aws:main May 25, 2024
33 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.

s2n-tls Rust bindings session_ticket callback needs additional context
3 participants