Skip to content

Keyring desync issue #7043

@M1nd3r

Description

@M1nd3r

When a THP credential is stored in the keyring, but the keyring entry is deleted using the OS (i.e. not using trezorctl device forget), the keyring gets blocked.

  • Calling trezorctl list returns NotPaired error
  • Calling terzorctl get-features fails on
    @cached_property
    def trezor_pubkey(self) -> bytes:
        return self._load_from_keyring(KEY_TREZOR_PUBKEY)
  • Deleting keyring using trezorctl device forget fails as well

Most likely cause is that there is still a "pointer" stored in the config_dir / "thp-credentials.json", but there is no underlying keyring.

Proposed fix: catch the potential exceptions when loading/trying-to-delete from keyring.

  • Adjust the json in case of deleting credentials
  • Handle failed to load credential scenario (do not fail, act like there is no credential stored).

Metadata

Metadata

Assignees

Labels

trezorlibPython library and the command line trezorctl tool.

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions