Skip to content

Commit

Permalink
clarify rustls_client_config_builder_enable_ech arg lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu committed Dec 16, 2024
1 parent 380e3eb commit b9c7aef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ impl rustls_client_config_builder {
///
/// The provided `ech_config_list_bytes` and `rustls_hpke` must not be NULL or an
/// error will be returned. The caller maintains ownership of the ECH config list TLS bytes
/// and `rustls_hpke` instance.
/// and `rustls_hpke` instance. The lifetime of the `ech_config_list_bytes` and `rustls_hpke`
/// instance are not tied to the lifetime of the `rustls_client_config_builder` and can be
/// freed at any time after this function returns without affecting the builder.
///
/// A `RUSTLS_RESULT_BUILDER_INCOMPATIBLE_TLS_VERSIONS` error is returned if the builder's
/// TLS versions have been customized via `rustls_client_config_builder_new_custom()`
Expand Down
4 changes: 3 additions & 1 deletion src/rustls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,9 @@ rustls_result rustls_client_config_builder_set_key_log(struct rustls_client_conf
*
* The provided `ech_config_list_bytes` and `rustls_hpke` must not be NULL or an
* error will be returned. The caller maintains ownership of the ECH config list TLS bytes
* and `rustls_hpke` instance.
* and `rustls_hpke` instance. The lifetime of the `ech_config_list_bytes` and `rustls_hpke`
* instance are not tied to the lifetime of the `rustls_client_config_builder` and can be
* freed at any time after this function returns without affecting the builder.
*
* A `RUSTLS_RESULT_BUILDER_INCOMPATIBLE_TLS_VERSIONS` error is returned if the builder's
* TLS versions have been customized via `rustls_client_config_builder_new_custom()`
Expand Down

0 comments on commit b9c7aef

Please sign in to comment.