Update PSA init for md-ligt

Also initialize PSA in builds where hashes are PSA-only, for the sake of
encrypted keys (otherwise PBKDF fails).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-11-15 11:04:30 +01:00
parent 799befd58e
commit 4ebccc0396

View file

@ -115,7 +115,7 @@ void pk_parse_keyfile_ec(char *key_file, char *password, int result)
int res;
mbedtls_pk_init(&ctx);
USE_PSA_INIT();
MD_PSA_INIT();
res = mbedtls_pk_parse_keyfile(&ctx, key_file, password,
mbedtls_test_rnd_std_rand, NULL);
@ -134,7 +134,7 @@ void pk_parse_keyfile_ec(char *key_file, char *password, int result)
exit:
mbedtls_pk_free(&ctx);
USE_PSA_DONE();
MD_PSA_DONE();
}
/* END_CASE */