Skip to content

feat: Add as_ptr() API for Config #5274

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

goatgoose
Copy link
Contributor

@goatgoose goatgoose commented Apr 25, 2025

Description of changes:

Allows access to the underlying s2n_tls_sys s2n_config pointer from the config::Builder for external builds, similar to #5229. This allows applications to directly call s2n_tls_sys s2n_config APIs when a higher-level API isn't provided.

Testing:

I added a new test to ensure that the new API can be used to call an s2n-tls-sys API. The external build test added in #5229 ensures that this test is running in CI.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -43,6 +43,7 @@ KNOWN_MISSES=(
"s2n_config_set_ctx"
"s2n_client_hello_has_extension"
"s2n_async_pkey_op_perform"
"s2n_config_get_client_auth_type"
Copy link
Contributor Author

@goatgoose goatgoose Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My test makes use of s2n_config_get_client_auth_type which causes grep_simple_mistakes to complain about missing documentation. I figured this exception was ok since I don't expect us to expose s2n_config_get_client_auth_type() in the Rust bindings anytime soon. But let me know if you think this exception isn't ideal and I can think of another test.

@goatgoose goatgoose marked this pull request as ready for review May 2, 2025 18:37
@goatgoose goatgoose requested a review from dougch as a code owner May 2, 2025 18:37
@goatgoose goatgoose requested a review from lrstewart May 2, 2025 18: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.

1 participant