From 98138189c9d4bc886cb8ce289599d9270c11ede6 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Fri, 28 May 2021 18:43:32 +0530 Subject: [PATCH] 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 * Original commit: espressif/esp-idf@45122533e0bca5d538585e22308f14b74c33e474 --- components/asio/port/mbedtls/include/mbedtls_engine.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/asio/port/mbedtls/include/mbedtls_engine.hpp b/components/asio/port/mbedtls/include/mbedtls_engine.hpp index 9e77acbc3..d9ac614d4 100644 --- a/components/asio/port/mbedtls/include/mbedtls_engine.hpp +++ b/components/asio/port/mbedtls/include/mbedtls_engine.hpp @@ -1,5 +1,5 @@ // -// SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD +// SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD // // SPDX-License-Identifier: BSL-1.0 // @@ -141,7 +141,7 @@ private: int ret = 0; mbedtls_ssl_set_bio(&impl_.ssl_, bio_.first.get(), bio_write, bio_read, nullptr); - while (impl_.ssl_.state != MBEDTLS_SSL_HANDSHAKE_OVER) { + while (impl_.ssl_.MBEDTLS_PRIVATE(state) != MBEDTLS_SSL_HANDSHAKE_OVER) { ret = mbedtls_ssl_handshake_step(&impl_.ssl_); if (ret != 0) { @@ -189,7 +189,7 @@ private: bool before_handshake() const { - return ssl_.state == 0; + return ssl_.MBEDTLS_PRIVATE(state) == 0; } int write(const void *buffer, int len) @@ -246,7 +246,7 @@ private: return false; } ret = mbedtls_pk_parse_key(&pk_key_, ctx->data(container::PRIVKEY), ctx->size(container::PRIVKEY), - nullptr, 0); + nullptr, 0, mbedtls_ctr_drbg_random, &ctr_drbg_); if (ret < 0) { print_error("mbedtls_pk_parse_keyfile", ret); return false;