fix(wpa_supplicant): revert changes to dpp_crypto

This commit is contained in:
Ashish Sharma
2025-12-19 07:29:08 +08:00
parent c2c31ba9d2
commit aa88c81dfb
29 changed files with 128 additions and 285 deletions
@@ -20,7 +20,6 @@
/* setUp runs before every test */
void setUp(void)
{
// psa_crypto_init();
// Execute mbedtls_aes_init operation to allocate AES interrupt
// allocation memory which is considered as leak otherwise
#if SOC_AES_SUPPORTED
@@ -466,14 +466,6 @@ TEST_CASE("custom certificate bundle - ECDSA signature verification", "[mbedtls]
* This tests both the ECDSA algorithm path and a different hash algorithm (SHA-512) than
* the RSA tests which use SHA-256. */
// CRITICAL: Initialize PSA crypto subsystem before any PSA operations
// psa_status_t psa_status = psa_crypto_init();
// if (psa_status != PSA_SUCCESS) {
// printf("PSA crypto initialization failed with status 0x%x\n", (unsigned int)psa_status);
// TEST_FAIL_MESSAGE("PSA crypto init failed");
// }
// printf("PSA crypto initialized successfully\n");
mbedtls_x509_crt crt;
uint32_t flags = 0;
@@ -63,10 +63,6 @@ TEST_CASE("PSA CMAC AES-128 test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -113,10 +109,6 @@ TEST_CASE("PSA CMAC AES-256 test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -162,10 +154,6 @@ TEST_CASE("PSA CMAC AES-128 multipart test", "[psa_cmac]")
psa_key_id_t key_id = 0;
psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -218,10 +206,6 @@ TEST_CASE("PSA CMAC AES-128 multipart verify test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -282,10 +266,6 @@ TEST_CASE("PSA CMAC zero-length test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -330,10 +310,6 @@ TEST_CASE("PSA CMAC memory alignment test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);
@@ -388,10 +364,6 @@ TEST_CASE("PSA CMAC verify failure test", "[psa_cmac]")
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key_id = 0;
// Initialize PSA Crypto
// status = psa_crypto_init();
// TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
// Set up key attributes
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_VERIFY_MESSAGE);
psa_set_key_algorithm(&attributes, PSA_ALG_CMAC);