1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-19 12:58:13 +00:00

storage: implement change_pin

This commit is contained in:
Jan Pochyla 2017-11-06 17:47:05 +01:00
parent 5e643e9195
commit 237740de9c

View File

@ -211,10 +211,12 @@ secbool storage_change_pin(const uint8_t *pin, size_t len, const uint8_t *newpin
// shutdown(); // shutdown();
return secfalse; return secfalse;
} }
// TODO: check for max length
// TODO: check with fail handling
if (sectrue != pin_check(pin, len)) { if (sectrue != pin_check(pin, len)) {
return secfalse; return secfalse;
} }
// TODO: change pin in storage norcow_set(PIN_KEY, (const void *)newpin, (uint16_t)newlen);
return sectrue; return sectrue;
} }