Function esp_idf_hal::sys::mbedtls_ssl_get_hs_sni
source · pub unsafe extern "C" fn mbedtls_ssl_get_hs_sni(
ssl: *mut mbedtls_ssl_context,
name_len: *mut usize,
) -> *const u8
Expand description
\brief Retrieve SNI extension value for the current handshake. Available in \c f_cert_cb of \c mbedtls_ssl_conf_cert_cb(), this is the same value passed to \c f_sni callback of \c mbedtls_ssl_conf_sni() and may be used instead of \c mbedtls_ssl_conf_sni().
\param ssl SSL context \param name_len pointer into which to store length of returned value. 0 if SNI extension is not present or not yet processed.
\return const pointer to SNI extension value. - value is valid only when called in \c f_cert_cb registered with \c mbedtls_ssl_conf_cert_cb(). - value is NULL if SNI extension is not present. - value is not ‘\0’-terminated. Use \c name_len for len. - value must not be freed.