polhenarejos / pico-openpgp

Converting a Raspberry Pico into an OpenPGP CCID smart card.
https://www.picokeys.com
GNU General Public License v3.0
55 stars 8 forks source link

Cannot execute gnuk tests #5

Closed polhenarejos closed 1 year ago

polhenarejos commented 1 year ago
          > Is it a VID/PID discovery problem?

Most likely. I reverse-engineered the not so well documented dependencies for the Gnuk test repository and initiated the contained tests. They should just use APDUs according to the OpenPGP spec. But I could not get so far.

The conftest.py fixture prepares the environment for each test and it failed somewhere around get_ccid_device().

I deleted the VM where I tested but it was related to card_reader.py and usb.core. The iterator was empty.

I think it is not just the VID:PID (if I remember correclty, I even tested a few) but some USB/CCID quirks are done for specific card reader models.

Originally posted by @rrottmann in https://github.com/polhenarejos/pico-hsm/issues/16#issuecomment-1410993894

polhenarejos commented 1 year ago

I cannot run it in Mac since it complains about permissions.

Anyway, I think the best approach is to port these tests to pyscard, which implements all ccid stack, and interface only with apdu.

polhenarejos commented 1 year ago

It runs smoothly without problems.