Skip to content

bug: failed card identification #29

@willianpaixao

Description

@willianpaixao

While testing an unrelated feature, I keep getting errors. keycard-generate-mnemonic is not working, as well as keycard-sign-message.
The keycard has the latest .cap file, card is initiazed and keys generated. I can perform several operations but some quite simple, like keycard-identify gives the following error:

$ keycard shell -l debug < _shell-commands-examples/16-identify.sh 
INFO [09-04|16:54:41.779] waiting for a card                       package=keycard-cli
INFO [09-04|16:54:42.770] card found                               package=keycard-cli index=0
DEBUG[09-04|16:54:42.771] using reader                             package=keycard-cli name="Alcor Micro AU9540 00 00"
DEBUG[09-04|16:54:42.771] connecting to card                       package=keycard-cli reader="Alcor Micro AU9540 00 00"
DEBUG[09-04|16:54:42.791] card protocol                            package=keycard-cli T=1
INFO [09-04|16:54:42.791] select keycard                           package=keycard-cli
DEBUG[09-04|16:54:42.791] apdu command                             package=keycard-go/io hex="00 A4 04 00 09 A0 00 00 08 04 00 01 01 01 00"
DEBUG[09-04|16:54:42.830] apdu response                            package=keycard-go/io hex="A4 81 81 8F 10 FA A5 20 72 6E ED B5 29 1B 4E B9 5F EC A8 69 5A 80 41 04 2B EA 6B BD 4D 16 B8 AD C9 D2 6D 8A F4 7F 59 59 C1 18 96 C2 DD 8E 3E 16 14 BD CD 90 D9 C3 41 DF 2F 9D 98 D1 76 94 29 A6 60 3C D8 5F 25 31 76 10 B8 9A B2 FB F7 93 C8 A1 28 10 C4 5A 12 C2 86 84 02 02 03 01 02 01 64 8E 20 EE C7 D8 2C 40 E8 D9 09 99 47 4C 12 7B 68 96 92 A6 50 BC 30 7C 21 B4 5D A2 C3 98 8A 6D 1A 15 5C 8D 01 1F 90 00"
DEBUG[09-04|16:54:42.832] apdu command                             package=keycard-go/io hex="80 14 00 00 20 E6 14 A1 F4 95 86 19 E8 F6 84 1D 09 47 51 63 59 71 F7 D5 08 49 1D FF 2E 16 3E 23 8C CE FE 71 2A"
DEBUG[09-04|16:54:42.843] apdu response                            package=keycard-go/io hex="69 85"
ERROR[09-04|16:54:42.843] failed card identification               package=keycard-cli   error="bad response 6985: unexpected response"
Installed: true
Initialized: true
Key Initialized: true
InstanceUID: faa520726eedb5291b4eb95feca8695a
SecureChannelPublicKey: 042bea6bbd4d16b8adc9d26d8af47f5959c11896c2dd8e3e1614bdcd90d9c341df2f9d98d1769429a6603cd85f25317610b89ab2fbf793c8a12810c45a12c28684
Version: 0301
AvailableSlots: 64
KeyUID: eec7d82c40e8d90999474c127b689692a650bc307c21b45da2c3988a6d1a155c
Capabilities:
  Secure channel:true
  Key management:true
  Credentials Management:true
  NDEF:true

ERROR[09-04|16:54:42.843] error executing command                  package=keycard-cli   command=shell error="bad response 6985: unexpected response"

I didn't have the time to pin down the commit that introduced the bug, but the latest release (0.7.0) is working fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions