From 81ec63f17a582c0707b5660b2a1b23e0d02cfe07 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Sun, 27 Oct 2019 16:10:01 -0400 Subject: [PATCH] check attestation tag --- targets/stm32l432/src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/stm32l432/src/device.c b/targets/stm32l432/src/device.c index bba0137..d2525c6 100644 --- a/targets/stm32l432/src/device.c +++ b/targets/stm32l432/src/device.c @@ -195,7 +195,8 @@ void device_init_button(void) int solo_is_locked(){ uint64_t device_settings = ((flash_attestation_page *)ATTESTATION_PAGE_ADDR)->device_settings; - return (device_settings & SOLO_FLAG_LOCKED) != 0; + uint32_t tag = (uint32_t)(device_settings >> 32ull); + return tag == ATTESTATION_CONFIGURED_TAG && (device_settings & SOLO_FLAG_LOCKED) != 0; } /** device_migrate