Add missing PSA init
EC might be supported through PSA, so use `MD_OR_USE_PSA_INIT` in pk_parse_{public_}keyfile_ec. Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
4ebccc0396
commit
c5d4c46983
1 changed files with 4 additions and 4 deletions
|
@ -83,7 +83,7 @@ void pk_parse_public_keyfile_ec(char *key_file, int result)
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
mbedtls_pk_init(&ctx);
|
mbedtls_pk_init(&ctx);
|
||||||
MD_PSA_INIT();
|
MD_OR_USE_PSA_INIT();
|
||||||
|
|
||||||
res = mbedtls_pk_parse_public_keyfile(&ctx, key_file);
|
res = mbedtls_pk_parse_public_keyfile(&ctx, key_file);
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ void pk_parse_public_keyfile_ec(char *key_file, int result)
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_pk_free(&ctx);
|
mbedtls_pk_free(&ctx);
|
||||||
MD_PSA_DONE();
|
MD_OR_USE_PSA_DONE();
|
||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void pk_parse_keyfile_ec(char *key_file, char *password, int result)
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
mbedtls_pk_init(&ctx);
|
mbedtls_pk_init(&ctx);
|
||||||
MD_PSA_INIT();
|
MD_OR_USE_PSA_INIT();
|
||||||
|
|
||||||
res = mbedtls_pk_parse_keyfile(&ctx, key_file, password,
|
res = mbedtls_pk_parse_keyfile(&ctx, key_file, password,
|
||||||
mbedtls_test_rnd_std_rand, NULL);
|
mbedtls_test_rnd_std_rand, NULL);
|
||||||
|
@ -134,7 +134,7 @@ void pk_parse_keyfile_ec(char *key_file, char *password, int result)
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_pk_free(&ctx);
|
mbedtls_pk_free(&ctx);
|
||||||
MD_PSA_DONE();
|
MD_OR_USE_PSA_DONE();
|
||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue