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
This commit is contained in:
Laukik Hase
2023-01-05 11:10:43 +05:30
parent 1e4493e592
commit 68d90dd392

View File

@@ -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,