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

Fix conditional error resetting has_pw1 variable #17

Closed imkuang closed 1 month ago

imkuang commented 1 month ago

According to OpenPGP 3.4.1 specifications subsection 4.4.1:

PW status Bytes
1st byte: 00 = PW1 (no. 81) only valid for one PSO:CDS command
          01 = PW1 valid for several PSO:CDS commands

Therefore has_pw1 should be reset to false when the first byte of the PW status is 0 instead of 1. This resulted in issue #16

imkuang commented 1 month ago

Not sure why the CI failed, but it doesn't seem too relevant to my commit?