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

Two small breaking API changes before next release #516

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

cpu
Copy link
Member

@cpu cpu commented Dec 24, 2024

Knocking out a couple small issues labelled next-major-release since we're preparing a 0.15 in main. Sure do appreciate having let .. else stable in our MSRV 💞

Resolves #179
Resolves #229

server: SNI rustls_connection getter ret rustls_str

The rustls_server_connection_get_server_name() API function previously wrote the SNI value to a caller-provided buffer as it predates the rustls_str pattern.

This commit updates it to return a rustls_str. Invalid parameters or incomplete connection state are returned as empty strs.

The documented lifetime matches that of other rustls_connection accessors based on a "set-once" property we assume from upstream.

server: remove rustls_result from set_persistence

Previously rustls_server_config_builder_set_persistence() returned a rustls_result just to indicate if a required parameter was NULL.

Our API guidelines instead recommend this function do nothing and return void for these circumstances.

cpu added 2 commits December 23, 2024 15:14
The `rustls_server_connection_get_server_name()` API function previously
wrote the SNI value to a caller-provided buffer as it predates the
`rustls_str` pattern.

This commit updates it to return a `rustls_str`. Invalid parameters or
incomplete connection state are returned as empty strs.

The documented lifetime matches that of other `rustls_connection`
accessors based on a "set-once" property we assume from upstream.
Previously `rustls_server_config_builder_set_persistence()` returned
a `rustls_result` just to indicate if a required parameter was `NULL`.

Our API guidelines instead recommend this function do nothing and return
void for these circumstances.
@cpu cpu self-assigned this Dec 24, 2024
@cpu cpu mentioned this pull request Dec 28, 2024
14 tasks
@cpu cpu requested review from ctz and jsha December 31, 2024 15:19
@cpu
Copy link
Member Author

cpu commented Dec 31, 2024

cpu requested review from ctz and jsha now

This one should be pretty easy to review if you folks have a few min to spare. Thanks!

@cpu
Copy link
Member Author

cpu commented Dec 31, 2024

These feels small enough to merge with 1 review. Thanks for taking a look ctz 🙇

@cpu cpu merged commit f05e0dc into rustls:main Dec 31, 2024
35 checks passed
@cpu cpu deleted the cpu-next-release-bits branch December 31, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants