Skip to content

Commit 9f44c2c

Browse files
committed
Sync with TF upstream code as much as possible to remove warning
1 parent 9715587 commit 9f44c2c

File tree

1 file changed

+1
-10
lines changed
  • components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl

1 file changed

+1
-10
lines changed

components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl/attestation_core.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,6 @@ attest_create_token(struct useful_buf_c *challenge,
841841
enum attest_token_err_t token_err;
842842
struct attest_token_ctx attest_token_ctx;
843843
int32_t key_select;
844-
int32_t alg_select;
845844
uint32_t option_flags = 0;
846845

847846
if (challenge->len == 36) {
@@ -855,21 +854,13 @@ attest_create_token(struct useful_buf_c *challenge,
855854
/* Lower three bits are the key select */
856855
key_select = option_flags & 0x7;
857856

858-
/* Map the key select to an algorithm. Maybe someday we'll support something
859-
* other than ES256
860-
*/
861-
switch (key_select) {
862-
default:
863-
alg_select = COSE_ALGORITHM_ES256;
864-
}
865-
866857
/* Get started creating the token. This sets up the CBOR and COSE contexts
867858
* which causes the COSE headers to be constructed.
868859
*/
869860
token_err = attest_token_start(&attest_token_ctx,
870861
option_flags, /* option_flags */
871862
key_select, /* key_select */
872-
alg_select, /* alg_select */
863+
COSE_ALGORITHM_ES256, /* alg_select */
873864
token);
874865

875866
if (token_err != ATTEST_TOKEN_ERR_SUCCESS) {

0 commit comments

Comments
 (0)