@@ -400,8 +400,9 @@ typedef struct rustls_client_hello {
400
400
* NOTE:
401
401
* - the passed in `hello` and all its values are only available during the
402
402
* callback invocations.
403
- * - the passed callback function must be implemented thread-safe, unless
404
- * there is only a single config and session where it is installed.
403
+ * - the passed callback function must be safe to call multiple times concurrently
404
+ * with the same userdata, unless there is only a single config and connection
405
+ * where it is installed.
405
406
*
406
407
* EXPERIMENTAL: this feature of crustls is likely to change in the future, as
407
408
* the rustls library is re-evaluating their current approach to client hello handling.
@@ -683,7 +684,7 @@ rustls_result rustls_client_config_builder_new_custom(const struct rustls_suppor
683
684
*
684
685
* If you intend to write a verifier that accepts all certificates, be aware
685
686
* that special measures are required for IP addresses. Rustls currently
686
- * (0.20.0) doesn't support building a ClientSession with an IP address
687
+ * (0.20.0) doesn't support building a ClientConnection with an IP address
687
688
* (because it's not a valid DnsNameRef). One workaround is to detect IP
688
689
* addresses and rewrite them to `example.invalid`, and _also_ to disable
689
690
* SNI via rustls_client_config_builder_set_enable_sni (IP addresses don't
@@ -742,7 +743,7 @@ void rustls_client_config_builder_set_enable_sni(struct rustls_client_config_bui
742
743
bool enable);
743
744
744
745
/* *
745
- * Provide the configuration a list of certificates where the session
746
+ * Provide the configuration a list of certificates where the connection
746
747
* will select the first one that is compatible with the server's signature
747
748
* verification capabilities. Clients that want to support both ECDSA and
748
749
* RSA certificates will want the ECSDA to go first in the list.
@@ -787,7 +788,7 @@ void rustls_client_config_free(const struct rustls_client_config *config);
787
788
/* *
788
789
* Create a new rustls_connection containing a client connection and return
789
790
* it in the output parameter `out`. If this returns an error code, the
790
- * memory pointed to by `session_out ` remains unchanged. If this returns a
791
+ * memory pointed to by `conn_out ` remains unchanged. If this returns a
791
792
* non-error, the memory pointed to by `conn_out` is modified to point at a
792
793
* valid rustls_connection. The caller now owns the rustls_connection and must
793
794
* call `rustls_connection_free` when done with it.
@@ -1112,7 +1113,7 @@ rustls_result rustls_server_config_builder_set_alpn_protocols(struct rustls_serv
1112
1113
size_t len);
1113
1114
1114
1115
/* *
1115
- * Provide the configuration a list of certificates where the session
1116
+ * Provide the configuration a list of certificates where the connection
1116
1117
* will select the first one that is compatible with the client's signature
1117
1118
* verification capabilities. Servers that want to support both ECDSA and
1118
1119
* RSA certificates will want the ECSDA to go first in the list.
@@ -1148,8 +1149,8 @@ void rustls_server_config_free(const struct rustls_server_config *config);
1148
1149
/* *
1149
1150
* Create a new rustls_connection containing a server connection, and return it
1150
1151
* in the output parameter `out`. If this returns an error code, the memory
1151
- * pointed to by `session_out ` remains unchanged. If this returns a non-error,
1152
- * the memory pointed to by `session_out ` is modified to point
1152
+ * pointed to by `conn_out ` remains unchanged. If this returns a non-error,
1153
+ * the memory pointed to by `conn_out ` is modified to point
1153
1154
* at a valid rustls_connection. The caller now owns the rustls_connection
1154
1155
* and must call `rustls_connection_free` when done with it.
1155
1156
*/
@@ -1161,7 +1162,7 @@ rustls_result rustls_server_connection_new(const struct rustls_server_config *co
1161
1162
* and the length of that hostname in `out_n`. The string is stored in UTF-8
1162
1163
* with no terminating NUL byte.
1163
1164
* Returns RUSTLS_RESULT_INSUFFICIENT_SIZE if the SNI hostname is longer than `count`.
1164
- * Returns Ok with *out_n == 0 if there is no SNI hostname available on this session
1165
+ * Returns Ok with *out_n == 0 if there is no SNI hostname available on this connection
1165
1166
* because it hasn't been processed yet, or because the client did not send SNI.
1166
1167
* <https://docs.rs/rustls/0.20.0/rustls/server/struct.ServerConnection.html#method.sni_hostname>
1167
1168
*/
@@ -1171,8 +1172,8 @@ rustls_result rustls_server_connection_get_sni_hostname(const struct rustls_conn
1171
1172
size_t *out_n);
1172
1173
1173
1174
/* *
1174
- * Register a callback to be invoked when a session created from this config
1175
- * is seeing a TLS ClientHello message. If `userdata` has been set with
1175
+ * Register a callback to be invoked when a connection created from this config
1176
+ * sees a TLS ClientHello message. If `userdata` has been set with
1176
1177
* rustls_connection_set_userdata, it will be passed to the callback.
1177
1178
* Otherwise the userdata param passed to the callback will be NULL.
1178
1179
*
@@ -1213,7 +1214,7 @@ rustls_result rustls_client_hello_select_certified_key(const struct rustls_clien
1213
1214
/* *
1214
1215
* Register callbacks for persistence of TLS session IDs and secrets. Both
1215
1216
* keys and values are highly sensitive data, containing enough information
1216
- * to break the security of the sessions involved.
1217
+ * to break the security of the connections involved.
1217
1218
*
1218
1219
* If `userdata` has been set with rustls_connection_set_userdata, it
1219
1220
* will be passed to the callbacks. Otherwise the userdata param passed to
0 commit comments