feat(python): Implement DebugLinkOptigaSetSecMax.

pull/4016/head
Andrew Kozlik 2 months ago committed by Andrew Kozlik
parent b71a809da3
commit b6b1ad8825

@ -0,0 +1 @@
Added ability to set Optiga's security event counter to maximum: `trezorctl debug optiga-set-sec-max`.

@ -21,6 +21,7 @@ import click
from .. import mapping, messages, protobuf
from ..client import TrezorClient
from ..debuglink import TrezorClientDebugLink
from ..debuglink import optiga_set_sec_max as debuglink_optiga_set_sec_max
from ..debuglink import prodtest_t1 as debuglink_prodtest_t1
from ..debuglink import record_screen
from . import with_client
@ -112,3 +113,10 @@ def prodtest_t1(client: "TrezorClient") -> str:
Only available on PRODTEST firmware and on T1B1. Formerly named self-test.
"""
return debuglink_prodtest_t1(client)
@cli.command()
@with_client
def optiga_set_sec_max(client: "TrezorClient") -> str:
"""Set Optiga's security event counter to maximum."""
return debuglink_optiga_set_sec_max(client)

@ -1362,3 +1362,8 @@ def record_screen(
def _is_emulator(debug_client: "TrezorClientDebugLink") -> bool:
"""Check if we are connected to emulator, in contrast to hardware device."""
return debug_client.features.fw_vendor == "EMULATOR"
@expect(messages.Success, field="message", ret_type=str)
def optiga_set_sec_max(client: "TrezorClient") -> protobuf.MessageType:
return client.call(messages.DebugLinkOptigaSetSecMax())

Loading…
Cancel
Save