pub trait KeyExchangeSelector:
Debug
+ Send
+ Sync {
// Required method
fn select_key_exchange(
&self,
client: &mut dyn Iterator<Item = OfferedKxGroup>,
server: &[&'static dyn SupportedKxGroup],
) -> Option<&'static dyn SupportedKxGroup>;
}Expand description
Chooses the key exchange group for a TLS connection.
Required Methods§
Sourcefn select_key_exchange(
&self,
client: &mut dyn Iterator<Item = OfferedKxGroup>,
server: &[&'static dyn SupportedKxGroup],
) -> Option<&'static dyn SupportedKxGroup>
fn select_key_exchange( &self, client: &mut dyn Iterator<Item = OfferedKxGroup>, server: &[&'static dyn SupportedKxGroup], ) -> Option<&'static dyn SupportedKxGroup>
Choose a key exchange group, given the client’s and server’s options.
client holds the groups from the client’s supported_groups extension, in the
client’s order, filtered to those the server supports and that suit the protocol
version and the selected cipher suite. server is the CryptoProvider’s
kx_groups, in preference order.
If the chosen group has no key share (see OfferedKxGroup::has_key_share),
a TLS 1.3 server sends a HelloRetryRequest for it.
Returns None if no acceptable group is offered. The result must come from
client.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".