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

core/sd_salt: fix bug introduced in ede1a0bae3

This commit is contained in:
Pavol Rusnak 2019-10-02 16:46:42 +00:00
parent 04466402ce
commit adbec13779
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -120,9 +120,9 @@ async def request_sd_salt(
async def set_sd_salt(
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes, filename: str = "salt"
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes, new: bool = False
) -> None:
salt_path = _get_salt_path()
salt_path = _get_salt_path(new)
sd = io.SDCard()
if not sd.power(True):
@ -146,7 +146,7 @@ async def set_sd_salt(
async def stage_sd_salt(
ctx: Optional[wire.Context], salt: bytes, salt_tag: bytes
) -> None:
await set_sd_salt(ctx, salt, salt_tag, "salt.new")
await set_sd_salt(ctx, salt, salt_tag, True)
async def commit_sd_salt(ctx: Optional[wire.Context]) -> None: