Skip to content

Commit c91dc3f

Browse files
committed
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
2 parents f3c4f5a + 42914e0 commit c91dc3f

File tree

19 files changed

+111
-204
lines changed

19 files changed

+111
-204
lines changed
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -9,13 +9,3 @@
99
#include "esp_ota_ops.h"
1010
#include "esp_attr.h"
1111
#include "sdkconfig.h"
12-
13-
const esp_app_desc_t *esp_ota_get_app_description(void)
14-
{
15-
return esp_app_get_description();
16-
}
17-
18-
int esp_ota_get_app_elf_sha256(char* dst, size_t size)
19-
{
20-
return esp_app_get_elf_sha256(dst, size);
21-
}

components/app_update/include/esp_ota_ops.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,6 @@ extern "C"
4242
*/
4343
typedef uint32_t esp_ota_handle_t;
4444

45-
/**
46-
* @brief Return esp_app_desc structure. This structure includes app version.
47-
*
48-
* @note This API is present for backward compatibility reasons. Alternative function
49-
* with the same functionality is `esp_app_get_description`
50-
*
51-
* Return description for running app.
52-
* @return Pointer to esp_app_desc structure.
53-
*/
54-
const esp_app_desc_t *esp_ota_get_app_description(void) __attribute__((deprecated("Please use esp_app_get_description instead")));
55-
56-
/**
57-
* @brief Fill the provided buffer with SHA256 of the ELF file, formatted as hexadecimal, null-terminated.
58-
* If the buffer size is not sufficient to fit the entire SHA256 in hex plus a null terminator,
59-
* the largest possible number of bytes will be written followed by a null.
60-
*
61-
* @note This API is present for backward compatibility reasons. Alternative function
62-
* with the same functionality is `esp_app_get_elf_sha256`
63-
*
64-
* @param dst Destination buffer
65-
* @param size Size of the buffer
66-
* @return Number of bytes written to dst (including null terminator)
67-
*/
68-
int esp_ota_get_app_elf_sha256(char* dst, size_t size) __attribute__((deprecated("Please use esp_app_get_elf_sha256 instead")));
6945

7046
/**
7147
* @brief Commence an OTA update writing to the specified partition.

components/bootloader_support/include/esp_secure_boot.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,6 @@ typedef struct {
269269

270270
#endif // !CONFIG_IDF_TARGET_ESP32 || CONFIG_ESP32_REV_MIN_FULL >= 300
271271

272-
/** @brief Legacy ECDSA verification function
273-
*
274-
* @note Deprecated, call either esp_secure_boot_verify_ecdsa_signature_block() or esp_secure_boot_verify_rsa_signature_block() instead.
275-
*
276-
* @param sig_block Pointer to ECDSA signature block data
277-
* @param image_digest Pointer to 32 byte buffer holding SHA-256 hash.
278-
*/
279-
esp_err_t esp_secure_boot_verify_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest)
280-
__attribute__((deprecated("use esp_secure_boot_verify_ecdsa_signature_block instead")));
281272

282273

283274
#define FLASH_OFFS_SECURE_BOOT_IV_DIGEST 0

components/bootloader_support/src/secure_boot_v1/secure_boot_signatures_bootloader.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -53,11 +53,6 @@ esp_err_t esp_secure_boot_verify_signature(uint32_t src_addr, uint32_t length)
5353
return err;
5454
}
5555

56-
esp_err_t esp_secure_boot_verify_signature_block(const esp_secure_boot_sig_block_t *sig_block, const uint8_t *image_digest)
57-
{
58-
uint8_t verified_digest[ESP_SECURE_BOOT_DIGEST_LEN] = { 0 };
59-
return esp_secure_boot_verify_ecdsa_signature_block(sig_block, image_digest, verified_digest);
60-
}
6156

6257
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)
6358
{

components/esp-tls/esp_tls.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -603,28 +603,6 @@ static int get_port(const char *url, struct http_parser_url *u)
603603
return 0;
604604
}
605605

606-
esp_tls_t *esp_tls_conn_http_new(const char *url, const esp_tls_cfg_t *cfg)
607-
{
608-
if (!url || !cfg) {
609-
return NULL;
610-
}
611-
612-
/* Parse URI */
613-
struct http_parser_url u;
614-
http_parser_url_init(&u);
615-
http_parser_parse_url(url, strlen(url), 0, &u);
616-
esp_tls_t *tls = esp_tls_init();
617-
if (!tls) {
618-
return NULL;
619-
}
620-
/* Connect to host */
621-
if (esp_tls_conn_new_sync(&url[u.field_data[UF_HOST].off], u.field_data[UF_HOST].len,
622-
get_port(url, &u), cfg, tls) == 1) {
623-
return tls;
624-
}
625-
esp_tls_conn_destroy(tls);
626-
return NULL;
627-
}
628606

629607
/**
630608
* @brief Create a new TLS/SSL connection with a given "HTTP" url

components/esp-tls/esp_tls.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -402,21 +402,6 @@ typedef struct esp_tls esp_tls_t;
402402
*/
403403
esp_tls_t *esp_tls_init(void);
404404

405-
/**
406-
* @brief Create a new blocking TLS/SSL connection with a given "HTTP" url
407-
*
408-
* Note: This API is present for backward compatibility reasons. Alternative function
409-
* with the same functionality is `esp_tls_conn_http_new_sync` (and its asynchronous version
410-
* `esp_tls_conn_http_new_async`)
411-
*
412-
* @param[in] url url of host.
413-
* @param[in] cfg TLS configuration as esp_tls_cfg_t. If you wish to open
414-
* non-TLS connection, keep this NULL. For TLS connection,
415-
* a pass pointer to 'esp_tls_cfg_t'. At a minimum, this
416-
* structure should be zero-initialized.
417-
* @return pointer to esp_tls_t, or NULL if connection couldn't be opened.
418-
*/
419-
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")));
420405

421406
/**
422407
* @brief Create a new blocking TLS/SSL connection

components/esp_local_ctrl/include/esp_local_ctrl.h

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -260,22 +260,14 @@ typedef struct esp_local_ctrl_proto_sec_cfg {
260260
*/
261261
void *custom_handle;
262262

263-
/* Anonymous union */
264-
union {
265-
/**
266-
* Proof of possession to be used for local control. Could be NULL.
267-
*/
268-
const void *pop __attribute__((deprecated("use sec_params field instead")));
269-
270-
/**
271-
* Pointer to security params (NULL if not needed).
272-
* This is not needed for protocomm security 0
273-
* This pointer should hold the struct of type
274-
* esp_local_ctrl_security1_params_t for protocomm security 1
275-
* and esp_local_ctrl_security2_params_t for protocomm security 2 respectively. Could be NULL.
276-
*/
277-
const void *sec_params;
278-
};
263+
/**
264+
* Pointer to security params (NULL if not needed).
265+
* This is not needed for protocomm security 0
266+
* This pointer should hold the struct of type
267+
* esp_local_ctrl_security1_params_t for protocomm security 1
268+
* and esp_local_ctrl_security2_params_t for protocomm security 2 respectively. Could be NULL.
269+
*/
270+
const void *sec_params;
279271
} esp_local_ctrl_proto_sec_cfg_t;
280272

281273
/**

components/mbedtls/port/aes/block/esp_aes.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,6 @@ static int esp_aes_validate_input(esp_aes_context *ctx, const unsigned char *inp
150150
}
151151

152152

153-
void esp_aes_encrypt(esp_aes_context *ctx,
154-
const unsigned char input[16],
155-
unsigned char output[16] )
156-
{
157-
esp_internal_aes_encrypt(ctx, input, output);
158-
}
159153

160154
/*
161155
* AES-ECB block encryption
@@ -182,12 +176,6 @@ int esp_internal_aes_encrypt(esp_aes_context *ctx,
182176
return r;
183177
}
184178

185-
void esp_aes_decrypt(esp_aes_context *ctx,
186-
const unsigned char input[16],
187-
unsigned char output[16] )
188-
{
189-
esp_internal_aes_decrypt(ctx, input, output);
190-
}
191179

192180
/*
193181
* AES-ECB block decryption

components/mbedtls/port/aes/dma/esp_aes.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ int esp_internal_aes_encrypt(esp_aes_context *ctx,
106106
return r;
107107
}
108108

109-
void esp_aes_encrypt(esp_aes_context *ctx,
110-
const unsigned char input[16],
111-
unsigned char output[16] )
112-
{
113-
esp_internal_aes_encrypt(ctx, input, output);
114-
}
115109

116110
/*
117111
* AES-ECB single block decryption
@@ -140,12 +134,6 @@ int esp_internal_aes_decrypt(esp_aes_context *ctx,
140134
return r;
141135
}
142136

143-
void esp_aes_decrypt(esp_aes_context *ctx,
144-
const unsigned char input[16],
145-
unsigned char output[16] )
146-
{
147-
esp_internal_aes_decrypt(ctx, input, output);
148-
}
149137

150138

151139
/*

components/mbedtls/port/crypto_shared_gdma/esp_crypto_shared_gdma.c

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -109,50 +109,6 @@ static esp_err_t crypto_shared_gdma_init(void)
109109
return ret;
110110
}
111111

112-
esp_err_t esp_crypto_shared_gdma_start(const lldesc_t *input, const lldesc_t *output, gdma_trigger_peripheral_t peripheral)
113-
{
114-
int rx_ch_id = 0;
115-
esp_err_t ret = ESP_OK;
116-
117-
if (tx_channel == NULL) {
118-
/* Allocate a pair of RX and TX for crypto, should only happen the first time we use the GMDA
119-
or if user called esp_crypto_shared_gdma_release */
120-
ret = crypto_shared_gdma_init();
121-
}
122-
123-
if (ret != ESP_OK) {
124-
return ret;
125-
}
126-
127-
/* Tx channel is shared between AES and SHA, need to connect to peripheral every time */
128-
gdma_disconnect(tx_channel);
129-
130-
#ifdef SOC_SHA_SUPPORTED
131-
if (peripheral == GDMA_TRIG_PERIPH_SHA) {
132-
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_SHA, 0));
133-
} else
134-
#endif // SOC_SHA_SUPPORTED
135-
#ifdef SOC_AES_SUPPORTED
136-
if (peripheral == GDMA_TRIG_PERIPH_AES) {
137-
gdma_connect(tx_channel, GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_AES, 0));
138-
} else
139-
#endif // SOC_AES_SUPPORTED
140-
{
141-
return ESP_ERR_INVALID_ARG;
142-
}
143-
144-
/* tx channel is reset by gdma_connect(), also reset rx to ensure a known state */
145-
gdma_get_channel_id(rx_channel, &rx_ch_id);
146-
147-
#if SOC_AHB_GDMA_VERSION == 1
148-
gdma_ll_rx_reset_channel(&GDMA, rx_ch_id);
149-
#endif /* SOC_AHB_GDMA_VERSION */
150-
151-
gdma_start(tx_channel, (intptr_t)input);
152-
gdma_start(rx_channel, (intptr_t)output);
153-
154-
return ESP_OK;
155-
}
156112

157113
/* The external memory ecc-aes access must be enabled when there exists
158114
at least one buffer in the DMA descriptors that resides in external memory. */

0 commit comments

Comments
 (0)