From 9f44c2c4d27660aa43504493d74e83d76051d3f0 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Tue, 3 Sep 2019 13:47:06 +0100 Subject: [PATCH] Sync with TF upstream code as much as possible to remove warning --- .../tfm_impl/attestation_core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/attestation_core.c b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/attestation_core.c index 1e3ef463d5..87a5486ce7 100755 --- a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/attestation_core.c +++ b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/attestation_core.c @@ -841,7 +841,6 @@ attest_create_token(struct useful_buf_c *challenge, enum attest_token_err_t token_err; struct attest_token_ctx attest_token_ctx; int32_t key_select; - int32_t alg_select; uint32_t option_flags = 0; if (challenge->len == 36) { @@ -855,21 +854,13 @@ attest_create_token(struct useful_buf_c *challenge, /* Lower three bits are the key select */ key_select = option_flags & 0x7; - /* Map the key select to an algorithm. Maybe someday we'll support something - * other than ES256 - */ - switch (key_select) { - default: - alg_select = COSE_ALGORITHM_ES256; - } - /* Get started creating the token. This sets up the CBOR and COSE contexts * which causes the COSE headers to be constructed. */ token_err = attest_token_start(&attest_token_ctx, option_flags, /* option_flags */ key_select, /* key_select */ - alg_select, /* alg_select */ + COSE_ALGORITHM_ES256, /* alg_select */ token); if (token_err != ATTEST_TOKEN_ERR_SUCCESS) {