Function esp_idf_svc::sys::mbedtls_ssl_set_verify

source ยท
pub unsafe extern "C" fn mbedtls_ssl_set_verify(
    ssl: *mut mbedtls_ssl_context,
    f_vrfy: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut mbedtls_x509_crt, _: i32, _: *mut u32) -> i32>,
    p_vrfy: *mut c_void,
)
Expand description

\brief Set a connection-specific verification callback (optional).

            If set, the provided verify callback is called for each
            certificate in the peer's CRT chain, including the trusted
            root. For more information, please see the documentation of
            \c mbedtls_x509_crt_verify().

\note This call is analogous to mbedtls_ssl_conf_verify() but binds the verification callback and context to an SSL context as opposed to an SSL configuration. If mbedtls_ssl_conf_verify() and mbedtls_ssl_set_verify() are both used, mbedtls_ssl_set_verify() takes precedence.

\param ssl The SSL context to use. \param f_vrfy The verification callback to use during CRT verification. \param p_vrfy The opaque context to be passed to the callback.