1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-21 16:28:46 +00:00

protect: Update protectPinUiCallback() to show arbitrary message.

This commit is contained in:
Andrew Kozlik 2019-02-22 18:48:04 +01:00 committed by Pavol Rusnak
parent 806f943116
commit ae0395f0f4
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 4 additions and 4 deletions

View File

@ -147,7 +147,7 @@ const char *requestPin(PinMatrixRequestType type, const char *text)
} }
} }
secbool protectPinUiCallback(uint32_t wait, uint32_t progress) secbool protectPinUiCallback(uint32_t wait, uint32_t progress, const char* message)
{ {
// Convert wait to secstr string. // Convert wait to secstr string.
char secstrbuf[] = _("________0 seconds"); char secstrbuf[] = _("________0 seconds");
@ -163,7 +163,7 @@ secbool protectPinUiCallback(uint32_t wait, uint32_t progress)
secstrbuf[16] = 0; secstrbuf[16] = 0;
} }
oledClear(); oledClear();
oledDrawStringCenter(OLED_WIDTH / 2, 0 * 9, _("Verifying PIN"), FONT_STANDARD); oledDrawStringCenter(OLED_WIDTH / 2, 0 * 9, message, FONT_STANDARD);
oledDrawStringCenter(OLED_WIDTH / 2, 2 * 9, _("Please wait"), FONT_STANDARD); oledDrawStringCenter(OLED_WIDTH / 2, 2 * 9, _("Please wait"), FONT_STANDARD);
oledDrawStringCenter(OLED_WIDTH / 2, 3 * 9, secstr, FONT_STANDARD); oledDrawStringCenter(OLED_WIDTH / 2, 3 * 9, secstr, FONT_STANDARD);
oledDrawStringCenter(OLED_WIDTH / 2, 4 * 9, _("to continue ..."), FONT_STANDARD); oledDrawStringCenter(OLED_WIDTH / 2, 4 * 9, _("to continue ..."), FONT_STANDARD);

View File

@ -25,7 +25,7 @@
#include "secbool.h" #include "secbool.h"
bool protectButton(ButtonRequestType type, bool confirm_only); bool protectButton(ButtonRequestType type, bool confirm_only);
secbool protectPinUiCallback(uint32_t wait, uint32_t progress); secbool protectPinUiCallback(uint32_t wait, uint32_t progress, const char* message);
bool protectPin(bool use_cached); bool protectPin(bool use_cached);
bool protectChangePin(bool removal); bool protectChangePin(bool removal);
bool protectPassphrase(void); bool protectPassphrase(void);

@ -1 +1 @@
Subproject commit 24df1ca2b768d62162e9ab95602698d26c371746 Subproject commit 0e897f673a2150607bae553e21604b253352644e