1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

src/apps/management/reset_device: don't show internal entropy when no_backup is set

This commit is contained in:
Pavol Rusnak 2018-10-08 15:42:35 +02:00
parent 0d68711e47
commit de12ad705c
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -26,6 +26,8 @@ async def reset_device(ctx, msg):
# validate parameters and device state
if msg.strength not in (128, 192, 256):
raise wire.ProcessError("Invalid strength (has to be 128, 192 or 256 bits)")
if msg.display_random and msg.no_backup:
raise wire.ProcessError("Can't show internal entropy when no_backup is used")
if storage.is_initialized():
raise wire.UnexpectedMessage("Already initialized")