1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Initialize PSA Crypto operation contexts

It is now required to initialize PSA Crypto operation contexts before
calling psa_*_setup(). Otherwise, one gets a PSA_ERROR_BAD_STATE error.
This commit is contained in:
Jaeden Amero
2019-02-20 10:32:28 +00:00
parent 9c99dc862c
commit 3497323f79
4 changed files with 6 additions and 6 deletions

View File

@ -1908,7 +1908,7 @@ static int x509_crt_check_signature( const mbedtls_x509_crt *child,
if( mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash ) != 0 )
return( -1 );
#else
psa_hash_operation_t hash_operation;
psa_hash_operation_t hash_operation = PSA_HASH_OPERATION_INIT;
psa_algorithm_t hash_alg = mbedtls_psa_translate_md( child->sig_md );
if( psa_hash_setup( &hash_operation, hash_alg ) != PSA_SUCCESS )