mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Initial Changes for updating mbedtls to v3.0
This commit is contained in:
Submodule components/lwip/lwip updated: 2749568fe1...2195f7416f
@@ -8,11 +8,12 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS "esp_crt_bundle/esp_crt_bundle.c"
|
idf_component_register(SRCS "esp_crt_bundle/esp_crt_bundle.c"
|
||||||
INCLUDE_DIRS "port/include" "mbedtls/include" "esp_crt_bundle/include"
|
INCLUDE_DIRS "port/include" "mbedtls/include" "esp_crt_bundle/include" "."
|
||||||
REQUIRES lwip
|
REQUIRES lwip
|
||||||
PRIV_REQUIRES "${priv_requires}"
|
PRIV_REQUIRES "${priv_requires}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if(CONFIG_MBEDTLS_CERTIFICATE_BUNDLE)
|
if(CONFIG_MBEDTLS_CERTIFICATE_BUNDLE)
|
||||||
set(bundle_name "x509_crt_bundle")
|
set(bundle_name "x509_crt_bundle")
|
||||||
set(DEFAULT_CRT_DIR ${COMPONENT_DIR}/esp_crt_bundle)
|
set(DEFAULT_CRT_DIR ${COMPONENT_DIR}/esp_crt_bundle)
|
||||||
|
@@ -56,10 +56,10 @@ static int tx_buffer_len(mbedtls_ssl_context *ssl, int len)
|
|||||||
return MBEDTLS_SSL_OUT_BUFFER_LEN;
|
return MBEDTLS_SSL_OUT_BUFFER_LEN;
|
||||||
} else {
|
} else {
|
||||||
return len + MBEDTLS_SSL_HEADER_LEN
|
return len + MBEDTLS_SSL_HEADER_LEN
|
||||||
+ MBEDTLS_SSL_COMPRESSION_ADD
|
|
||||||
+ MBEDTLS_MAX_IV_LENGTH
|
+ MBEDTLS_MAX_IV_LENGTH
|
||||||
+ MBEDTLS_SSL_MAC_ADD
|
+ MBEDTLS_SSL_MAC_ADD
|
||||||
+ MBEDTLS_SSL_PADDING_ADD;
|
+ MBEDTLS_SSL_PADDING_ADD
|
||||||
|
+ MBEDTLS_SSL_MAX_CID_EXPANSION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "mbedtls/ssl.h"
|
#include "mbedtls/ssl.h"
|
||||||
#include "mbedtls/ssl_internal.h"
|
#include "ssl_misc.h" // located at mbedtls/library/ssl_misc.h
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
|
@@ -34,7 +34,6 @@ static const char *TAG = "ESP_RSA_SIGN_ALT";
|
|||||||
#define SWAP_INT32(x) (((x) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | ((x) << 24))
|
#define SWAP_INT32(x) (((x) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | ((x) << 24))
|
||||||
|
|
||||||
#include "mbedtls/rsa.h"
|
#include "mbedtls/rsa.h"
|
||||||
#include "mbedtls/rsa_internal.h"
|
|
||||||
#include "mbedtls/oid.h"
|
#include "mbedtls/oid.h"
|
||||||
#include "mbedtls/platform_util.h"
|
#include "mbedtls/platform_util.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <esp_system.h>
|
#include <esp_system.h>
|
||||||
|
|
||||||
#include "mbedtls/entropy_poll.h"
|
#include <entropy_poll.h>
|
||||||
|
|
||||||
#ifndef MBEDTLS_ENTROPY_HARDWARE_ALT
|
#ifndef MBEDTLS_ENTROPY_HARDWARE_ALT
|
||||||
#error "MBEDTLS_ENTROPY_HARDWARE_ALT should always be set in ESP-IDF"
|
#error "MBEDTLS_ENTROPY_HARDWARE_ALT should always be set in ESP-IDF"
|
||||||
|
@@ -2766,6 +2766,10 @@
|
|||||||
#include MBEDTLS_USER_CONFIG_FILE
|
#include MBEDTLS_USER_CONFIG_FILE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define this flag for now */
|
||||||
|
/* To Do - while updating to v3.0 remove all the code where this flag is used */
|
||||||
|
#define MBEDTLS_DEPRECATED_REMOVED
|
||||||
|
|
||||||
#include "mbedtls/check_config.h"
|
#include "mbedtls/check_config.h"
|
||||||
|
|
||||||
#endif /* MBEDTLS_CONFIG_H */
|
#endif /* MBEDTLS_CONFIG_H */
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
#include "mbedtls/entropy.h"
|
#include "mbedtls/entropy.h"
|
||||||
#include "mbedtls/ctr_drbg.h"
|
#include "mbedtls/ctr_drbg.h"
|
||||||
#include "mbedtls/certs.h"
|
|
||||||
#include "mbedtls/x509.h"
|
#include "mbedtls/x509.h"
|
||||||
#include "mbedtls/ssl.h"
|
#include "mbedtls/ssl.h"
|
||||||
#include "mbedtls/net_sockets.h"
|
#include "mbedtls/net_sockets.h"
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
#include "mbedtls/rsa.h"
|
#include "mbedtls/rsa.h"
|
||||||
#include "mbedtls/pk.h"
|
#include "mbedtls/pk.h"
|
||||||
#include "mbedtls/x509_crt.h"
|
#include "mbedtls/x509_crt.h"
|
||||||
#include "mbedtls/entropy_poll.h"
|
|
||||||
#include <mbedtls/entropy.h>
|
#include <mbedtls/entropy.h>
|
||||||
#include <mbedtls/ctr_drbg.h>
|
#include <mbedtls/ctr_drbg.h>
|
||||||
|
#include "mbedtls/library/entropy_poll.h"
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <mbedtls/error.h>
|
#include <mbedtls/error.h>
|
||||||
#include <mbedtls/ssl_internal.h>
|
#include <mbedtls/ssl_internal.h>
|
||||||
#include <mbedtls/constant_time.h>
|
#include <mbedtls/constant_time.h>
|
||||||
|
#include <mbedtls/library/ssl_misc.h>
|
||||||
|
|
||||||
#include <protocomm_security.h>
|
#include <protocomm_security.h>
|
||||||
#include <protocomm_security1.h>
|
#include <protocomm_security1.h>
|
||||||
|
@@ -12,7 +12,8 @@
|
|||||||
#include "crypto/md5.h"
|
#include "crypto/md5.h"
|
||||||
#include "crypto/sha256.h"
|
#include "crypto/sha256.h"
|
||||||
#include "crypto/sha384.h"
|
#include "crypto/sha384.h"
|
||||||
#include "mbedtls/ssl_internal.h"
|
#include "mbedtls/library/ssl_misc.h"
|
||||||
|
//#error "It is included"
|
||||||
#include "mbedtls/ctr_drbg.h"
|
#include "mbedtls/ctr_drbg.h"
|
||||||
#include "mbedtls/entropy.h"
|
#include "mbedtls/entropy.h"
|
||||||
#include "mbedtls/debug.h"
|
#include "mbedtls/debug.h"
|
||||||
|
Reference in New Issue
Block a user