[][src]Type Definition libcoap_sys::coap_dtls_sni_callback_t

type coap_dtls_sni_callback_t = Option<unsafe extern "C" fn(sni: *const c_char, arg: *mut c_void) -> *mut coap_dtls_key_t>;

Server Name Indication (SNI) Validation call-back that can be set up by coap_context_set_pki(). Invoked if the SNI is not previously seen and prior to sending a certificate set back to the client so that the appropriate certificate set can be used based on the requesting SNI.

@param sni The requested SNI @param arg The same as was passed into coap_context_set_pki() in setup_data->sni_call_back_arg

@return New set of certificates to use, or @c NULL if SNI is to be rejected.