From 68d90dd39272396c97c05f4d9ffa8c5d07d6c7cf Mon Sep 17 00:00:00 2001 From: Laukik Hase Date: Thu, 5 Jan 2023 11:10:43 +0530 Subject: [PATCH] protocomm: Fix test-app build for esp32c2 & esp32c6 - AES context has a breaking change, rather than storing round keys directly, it stores the offset at which the keys are present in the context buffer --- components/protocomm/test_apps/main/test_protocomm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/protocomm/test_apps/main/test_protocomm.c b/components/protocomm/test_apps/main/test_protocomm.c index 7160d90817..8bd17f5e9e 100644 --- a/components/protocomm/test_apps/main/test_protocomm.c +++ b/components/protocomm/test_apps/main/test_protocomm.c @@ -564,7 +564,7 @@ static esp_err_t test_req_endpoint(session_t *session) // Check if the AES key is correctly set before calling the software encryption // API. Without this check, the code will crash, resulting in a test case failure. // For hardware AES, portability layer takes care of this. - if (session->ctx_aes.MBEDTLS_PRIVATE(rk) != NULL && session->ctx_aes.MBEDTLS_PRIVATE(nr) > 0) { + if (session->ctx_aes.MBEDTLS_PRIVATE(nr) > 0) { #endif mbedtls_aes_crypt_ctr(&session->ctx_aes, sizeof(rand_test_data), &session->nc_off,