@@ -131,6 +131,9 @@ void otPlatFree(void *aPtr)
131131
132132 free (aPtr);
133133}
134+
135+ void *otPlatCryptoCAlloc (size_t aNum, size_t aSize) { return calloc (aNum, aSize); }
136+ void otPlatCryptoFree (void *aPtr) { free (aPtr); }
134137#endif
135138
136139#if OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
@@ -480,11 +483,6 @@ void TestSrpServerBase(void)
480483 srpServer->SetEnabled (false );
481484 AdvanceTime (100 );
482485
483- #if (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) && OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
484- // On a first attempt, SRP Client generates the SRP Key which adds additional heap allocation.
485- heapAllocations += 1 ;
486- #endif
487-
488486 VerifyOrQuit (heapAllocations == sHeapAllocatedPtrs .GetLength ());
489487
490488 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -597,11 +595,6 @@ void TestSrpServerReject(void)
597595 srpServer->SetEnabled (false );
598596 AdvanceTime (100 );
599597
600- #if (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) && OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
601- // On a first attempt, SRP Client generates the SRP Key which adds additional heap allocation.
602- heapAllocations += 1 ;
603- #endif
604-
605598 VerifyOrQuit (heapAllocations == sHeapAllocatedPtrs .GetLength ());
606599
607600 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -714,11 +707,6 @@ void TestSrpServerIgnore(void)
714707 srpServer->SetEnabled (false );
715708 AdvanceTime (100 );
716709
717- #if (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) && OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
718- // On a first attempt, SRP Client generates the SRP Key which adds additional heap allocation.
719- heapAllocations += 1 ;
720- #endif
721-
722710 VerifyOrQuit (heapAllocations == sHeapAllocatedPtrs .GetLength ());
723711
724712 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -835,11 +823,6 @@ void TestSrpServerClientRemove(bool aShouldRemoveKeyLease)
835823 srpServer->SetEnabled (false );
836824 AdvanceTime (100 );
837825
838- #if (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) && OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
839- // On a first attempt, SRP Client generates the SRP Key which adds additional heap allocation.
840- heapAllocations += 1 ;
841- #endif
842-
843826 VerifyOrQuit (heapAllocations == sHeapAllocatedPtrs .GetLength ());
844827
845828 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -1034,11 +1017,6 @@ void TestUpdateLeaseShortVariant(void)
10341017 srpServer->SetEnabled (false );
10351018 AdvanceTime (100 );
10361019
1037- #if (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) && OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
1038- // On a first attempt, SRP Client generates the SRP Key which adds additional heap allocation.
1039- heapAllocations += 1 ;
1040- #endif
1041-
10421020 VerifyOrQuit (heapAllocations == sHeapAllocatedPtrs .GetLength ());
10431021
10441022 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 commit comments