trezor-agent icon indicating copy to clipboard operation
trezor-agent copied to clipboard

Port to trio async library

Open SlugFiller opened this issue 2 years ago • 1 comments

Changed from sync IO to async IO with cancellation scopes. This enables a few improvements that would have been difficult or impossible before:

  • GPG agent allows multiple concurrent clients
  • SSH agent no longer holds an exclusive lock for every request handled. Instead, the device is locked while being connected, only for the duration of operations done with the device.
  • Clean handling of exit from the agents with Ctrl+C
  • Clean handling of exit while device interaction or pinentry are running with Ctrl+C
  • When the device requests interaction, a pinentry message is displayed. It automatically closes when the operation completes.
  • It is possible to close the GPG agent with either the KILLAGENT message or Ctrl+C.
  • More gracefully handle various errors in GPG agent, preventing agent crash, or frozen client.

SlugFiller avatar Sep 23 '23 15:09 SlugFiller

Many thanks! Will try to review when I'll be available (hopefully in a few weeks).

romanz avatar Sep 24 '23 13:09 romanz