From 92a9b3f73612e9bfccba38bcf0596ae424a0a02d Mon Sep 17 00:00:00 2001 From: Moran Peker Date: Mon, 25 Feb 2019 11:11:47 +0200 Subject: [PATCH] Remove calling to "psa_crypto_init()" No need to call psa_crypto_init before crypto operations we assume init already called before. if not an error will return. --- .../COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c index 3bc16569d4..0586ba6b36 100755 --- a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c +++ b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attest_iat_claims_loader.c @@ -72,11 +72,6 @@ static enum tfm_plat_err_t attest_public_key_sha256(uint32_t *size, uint8_t *buf enum tfm_plat_err_t status = TFM_PLAT_ERR_SUCCESS; psa_hash_operation_t hash_handle; - crypto_ret = psa_crypto_init(); - if (crypto_ret != PSA_SUCCESS) { - return TFM_PLAT_ERR_SYSTEM_ERR; - } - crypto_ret = psa_open_key(PSA_KEY_LIFETIME_PERSISTENT, key_id, &handle); if (crypto_ret != PSA_SUCCESS) { return TFM_PLAT_ERR_SYSTEM_ERR;