From 3c64cd63125c86870802a561ce79dc33697b005c Mon Sep 17 00:00:00 2001 From: Maochen Wang Date: Fri, 8 Nov 2024 14:34:36 +0800 Subject: [PATCH] mcux: middleware: fix supp_psa_crypto_init failed The MBEDTLS_PSA_ACCEL_xxx macro means it will not enable the SW/Builtin implementation of the feature. The PSA_WANT_xxx macro means it will enable the PSA-API usage of the feature, and can use SW or HW acceleration. If enable the MBEDTLS_PSA_ACCEL_xxx macros, during psa_crypto_init, mbedtls_psa_hash_setup will failed, as the macro MBEDTLS_PSA_BUILTIN_ALG_SHA_512 is undefined. Remove the marco of MBEDTLS_PSA_ACCEL_xxx can enable maco MBEDTLS_PSA_BUILTIN_ALG_xxx, and fix the supp_psa_crypto_init fail and Wi-Fi connection failed issue. Signed-off-by: Maochen Wang --- .../incl/port/mbedtls/wpa_supp_els_pkc_mbedtls_config.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mcux/middleware/wifi_nxp/incl/port/mbedtls/wpa_supp_els_pkc_mbedtls_config.h b/mcux/middleware/wifi_nxp/incl/port/mbedtls/wpa_supp_els_pkc_mbedtls_config.h index 532b61cf7..6d6f27da8 100644 --- a/mcux/middleware/wifi_nxp/incl/port/mbedtls/wpa_supp_els_pkc_mbedtls_config.h +++ b/mcux/middleware/wifi_nxp/incl/port/mbedtls/wpa_supp_els_pkc_mbedtls_config.h @@ -42,14 +42,6 @@ #define MBEDTLS_CIPHER_PADDING_PKCS7 #define PSA_CRYPTO_DRIVER_ELS_PKC -//#define MBEDTLS_PSA_ACCEL_ALG_MD5 -//#define MBEDTLS_PSA_ACCEL_ALG_SHA_1 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_224 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_256 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_384 -#define MBEDTLS_PSA_ACCEL_ALG_SHA_512 -#define MBEDTLS_PSA_ACCEL_ALG_RIPEMD160 - #define PSA_WANT_ALG_ECDSA 1 #define PSA_WANT_ALG_ECDSA_ANY 1 #define PSA_WANT_ALG_RSA_PKCS1V15_SIGN 1