Function esp_idf_svc::hal::sys::mbedtls_ssl_setup
source ยท pub unsafe extern "C" fn mbedtls_ssl_setup(
ssl: *mut mbedtls_ssl_context,
conf: *const mbedtls_ssl_config,
) -> i32
Expand description
\brief Set up an SSL context for use
\note No copy of the configuration context is made, it can be shared by many mbedtls_ssl_context structures.
\warning The conf structure will be accessed during the session. It must not be modified or freed as long as the session is active.
\warning This function must be called exactly once per context. Calling mbedtls_ssl_setup again is not supported, even if no session is active.
\note If #MBEDTLS_USE_PSA_CRYPTO is enabled, the PSA crypto subsystem must have been initialized by calling psa_crypto_init() before calling this function.
\param ssl SSL context \param conf SSL configuration to use
\return 0 if successful, or MBEDTLS_ERR_SSL_ALLOC_FAILED if memory allocation failed