arekinath / pivy

Tools for using PIV tokens (like Yubikeys) as an SSH agent, for encrypting data at rest, and more
193 stars 26 forks source link

pivy-box should not fail when PCSC cannot find a reader #33

Closed jclulow closed 1 year ago

jclulow commented 1 year ago

Without a Yubikey connected, and without an SSH agent available, the program exits rather than entering the recovery menu:

$ pivy-box stream decrypt some.ebox >some.plain.txt
pivy-box: 'stream decrypt' command failed
  Caused by PCSCError: SCardListReaders failed: -2146435026 (Cannot find a smart card reader.)
    in piv_find() at piv.c:1268