solokeys / solo2-cli

Solo 2 library and CLI in Rust
https://docs.rs/solo2
Apache License 2.0
170 stars 31 forks source link

Cannot use some app commands #32

Closed gcochard closed 2 years ago

gcochard commented 2 years ago

I'm attempting to use the solo2 app ndef data and solo2 app oath list commands, and I get an explicit panic. When I added some debug statements, it appears that the cli is attempting to send vendor code 0xA4 for ndef data and 0xA1 for oath list, both of which are outside the expected range for vendor codes.

I checked the CTAP spec and it says that the range is actually 0x40 to 0xBF, so I expanded the expected range on the solo cli source to match that. When I attempt to run those commands it now hangs after sending the packet over CTAP.

I found those hex values in the apps' sources, so I would expect this to work unless there is another check earlier on in the firmware that is dropping instructions beyond the vendor code range.

Are these commands expected to work on the latest released firmware and CLI?

I can provide detailed trace level logs and backtraces if requested.

mskarbek commented 2 years ago

Same here.

nickray commented 2 years ago

NDEF and OATH don't work via CTAP, you need CCID for that. Plan to add better errors for this, CTAP support is only currently useful for firmware update (in particular admin app), to unlock firmware improvements on platforms without CCID (mac and older linux distros).

mskarbek commented 2 years ago

Ok, rebuilding and installing ccid 1.4.36 helped. I had 1.4.33 originally.

nickray commented 2 years ago

Correct, we're in the CCID driver since version 1.4.35.