Function esp_idf_svc::sys::esp_tls_set_global_ca_store

source ยท
pub unsafe extern "C" fn esp_tls_set_global_ca_store(
    cacert_pem_buf: *const u8,
    cacert_pem_bytes: u32,
) -> i32
Expand description

@brief Set the global CA store with the buffer provided in pem format.

This function should be called if the application wants to set the global CA store for multiple connections i.e. to add the certificates in the provided buffer to the certificate chain. This function implicitly calls esp_tls_init_global_ca_store() if it has not already been called. The application must call this function before calling esp_tls_conn_new().

@param[in] cacert_pem_buf Buffer which has certificates in pem format. This buffer is used for creating a global CA store, which can be used by other tls connections. @param[in] cacert_pem_bytes Length of the buffer.

@return - ESP_OK if adding certificates was successful. - Other if an error occured or an action must be taken by the calling process.