storage: fix unlock
This commit is contained in:
parent
5444410e04
commit
df77e74988
|
@ -130,6 +130,8 @@ secbool storage_unlock(const uint8_t *pin, size_t len)
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unlocked = secfalse;
|
||||||
|
|
||||||
uint32_t ofs;
|
uint32_t ofs;
|
||||||
uint32_t ctr;
|
uint32_t ctr;
|
||||||
if (sectrue != pin_fails_read(&ofs, &ctr)) {
|
if (sectrue != pin_fails_read(&ofs, &ctr)) {
|
||||||
|
@ -153,7 +155,10 @@ secbool storage_unlock(const uint8_t *pin, size_t len)
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
pin_fails_reset(ofs);
|
pin_fails_reset(ofs);
|
||||||
return sectrue;
|
|
||||||
|
unlocked = sectrue;
|
||||||
|
|
||||||
|
return unlocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
secbool storage_get(uint16_t key, const void **val, uint16_t *len)
|
secbool storage_get(uint16_t key, const void **val, uint16_t *len)
|
||||||
|
|
Loading…
Reference in New Issue