mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
storage: implement change_pin
This commit is contained in:
parent
5e643e9195
commit
237740de9c
@ -211,10 +211,12 @@ secbool storage_change_pin(const uint8_t *pin, size_t len, const uint8_t *newpin
|
||||
// shutdown();
|
||||
return secfalse;
|
||||
}
|
||||
// TODO: check for max length
|
||||
// TODO: check with fail handling
|
||||
if (sectrue != pin_check(pin, len)) {
|
||||
return secfalse;
|
||||
}
|
||||
// TODO: change pin in storage
|
||||
norcow_set(PIN_KEY, (const void *)newpin, (uint16_t)newlen);
|
||||
return sectrue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user