mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-08 18:54:23 +02:00
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:
@@ -83,7 +83,7 @@ void pk_parse_public_keyfile_ec(char *key_file, int result)
|
||||
int res;
|
||||
|
||||
mbedtls_pk_init(&ctx);
|
||||
MD_PSA_INIT();
|
||||
MD_OR_USE_PSA_INIT();
|
||||
|
||||
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:
|
||||
mbedtls_pk_free(&ctx);
|
||||
MD_PSA_DONE();
|
||||
MD_OR_USE_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@@ -115,7 +115,7 @@ void pk_parse_keyfile_ec(char *key_file, char *password, int result)
|
||||
int res;
|
||||
|
||||
mbedtls_pk_init(&ctx);
|
||||
MD_PSA_INIT();
|
||||
MD_OR_USE_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);
|
||||
MD_PSA_DONE();
|
||||
MD_OR_USE_PSA_DONE();
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user