@@ -31,9 +31,11 @@ box_castable! {
31
31
/// A client config being constructed. A builder can be modified by,
32
32
/// e.g. rustls_client_config_builder_load_roots_from_file. Once you're
33
33
/// done configuring settings, call rustls_client_config_builder_build
34
- /// to turn it into a *rustls_client_config. Alternatively, if an error
35
- /// occurs or, you don't wish to build a config, call
36
- /// `rustls_client_config_builder_free` to free the builder directly.
34
+ /// to turn it into a *rustls_client_config.
35
+ ///
36
+ /// Alternatively, if an error occurs or, you don't wish to build a config,
37
+ /// call `rustls_client_config_builder_free` to free the builder directly.
38
+ ///
37
39
/// This object is not safe for concurrent mutation. Under the hood,
38
40
/// it corresponds to a `Box<ClientConfig>`.
39
41
/// <https://docs.rs/rustls/latest/rustls/struct.ConfigBuilder.html>
@@ -98,14 +100,17 @@ impl ServerCertVerifier for NoneVerifier {
98
100
impl rustls_client_config_builder {
99
101
/// Create a rustls_client_config_builder. Caller owns the memory and must
100
102
/// eventually call rustls_client_config_builder_build, then free the
101
- /// resulting rustls_client_config. Alternatively, if an error occurs
102
- /// or, you don't wish to build a config, call `rustls_client_config_builder_free`
103
- /// to free the builder directly.
103
+ /// resulting rustls_client_config.
104
+ ///
105
+ /// Alternatively, if an error occurs or, you don't wish to build a config,
106
+ /// call `rustls_client_config_builder_free` to free the builder directly.
107
+ ///
104
108
/// This uses rustls safe default values for the cipher suites, key exchange
105
109
/// groups and protocol versions.
106
- /// This starts out with no trusted roots.
107
- /// Caller must add roots with rustls_client_config_builder_load_roots_from_file
108
- /// or provide a custom verifier.
110
+ ///
111
+ /// This starts out with no trusted roots. Caller must add roots with
112
+ /// rustls_client_config_builder_load_roots_from_file or provide a custom
113
+ /// verifier.
109
114
#[ no_mangle]
110
115
pub extern "C" fn rustls_client_config_builder_new ( ) -> * mut rustls_client_config_builder {
111
116
ffi_panic_boundary ! {
@@ -129,22 +134,26 @@ impl rustls_client_config_builder {
129
134
130
135
/// Create a rustls_client_config_builder. Caller owns the memory and must
131
136
/// eventually call rustls_client_config_builder_build, then free the
132
- /// resulting rustls_client_config. Alternatively, if an error occurs
133
- /// or, you don't wish to build a config, call `rustls_client_config_builder_free`
134
- /// to free the builder directly. Specify cipher suites in preference
135
- /// order; the `cipher_suites` parameter must point to an array containing
136
- /// `len` pointers to `rustls_supported_ciphersuite` previously obtained
137
- /// from `rustls_all_ciphersuites_get_entry()`, or to a provided array,
138
- /// RUSTLS_DEFAULT_CIPHER_SUITES or RUSTLS_ALL_CIPHER_SUITES. Set the TLS
139
- /// protocol versions to use when negotiating a TLS session.
137
+ /// resulting rustls_client_config.
138
+ ///
139
+ /// Alternatively, if an error occurs or, you don't wish to build a config,
140
+ /// call `rustls_client_config_builder_free` to free the builder directly.
141
+ ///
142
+ /// Specify cipher suites in preference order; the `cipher_suites` parameter
143
+ /// must point to an array containing `cipher_suites_len` pointers to
144
+ /// `rustls_supported_ciphersuite` previously obtained from
145
+ /// `rustls_all_ciphersuites_get_entry()`, or to a provided array,
146
+ /// RUSTLS_DEFAULT_CIPHER_SUITES or RUSTLS_ALL_CIPHER_SUITES.
140
147
///
148
+ /// Set the TLS protocol versions to use when negotiating a TLS session.
141
149
/// `tls_version` is the version of the protocol, as defined in rfc8446,
142
150
/// ch. 4.2.1 and end of ch. 5.1. Some values are defined in
143
151
/// `rustls_tls_version` for convenience, and the arrays
144
152
/// RUSTLS_DEFAULT_VERSIONS or RUSTLS_ALL_VERSIONS can be used directly.
145
153
///
146
- /// `versions` will only be used during the call and the application retains
147
- /// ownership. `len` is the number of consecutive `uint16_t` pointed to by `versions`.
154
+ /// `tls_versions` will only be used during the call and the application retains
155
+ /// ownership. `tls_versions_len` is the number of consecutive `uint16_t`
156
+ /// pointed to by `tls_versions`.
148
157
#[ no_mangle]
149
158
pub extern "C" fn rustls_client_config_builder_new_custom (
150
159
cipher_suites : * const * const rustls_supported_ciphersuite ,
0 commit comments