Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial ISO7816 support #3681

Merged
merged 4 commits into from
Jun 1, 2024

Conversation

kidbomb
Copy link
Contributor

@kidbomb kidbomb commented Jun 1, 2024

What's new

  • translates low level CCID XfrBlock calls into command and response APDU structures

Verification

On Linux:

  • Create a new CCID device by adding a new VID and PID on the following file: On linux: set VID PID using: /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist. They have to match the same ones that are on the ccid_test_app.c file, lines 190 and 191
  • Start the CCID app and verify that the device was successfully detected as a CCID device with the command:

opensc-tool --atr

The command above shoud return 3b:00

  • Check that example 1 works with:

opensc-tool --send-apdu 01:01:00:00

The command above should return

Received (SW1=0x90, SW2=0x00)`
  • Check that example 2 works with:

opensc-tool --send-apdu 01:02:00:00

The command above should return:

Received (SW1=0x90, SW2=0x01):
62 63 bc
  • Check that example 3 works with:

opensc-tool --send-apdu 01:03:00:00:02:CA:FE

The command above should return:

Received (SW1=0x90, SW2=0x02):
CA FE ..

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

skotopes
skotopes previously approved these changes Jun 1, 2024
@skotopes
Copy link
Member

skotopes commented Jun 1, 2024

@kidbomb do you mind if I change VID PID to one of the standard card readers(Generic USB Smart Card Reader)?
In that way there will be no need to patch opensc configuration to run tests.

@kidbomb
Copy link
Contributor Author

kidbomb commented Jun 1, 2024

@skotopes - no problem, go ahead!

@skotopes skotopes merged commit 0d4ead8 into flipperdevices:dev Jun 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants