Function esp_idf_svc::hal::sys::mbedtls_ssl_conf_sni

source ยท
pub unsafe extern "C" fn mbedtls_ssl_conf_sni(
    conf: *mut mbedtls_ssl_config,
    f_sni: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut mbedtls_ssl_context, _: *const u8, _: usize) -> i32>,
    p_sni: *mut c_void,
)
Expand description

\brief Set server side ServerName TLS extension callback (optional, server-side only).

            If set, the ServerName callback is called whenever the
            server receives a ServerName TLS extension from the client
            during a handshake. The ServerName callback has the
            following parameters: (void *parameter, mbedtls_ssl_context *ssl,
            const unsigned char *hostname, size_t len). If a suitable
            certificate is found, the callback must set the
            certificate(s) and key(s) to use with \c
            mbedtls_ssl_set_hs_own_cert() (can be called repeatedly),
            and may optionally adjust the CA and associated CRL with \c
            mbedtls_ssl_set_hs_ca_chain() as well as the client
            authentication mode with \c mbedtls_ssl_set_hs_authmode(),
            then must return 0. If no matching name is found, the
            callback may return non-zero to abort the handshake.

\param conf SSL configuration \param f_sni verification function \param p_sni verification parameter