Merge branch 'cleanup/remove_deprecated_apis' into 'master'

feat: remove some deprecated APIs from 6.0 release

Closes IDF-13093

See merge request espressif/esp-idf!41211
This commit is contained in:
Mahavir Jain
2025-08-21 10:05:37 +05:30
19 changed files with 111 additions and 204 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -9,13 +9,3 @@
#include "esp_ota_ops.h"
#include "esp_attr.h"
#include "sdkconfig.h"
const esp_app_desc_t *esp_ota_get_app_description(void)
{
return esp_app_get_description();
}
int esp_ota_get_app_elf_sha256(char* dst, size_t size)
{
return esp_app_get_elf_sha256(dst, size);
}

View File

@@ -42,30 +42,6 @@ extern "C"
*/
typedef uint32_t esp_ota_handle_t;
/**
* @brief Return esp_app_desc structure. This structure includes app version.
*
* @note This API is present for backward compatibility reasons. Alternative function
* with the same functionality is `esp_app_get_description`
*
* Return description for running app.
* @return Pointer to esp_app_desc structure.
*/
const esp_app_desc_t *esp_ota_get_app_description(void) __attribute__((deprecated("Please use esp_app_get_description instead")));
/**
* @brief Fill the provided buffer with SHA256 of the ELF file, formatted as hexadecimal, null-terminated.
* If the buffer size is not sufficient to fit the entire SHA256 in hex plus a null terminator,
* the largest possible number of bytes will be written followed by a null.
*
* @note This API is present for backward compatibility reasons. Alternative function
* with the same functionality is `esp_app_get_elf_sha256`
*
* @param dst Destination buffer
* @param size Size of the buffer
* @return Number of bytes written to dst (including null terminator)
*/
int esp_ota_get_app_elf_sha256(char* dst, size_t size) __attribute__((deprecated("Please use esp_app_get_elf_sha256 instead")));
/**
* @brief Commence an OTA update writing to the specified partition.

View File

@@ -269,15 +269,6 @@ typedef struct {
#endif // !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_FULL >= 300
/** @brief Legacy ECDSA verification function
*
* @note Deprecated, call either esp_secure_boot_verify_ecdsa_signature_block() or esp_secure_boot_verify_rsa_signature_block() instead.
*
* @param sig_block Pointer to ECDSA signature block data
* @param image_digest Pointer to 32 byte buffer holding SHA-256 hash.
*/
esp_err_t esp_secure_boot_verify_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest)
__attribute__((deprecated("use esp_secure_boot_verify_ecdsa_signature_block instead")));
#define FLASH_OFFS_SECURE_BOOT_IV_DIGEST 0

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -53,11 +53,6 @@ esp_err_t esp_secure_boot_verify_signature(uint32_t src_addr, uint32_t length)
return err;
}
esp_err_t esp_secure_boot_verify_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest)
{
uint8_t verified_digest[ESP_SECURE_BOOT_DIGEST_LEN] = { 0 };
return esp_secure_boot_verify_ecdsa_signature_block(sig_block, image_digest, verified_digest);
}
esp_err_t esp_secure_boot_verify_ecdsa_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest, uint8_t *verified_digest)
{

View File

@@ -603,28 +603,6 @@ static int get_port(const char *url, struct http_parser_url *u)
return 0;
}
esp_tls_t *esp_tls_conn_http_new(const char *url, const esp_tls_cfg_t *cfg)
{
if (!url || !cfg) {
return NULL;
}
/* Parse URI */
struct http_parser_url u;
http_parser_url_init(&u);
http_parser_parse_url(url, strlen(url), 0, &u);
esp_tls_t *tls = esp_tls_init();
if (!tls) {
return NULL;
}
/* Connect to host */
if (esp_tls_conn_new_sync(&url[u.field_data[UF_HOST].off], u.field_data[UF_HOST].len,
get_port(url, &u), cfg, tls) == 1) {
return tls;
}
esp_tls_conn_destroy(tls);
return NULL;
}
/**
* @brief Create a new TLS/SSL connection with a given "HTTP" url

View File

@@ -402,21 +402,6 @@ typedef struct esp_tls esp_tls_t;
*/
esp_tls_t *esp_tls_init(void);
/**
* @brief Create a new blocking TLS/SSL connection with a given "HTTP" url
*
* Note: This API is present for backward compatibility reasons. Alternative function
* with the same functionality is `esp_tls_conn_http_new_sync` (and its asynchronous version
* `esp_tls_conn_http_new_async`)
*
* @param[in] url url of host.
* @param[in] cfg TLS configuration as esp_tls_cfg_t. If you wish to open
* non-TLS connection, keep this NULL. For TLS connection,
* a pass pointer to 'esp_tls_cfg_t'. At a minimum, this
* structure should be zero-initialized.
* @return pointer to esp_tls_t, or NULL if connection couldn't be opened.
*/
esp_tls_t *esp_tls_conn_http_new(const char *url, const esp_tls_cfg_t *cfg) __attribute__((deprecated("Please use esp_tls_conn_http_new_sync (or its asynchronous version esp_tls_conn_http_new_async) instead")));
/**
* @brief Create a new blocking TLS/SSL connection

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -260,13 +260,6 @@ typedef struct esp_local_ctrl_proto_sec_cfg {
*/
void *custom_handle;
/* Anonymous union */
union {
/**
* Proof of possession to be used for local control. Could be NULL.
*/
const void *pop __attribute__((deprecated("use sec_params field instead")));
/**
* Pointer to security params (NULL if not needed).
* This is not needed for protocomm security 0
@@ -275,7 +268,6 @@ typedef struct esp_local_ctrl_proto_sec_cfg {
* and esp_local_ctrl_security2_params_t for protocomm security 2 respectively. Could be NULL.
*/
const void *sec_params;
};
} esp_local_ctrl_proto_sec_cfg_t;
/**

View File

@@ -150,12 +150,6 @@ static int esp_aes_validate_input(esp_aes_context *ctx, const unsigned char *inp
}
void esp_aes_encrypt(esp_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
{
esp_internal_aes_encrypt(ctx, input, output);
}
/*
* AES-ECB block encryption
@@ -182,12 +176,6 @@ int esp_internal_aes_encrypt(esp_aes_context *ctx,
return r;
}
void esp_aes_decrypt(esp_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
{
esp_internal_aes_decrypt(ctx, input, output);
}
/*
* AES-ECB block decryption

View File

@@ -106,12 +106,6 @@ int esp_internal_aes_encrypt(esp_aes_context *ctx,
return r;
}
void esp_aes_encrypt(esp_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
{
esp_internal_aes_encrypt(ctx, input, output);
}
/*
* AES-ECB single block decryption
@@ -140,12 +134,6 @@ int esp_internal_aes_decrypt(esp_aes_context *ctx,
return r;
}
void esp_aes_decrypt(esp_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
{
esp_internal_aes_decrypt(ctx, input, output);
}
/*

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -109,50 +109,6 @@ err:
return ret;
}
esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral)
{
int rx_ch_id = 0;
esp_err_t ret = ESP_OK;
if (tx_channel == NULL) {
/* Allocate a pair of RX and TX for crypto, should only happen the first time we use the GMDA
or if user called esp_crypto_shared_gdma_release */
ret = crypto_shared_gdma_init();
}
if (ret != ESP_OK) {
return ret;
}
/* Tx channel is shared between AES and SHA, need to connect to peripheral every time */
gdma_disconnect(tx_channel);
#ifdef SOC_SHA_SUPPORTED
if (peripheral == GDMA_TRIG_PERIPH_SHA) {
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_SHA, 0));
} else
#endif // SOC_SHA_SUPPORTED
#ifdef SOC_AES_SUPPORTED
if (peripheral == GDMA_TRIG_PERIPH_AES) {
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_AES, 0));
} else
#endif // SOC_AES_SUPPORTED
{
return ESP_ERR_INVALID_ARG;
}
/* tx channel is reset by gdma_connect(), also reset rx to ensure a known state */
gdma_get_channel_id(rx_channel, &rx_ch_id);
#if SOC_AHB_GDMA_VERSION == 1
gdma_ll_rx_reset_channel(&GDMA, rx_ch_id);
#endif /* SOC_AHB_GDMA_VERSION */
gdma_start(tx_channel, (intptr_t)input);
gdma_start(rx_channel, (intptr_t)output);
return ESP_OK;
}
/* The external memory ecc-aes access must be enabled when there exists
at least one buffer in the DMA descriptors that resides in external memory. */

View File

@@ -345,11 +345,6 @@ int esp_internal_aes_decrypt( esp_aes_context *ctx, const unsigned char input[16
/** XTS-AES buffer encryption/decryption */
int esp_aes_crypt_xts( esp_aes_xts_context *ctx, int mode, size_t length, const unsigned char data_unit[16], const unsigned char *input, unsigned char *output );
/** Deprecated, see esp_aes_internal_decrypt */
void esp_aes_decrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ) __attribute__((deprecated));
/** Deprecated, see esp_aes_internal_encrypt */
void esp_aes_encrypt( esp_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ) __attribute__((deprecated));
#ifdef __cplusplus
}

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -15,19 +15,6 @@
extern "C" {
#endif
/**
* @brief Start a GDMA transfer on the shared crypto DMA channel
* Only supports AHB-DMA.
*
* @note Will allocate a GDMA channel for AES & SHA if no such channel is already allocated
*
* @param input Input linked list descriptor (lldesc_t *)
* @param output Output linked list descriptor (lldesc_t *)
* @param peripheral Crypto peripheral to connect the DMA to, either GDMA_TRIG_PERIPH_AES or
* GDMA_TRIG_PERIPH_SHA
* @return esp_err_t ESP_FAIL if no GDMA channel available
*/
esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral) __attribute__((deprecated("use esp_crypto_shared_gdma_start_axi_ahb instead")));
/**
* @brief Start a GDMA transfer on the shared crypto DMA channel
@@ -60,7 +47,7 @@ bool esp_crypto_shared_gdma_done(void);
* This means this function should not be called from code which already takes these locks,
* i.e. inside our AES/SHA code.
*
* If you are continously using AES/SHA (e.g. because of a wifi connection) then it's not recommended
* If you are continuously using AES/SHA (e.g. because of a wifi connection) then it's not recommended
* to use this API. Freeing the channel is mainly for use cases where you are finished with the crypto peripherals
* and need the DMA channel for other peripherals. An example would be doing some processing after disconnecting WiFi
*/

View File

@@ -41,7 +41,6 @@ typedef struct protocomm_security1_params {
uint16_t len;
} protocomm_security1_params_t;
typedef protocomm_security1_params_t protocomm_security_pop_t __attribute__((deprecated("Use protocomm_security1_params_t instead")));
/**
* @brief Protocomm Security 2 parameters: Salt and Verifier

View File

@@ -1,8 +1,24 @@
ESP-Modbus
==========
Protocols
=========
:link_to_translation:`zh_CN:[中文]`
ESP-TLS
-------
**Removed Deprecated API**
The deprecated :cpp:func:`esp_tls_conn_http_new` function has been removed. Use either:
- :cpp:func:`esp_tls_conn_http_new_sync` for blocking connections
- :cpp:func:`esp_tls_conn_http_new_async` for non-blocking connections
The new API requires you to create the :cpp:type:`esp_tls_t` structure using :cpp:func:`esp_tls_init` and provides better control over the connection process.
ESP-Modbus
----------
The Espressif ESP-Modbus Library (esp-modbus) supports Modbus communication in the networks based on RS485, Wi-Fi, and Ethernet interfaces.
The component ``esp-modbus v2 (v2.x.x)`` is the current supported component version:

View File

@@ -11,3 +11,22 @@ Mbed TLS
.. only:: SOC_SHA_SUPPORTED
The SHA module headers ``sha/sha_dma.h`` and ``sha/sha_block.h`` are also deprecated and removed. You should include ``sha/sha_core.h`` instead.
**Removed Deprecated APIs**
The following deprecated functions have been removed:
- :cpp:func:`esp_aes_encrypt` Use :cpp:func:`esp_internal_aes_encrypt` instead.
- :cpp:func:`esp_aes_decrypt` Use :cpp:func:`esp_internal_aes_decrypt` instead.
- :cpp:func:`esp_crypto_shared_gdma_start` Use :cpp:func:`esp_crypto_shared_gdma_start_axi_ahb` instead.
Note that the new AES functions return error codes for better error handling, unlike the old void functions.
Bootloader Support
------------------
**Removed Deprecated APIs**
The following deprecated functions have been removed:
- :cpp:func:`esp_secure_boot_verify_signature_block` Use :cpp:func:`esp_secure_boot_verify_ecdsa_signature_block` instead.

View File

@@ -148,6 +148,15 @@ The partial download functionality in ESP HTTPS OTA has been moved under a confi
To use partial download features in your OTA applications, you need to enable the component-level configuration :ref:`CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD` in menuconfig (``Component config````ESP HTTPS OTA````Enable partial HTTP download for OTA``).
**Removed Deprecated APIs**
The following deprecated functions have been removed from the ``app_update`` component:
- :cpp:func:`esp_ota_get_app_description` Use :cpp:func:`esp_app_get_description` instead.
- :cpp:func:`esp_ota_get_app_elf_sha256` Use :cpp:func:`esp_app_get_elf_sha256` instead.
These functions have moved to the ``esp_app_format`` component. Update your include from ``esp_ota_ops.h`` to ``esp_app_desc.h`` and add ``esp_app_format`` to your component dependencies if needed.
Gcov
----

View File

@@ -1,8 +1,23 @@
ESP-Modbus
==========
协议
=========
:link_to_translation:`en:[English]`
ESP-TLS
-------
**已移除的废弃 API**
已移除废弃函数 :cpp:func:`esp_tls_conn_http_new`。请使用以下替代函数:
- :cpp:func:`esp_tls_conn_http_new_sync` 用于阻塞连接
- :cpp:func:`esp_tls_conn_http_new_async` 用于非阻塞连接
新 API 需要您使用 :cpp:func:`esp_tls_init` 创建 :cpp:type:`esp_tls_t` 结构,并提供对连接过程的更好控制。
ESP-Modbus
----------
乐鑫ESP-Modbus 库 (esp-modbus) 支持基于 RS485、Wi-Fi 和以太网接口网络的 Modbus 通信。
``esp-modbus v2 (v2.x.x)`` 组件是当前支持的组件版本:

View File

@@ -11,3 +11,22 @@ Mbed TLS
.. only:: SOC_SHA_SUPPORTED
SHA 模块头文件 ``sha/sha_dma.h````sha/sha_block.h`` 也已废弃并被移除,请改为包含 ``sha/sha_core.h``
**已移除的废弃 API**
以下废弃函数已被移除:
- :cpp:func:`esp_aes_encrypt` 请使用 :cpp:func:`esp_internal_aes_encrypt` 代替。
- :cpp:func:`esp_aes_decrypt` 请使用 :cpp:func:`esp_internal_aes_decrypt` 代替。
- :cpp:func:`esp_crypto_shared_gdma_start` 请使用 :cpp:func:`esp_crypto_shared_gdma_start_axi_ahb` 代替。
注意,新的 AES 函数返回错误代码以提供更好的错误处理,与返回 void 的旧函数不同。
引导加载程序支持
------------------
**已移除的废弃 API**
以下废弃函数已被移除:
- :cpp:func:`esp_secure_boot_verify_signature_block` 请使用 :cpp:func:`esp_secure_boot_verify_ecdsa_signature_block` 代替。

View File

@@ -148,6 +148,15 @@ ESP HTTPS OTA 的分段下载功能已移至配置选项下,以便在未使用
如果要在 OTA 应用中使用分段下载功能,需要在 menuconfig 中启用组件级配置 :ref:`CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD` (``Component config````ESP HTTPS OTA````Enable partial HTTP download for OTA``)。
**已移除的废弃 API**
以下废弃函数已从 ``app_update`` 组件中移除:
- :cpp:func:`esp_ota_get_app_description` 请使用 :cpp:func:`esp_app_get_description` 代替。
- :cpp:func:`esp_ota_get_app_elf_sha256` 请使用 :cpp:func:`esp_app_get_elf_sha256` 代替。
这些函数已移至 ``esp_app_format`` 组件。请将包含文件从 ``esp_ota_ops.h`` 更新为 ``esp_app_desc.h``,如有需要请将 ``esp_app_format`` 添加到您的组件依赖项中。
Gcov
----