mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/small_cleanups' into 'master'
Small cleanups See merge request espressif/esp-idf!11141
This commit is contained in:
commit
d6bdd1cb32
@ -57,7 +57,7 @@ esp_err_t esp_base_mac_addr_get(uint8_t *mac)
|
|||||||
esp_err_t esp_efuse_mac_get_custom(uint8_t *mac)
|
esp_err_t esp_efuse_mac_get_custom(uint8_t *mac)
|
||||||
{
|
{
|
||||||
#if !CONFIG_IDF_TARGET_ESP32
|
#if !CONFIG_IDF_TARGET_ESP32
|
||||||
return ESP_ERR_NOT_SUPPORTED;
|
return ESP_ERR_NOT_SUPPORTED; // TODO IDF-1326
|
||||||
#else
|
#else
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
esp_efuse_read_field_blob(ESP_EFUSE_MAC_CUSTOM_VER, &version, 8);
|
esp_efuse_read_field_blob(ESP_EFUSE_MAC_CUSTOM_VER, &version, 8);
|
||||||
|
@ -40,7 +40,6 @@ idf_component_register(SRCS "src/coexist.c"
|
|||||||
|
|
||||||
idf_build_get_property(build_dir BUILD_DIR)
|
idf_build_get_property(build_dir BUILD_DIR)
|
||||||
|
|
||||||
# ToDo: Rename esp32s2beta to esp32s2 next time update wifi lib
|
|
||||||
set(target_name "${idf_target}")
|
set(target_name "${idf_target}")
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}")
|
target_link_libraries(${COMPONENT_LIB} PUBLIC "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${target_name}")
|
||||||
|
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
|
#define CONFIG_PARTITION_TABLE_OFFSET 0x8000
|
||||||
#define CONFIG_ESPTOOLPY_FLASHSIZE "8MB"
|
#define CONFIG_ESPTOOLPY_FLASHSIZE "8MB"
|
||||||
//currently use the legacy implementation, since the stubs for new HAL are not done yet
|
//currently use the legacy implementation, since the stubs for new HAL are not done yet
|
||||||
#define CONFIG_SPI_FLASH_USE_LEGACY_IMPL
|
#define CONFIG_SPI_FLASH_USE_LEGACY_IMPL 1
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "mbedtls/config.h"
|
#include "mbedtls/config.h"
|
||||||
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name SECTION: System support
|
* \name SECTION: System support
|
||||||
@ -130,7 +131,13 @@
|
|||||||
#ifdef CONFIG_MBEDTLS_HARDWARE_SHA
|
#ifdef CONFIG_MBEDTLS_HARDWARE_SHA
|
||||||
#define MBEDTLS_SHA1_ALT
|
#define MBEDTLS_SHA1_ALT
|
||||||
#define MBEDTLS_SHA256_ALT
|
#define MBEDTLS_SHA256_ALT
|
||||||
|
|
||||||
|
#if SOC_SHA_SUPPORT_SHA512
|
||||||
#define MBEDTLS_SHA512_ALT
|
#define MBEDTLS_SHA512_ALT
|
||||||
|
#else
|
||||||
|
#undef MBEDTLS_SHA512_ALT
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#undef MBEDTLS_SHA1_ALT
|
#undef MBEDTLS_SHA1_ALT
|
||||||
#undef MBEDTLS_SHA256_ALT
|
#undef MBEDTLS_SHA256_ALT
|
||||||
|
@ -64,13 +64,13 @@ static void test_bignum_mult_variant(const char *a_str, const char *b_str, const
|
|||||||
mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len);
|
mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len);
|
||||||
TEST_ASSERT_EQUAL_STRING_MESSAGE(e_str, x_buf, "mbedtls_mpi_mul_mpi result wrong");
|
TEST_ASSERT_EQUAL_STRING_MESSAGE(e_str, x_buf, "mbedtls_mpi_mul_mpi result wrong");
|
||||||
|
|
||||||
|
#ifdef CONFIG_MBEDTLS_HARDWARE_MPI
|
||||||
/* if mod_bits arg is set, also do a esp_mpi_mul_mod() call */
|
/* if mod_bits arg is set, also do a esp_mpi_mul_mod() call */
|
||||||
if (mod_bits > 0) {
|
if (mod_bits > 0) {
|
||||||
mbedtls_mpi_init(&M);
|
mbedtls_mpi_init(&M);
|
||||||
for(int i = 0; i < mod_bits; i++) {
|
for(int i = 0; i < mod_bits; i++) {
|
||||||
mbedtls_mpi_set_bit(&M, i, 1);
|
mbedtls_mpi_set_bit(&M, i, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_ASSERT_FALSE(esp_mpi_mul_mpi_mod(&X, &A, &B, &M));
|
TEST_ASSERT_FALSE(esp_mpi_mul_mpi_mod(&X, &A, &B, &M));
|
||||||
|
|
||||||
mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len);
|
mbedtls_mpi_write_string(&X, 16, x_buf, sizeof(x_buf)-1, &x_buf_len);
|
||||||
@ -78,7 +78,7 @@ static void test_bignum_mult_variant(const char *a_str, const char *b_str, const
|
|||||||
|
|
||||||
mbedtls_mpi_free(&M);
|
mbedtls_mpi_free(&M);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mbedtls_mpi_free(&A);
|
mbedtls_mpi_free(&A);
|
||||||
mbedtls_mpi_free(&B);
|
mbedtls_mpi_free(&B);
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "test_apb_dport_access.h"
|
#include "test_apb_dport_access.h"
|
||||||
#include "sodium/utils.h"
|
#include "sodium/utils.h"
|
||||||
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
TEST_CASE("mbedtls SHA self-tests", "[mbedtls]")
|
TEST_CASE("mbedtls SHA self-tests", "[mbedtls]")
|
||||||
{
|
{
|
||||||
@ -369,7 +370,7 @@ TEST_CASE("mbedtls SHA, input in flash", "[mbedtls]")
|
|||||||
#if !DISABLED_FOR_TARGETS(ESP32)
|
#if !DISABLED_FOR_TARGETS(ESP32)
|
||||||
|
|
||||||
/* Function are not implemented in SW */
|
/* Function are not implemented in SW */
|
||||||
#ifdef CONFIG_MBEDTLS_HARDWARE_SHA
|
#if CONFIG_MBEDTLS_HARDWARE_SHA && SOC_SHA_SUPPORT_SHA512_T
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIPS-180-2 test vectors
|
* FIPS-180-2 test vectors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user