mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
mbedtls-3 update:
1) Fix build issue in mbedtls 2) skip the public headers check in IDF 3)Update Kconfig Macros 4)Remove deprecated config options 5) Update the sha API according to new nomenclature 6) Update mbedtls_rsa_init usage 7) Include mbedtls/build_info.h instead of mbedtls/config.h 8) Dont include check_config.h 9) Add additional error message in esp_blufi_api.h
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#define ESP_CONFIG_H
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "mbedtls/config.h"
|
||||
#include "mbedtls/mbedtls_config.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
/**
|
||||
@@ -959,9 +959,7 @@
|
||||
*
|
||||
* This only affects CBC ciphersuites, and is useless if none is defined.
|
||||
*
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1 or
|
||||
* MBEDTLS_SSL_PROTO_TLS1_1 or
|
||||
* MBEDTLS_SSL_PROTO_TLS1_2
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1_2
|
||||
*
|
||||
* Comment this macro to disable support for Encrypt-then-MAC
|
||||
*/
|
||||
@@ -981,9 +979,7 @@
|
||||
* renegotiation), since it actually fixes a more fundamental issue in the
|
||||
* original SSL/TLS design, and has implications beyond Triple Handshake.
|
||||
*
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1 or
|
||||
* MBEDTLS_SSL_PROTO_TLS1_1 or
|
||||
* MBEDTLS_SSL_PROTO_TLS1_2
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1_2
|
||||
*
|
||||
* Comment this macro to disable support for Extended Master Secret.
|
||||
*/
|
||||
@@ -1091,7 +1087,7 @@
|
||||
/**
|
||||
* \def MBEDTLS_SSL_RENEGOTIATION
|
||||
*
|
||||
* Disable support for TLS renegotiation.
|
||||
* Enable support for TLS renegotiation.
|
||||
*
|
||||
* The two main uses of renegotiation are (1) refresh keys on long-lived
|
||||
* connections and (2) client authentication after the initial handshake.
|
||||
@@ -1100,6 +1096,13 @@
|
||||
* misuse/misunderstand.
|
||||
*
|
||||
* Comment this to disable support for renegotiation.
|
||||
*
|
||||
* \note Even if this option is disabled, both client and server are aware
|
||||
* of the Renegotiation Indication Extension (RFC 5746) used to
|
||||
* prevent the SSL renegotiation attack (see RFC 5746 Sect. 1).
|
||||
* (See \c mbedtls_ssl_conf_legacy_renegotiation for the
|
||||
* configuration of this extension).
|
||||
*
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_SSL_RENEGOTIATION
|
||||
#define MBEDTLS_SSL_RENEGOTIATION
|
||||
@@ -1116,21 +1119,6 @@
|
||||
*/
|
||||
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_PROTO_TLS1_1
|
||||
*
|
||||
* Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
|
||||
*
|
||||
* Requires: MBEDTLS_MD5_C
|
||||
* MBEDTLS_SHA1_C
|
||||
*
|
||||
* Comment this macro to disable support for TLS 1.1 / DTLS 1.0
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_SSL_PROTO_TLS1_1
|
||||
#define MBEDTLS_SSL_PROTO_TLS1_1
|
||||
#else
|
||||
#undef MBEDTLS_SSL_PROTO_TLS1_1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_PROTO_TLS1_2
|
||||
@@ -1153,11 +1141,9 @@
|
||||
*
|
||||
* Enable support for DTLS (all available versions).
|
||||
*
|
||||
* Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
|
||||
* and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
|
||||
* Enable this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
|
||||
*
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1_1
|
||||
* or MBEDTLS_SSL_PROTO_TLS1_2
|
||||
* Requires: MBEDTLS_SSL_PROTO_TLS1_2
|
||||
*
|
||||
* Comment this macro to disable support for DTLS
|
||||
*/
|
||||
@@ -1276,21 +1262,6 @@
|
||||
#undef MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
|
||||
*
|
||||
* Enable support for a limit of records with bad MAC.
|
||||
*
|
||||
* See mbedtls_ssl_conf_dtls_badmac_limit().
|
||||
*
|
||||
* Requires: MBEDTLS_SSL_PROTO_DTLS
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_SSL_PROTO_DTLS
|
||||
#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
|
||||
#else
|
||||
#undef MBEDTLS_SSL_DTLS_BADMAC_LIMIT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_SESSION_TICKETS
|
||||
*
|
||||
@@ -1330,14 +1301,6 @@
|
||||
*/
|
||||
#define MBEDTLS_SSL_SERVER_NAME_INDICATION
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
*
|
||||
* Enable support for RFC 6066 truncated HMAC in SSL.
|
||||
*
|
||||
* Comment this macro to disable support for truncated HMAC in SSL
|
||||
*/
|
||||
#define MBEDTLS_SSL_TRUNCATED_HMAC
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
|
||||
@@ -1367,40 +1330,6 @@
|
||||
*/
|
||||
#define MBEDTLS_VERSION_FEATURES
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
*
|
||||
* Enable verification of the keyUsage extension (CA and leaf certificates).
|
||||
*
|
||||
* Disabling this avoids problems with mis-issued and/or misused
|
||||
* (intermediate) CA and leaf certificates.
|
||||
*
|
||||
* \warning Depending on your PKI use, disabling this can be a security risk!
|
||||
*
|
||||
* Comment to skip keyUsage checking for both CA and leaf certificates.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
#define MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
#else
|
||||
#undef MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
*
|
||||
* Enable verification of the extendedKeyUsage extension (leaf certificates).
|
||||
*
|
||||
* Disabling this avoids problems with mis-issued and/or misused certificates.
|
||||
*
|
||||
* \warning Depending on your PKI use, disabling this can be a security risk!
|
||||
*
|
||||
* Comment to skip extendedKeyUsage checking for certificates.
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
#else
|
||||
#undef MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
|
||||
@@ -2770,6 +2699,4 @@
|
||||
/* 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"
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_H */
|
||||
#endif /* ESP_CONFIG_H */
|
||||
|
Reference in New Issue
Block a user