mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-20 20:31:06 +00:00
storage: Fix bug in U2F counter upgrade.
This commit is contained in:
parent
bac8d9d531
commit
c23ad89ee1
@ -195,7 +195,7 @@ def init_unlocked():
|
|||||||
counter = config.get(_APP, _U2F_COUNTER)
|
counter = config.get(_APP, _U2F_COUNTER)
|
||||||
if counter is not None:
|
if counter is not None:
|
||||||
config.set_counter(
|
config.set_counter(
|
||||||
_APP, _U2F_COUNTER, counter, True
|
_APP, _U2F_COUNTER, int.from_bytes(counter, "big"), True
|
||||||
) # writable when locked
|
) # writable when locked
|
||||||
config.delete(_APP, _U2F_COUNTER)
|
config.delete(_APP, _U2F_COUNTER)
|
||||||
config.set(_APP, _VERSION, _STORAGE_VERSION)
|
config.set(_APP, _VERSION, _STORAGE_VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user