From 23c6349c98967f39d9a5d8c803d2d1b6df4b2cc1 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 2 Sep 2023 14:34:08 +0300 Subject: [PATCH] Verify that 'identity-v1' state machine is used Following https://github.com/romanz/trezor-agent/issues/426. --- libagent/age/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libagent/age/__init__.py b/libagent/age/__init__.py index 95fd03a..93a3cf8 100644 --- a/libagent/age/__init__.py +++ b/libagent/age/__init__.py @@ -172,8 +172,10 @@ def main(device_type): try: if args.identity: run_pubkey(device_type=device_type, args=args) - elif args.age_plugin: + elif args.age_plugin == 'identity-v1': run_decrypt(device_type=device_type, args=args) + else: + log.error("Unsupported state machine: %r", args.age_plugin) except Exception as e: # pylint: disable=broad-except log.exception("age plugin failed: %s", e)