mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add PSA crypto module
New module psa_crypto.c (MBEDTLS_PSA_CRYPTO_C): Platform Security Architecture compatibility layer on top of libmedcrypto. Implement psa_crypto_init function which sets up a RNG. Add a mbedtls_psa_crypto_free function which deinitializes the library. Define a first batch of error codes.
This commit is contained in:
committed by
itayzafrir
parent
c0a63bd0c1
commit
e59236fc17
2
tests/suites/test_suite_psa_crypto.data
Normal file
2
tests/suites/test_suite_psa_crypto.data
Normal file
@ -0,0 +1,2 @@
|
||||
PSA init/deinit
|
||||
init_deinit:
|
24
tests/suites/test_suite_psa_crypto.function
Normal file
24
tests/suites/test_suite_psa_crypto.function
Normal file
@ -0,0 +1,24 @@
|
||||
/* BEGIN_HEADER */
|
||||
#include "psa/crypto.h"
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
* depends_on:MBEDTLS_PSA_CRYPTO_C
|
||||
* END_DEPENDENCIES
|
||||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void init_deinit()
|
||||
{
|
||||
psa_status_t ret;
|
||||
int i;
|
||||
for( i = 0; i <= 1; i++ )
|
||||
{
|
||||
ret = psa_crypto_init( );
|
||||
TEST_ASSERT( ret == PSA_SUCCESS );
|
||||
ret = psa_crypto_init( );
|
||||
TEST_ASSERT( ret == PSA_SUCCESS );
|
||||
mbedtls_psa_crypto_free( );
|
||||
}
|
||||
}
|
||||
/* END_CASE */
|
Reference in New Issue
Block a user