Skip to content

Commit b9c7aef

Browse files
committed
clarify rustls_client_config_builder_enable_ech arg lifetimes
1 parent 380e3eb commit b9c7aef

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/client.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ impl rustls_client_config_builder {
385385
///
386386
/// The provided `ech_config_list_bytes` and `rustls_hpke` must not be NULL or an
387387
/// error will be returned. The caller maintains ownership of the ECH config list TLS bytes
388-
/// and `rustls_hpke` instance.
388+
/// and `rustls_hpke` instance. The lifetime of the `ech_config_list_bytes` and `rustls_hpke`
389+
/// instance are not tied to the lifetime of the `rustls_client_config_builder` and can be
390+
/// freed at any time after this function returns without affecting the builder.
389391
///
390392
/// A `RUSTLS_RESULT_BUILDER_INCOMPATIBLE_TLS_VERSIONS` error is returned if the builder's
391393
/// TLS versions have been customized via `rustls_client_config_builder_new_custom()`

src/rustls.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,9 @@ rustls_result rustls_client_config_builder_set_key_log(struct rustls_client_conf
17681768
*
17691769
* The provided `ech_config_list_bytes` and `rustls_hpke` must not be NULL or an
17701770
* error will be returned. The caller maintains ownership of the ECH config list TLS bytes
1771-
* and `rustls_hpke` instance.
1771+
* and `rustls_hpke` instance. The lifetime of the `ech_config_list_bytes` and `rustls_hpke`
1772+
* instance are not tied to the lifetime of the `rustls_client_config_builder` and can be
1773+
* freed at any time after this function returns without affecting the builder.
17721774
*
17731775
* A `RUSTLS_RESULT_BUILDER_INCOMPATIBLE_TLS_VERSIONS` error is returned if the builder's
17741776
* TLS versions have been customized via `rustls_client_config_builder_new_custom()`

0 commit comments

Comments
 (0)