pub trait PkiRpkSniKeyProvider<KTY: KeyType> {
// Required method
fn key_for_sni(&self, sni: &CStr) -> Option<Box<dyn KeyDef<KeyType = KTY>>>;
}Expand description
Trait for things that can provide RPK/PKI DTLS keys for a given Server Name Indication.
Required Methods§
Sourcefn key_for_sni(&self, sni: &CStr) -> Option<Box<dyn KeyDef<KeyType = KTY>>>
fn key_for_sni(&self, sni: &CStr) -> Option<Box<dyn KeyDef<KeyType = KTY>>>
Provide a key for the server name indication given as sni, or None if the SNI is not
valid and no key is available.
Note that libcoap will remember the returned key and re-use it for future handshakes with
the same SNI (even if the peer is not the same), the return value should therefore not
depend on the provided session.