mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-06 23:15:21 +00:00
ssl_client2, ssl_server2: add check for psa memory leaks
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
f660c7c923
commit
fed825a9aa
3 changed files with 27 additions and 0 deletions
|
|
@ -21,6 +21,11 @@
|
|||
|
||||
#include "ssl_test_lib.h"
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#define SKIP_LIBRARY_HEADERS
|
||||
#include "test/psa_crypto_helpers.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_TEST_IMPOSSIBLE)
|
||||
int main( void )
|
||||
{
|
||||
|
|
@ -3059,7 +3064,15 @@ exit:
|
|||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
|
||||
mbedtls_psa_crypto_free( );
|
||||
const char* message = mbedtls_test_helper_is_psa_leaking();
|
||||
if( message )
|
||||
{
|
||||
if( ret == 0 )
|
||||
ret = 1;
|
||||
mbedtls_printf( "PSA memory leak detected: %s\n", message);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_TEST_HOOKS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue