Module rustls_ffi::server
source · Structs§
- The TLS Client Hello information provided to a ClientHelloCallback function.
server_name
is the value of the ServerNameIndication extension provided by the client. If the client did not send an SNI, the length of thisrustls_string
will be 0. The signature_schemes field carries the values supplied by the client or, if the client did not send this TLS extension, the default schemes in the rustls library. See: https://docs.rs/rustls/latest/rustls/internal/msgs/enums/enum.SignatureScheme.html.alpn
carries the list of ALPN protocol names that the client proposed to the server. Again, the length of this list will be 0 if none were supplied. - A server config that is done being constructed and is now read-only. Under the hood, this object corresponds to an
Arc<ServerConfig>
. https://docs.rs/rustls/latest/rustls/struct.ServerConfig.html - A server config being constructed. A builder can be modified by, e.g. rustls_server_config_builder_load_native_roots. Once you’re done configuring settings, call rustls_server_config_builder_build to turn it into a *const rustls_server_config. This object is not safe for concurrent mutation. https://docs.rs/rustls/latest/rustls/struct.ConfigBuilder.html
Functions§
- Select a
rustls_certified_key
from the list that matches the cryptographic parameters of a TLS client hello. Note that this does not do any SNI matching. The input certificates should already have been filtered to ones matching the SNI from the client hello. - Copy the server name from the server name indication (SNI) extension to
buf
which can hold up tocount
bytes, and the length of that server name inout_n
. The string is stored in UTF-8 with no terminating NUL byte. Returns RUSTLS_RESULT_INSUFFICIENT_SIZE if the SNI hostname is longer thancount
. Returns Ok with *out_n == 0 if there is no SNI hostname available on this connection because it hasn’t been processed yet, or because the client did not send SNI. https://docs.rs/rustls/latest/rustls/server/struct.ServerConnection.html#method.server_name
Type Aliases§
- Prototype of a callback that can be installed by the application at the
rustls_server_config
. This callback will be invoked by arustls_connection
once the TLS client hello message has been received.userdata
will be set based on rustls_connection_set_userdata.hello
gives the value of the available client announcements, as interpreted by rustls. See the definition ofrustls_client_hello
for details. - Any context information the callback will receive when invoked.