pub unsafe extern "C" fn esp_tls_set_global_ca_store(
    cacert_pem_buf: *const c_uchar,
    cacert_pem_bytes: c_uint
) -> esp_err_t
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.