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

error with cap #6

Closed
CharlesButcher opened this issue May 28, 2018 · 15 comments
Closed

error with cap #6

CharlesButcher opened this issue May 28, 2018 · 15 comments

Comments

@CharlesButcher
Copy link

emvtool info works fine.

emvtool -p 0000 cap errors:

File "/Users/charles/Library/Python/3.6/lib/python/site-packages/emv/command/client.py", line 129, in cap
value=self.args.amount))
File "/Users/charles/Library/Python/3.6/lib/python/site-packages/emv/card.py", line 88, in generate_cap_value
self.select_application(apps[-1][Tag.ADF_NAME])
KeyError: -1

I haven’t a clue about Python, so apologies if this is a problem with my setup. macOS 10.13.4, with libpcsclite pre-installed as part of the OS.

This is a fantastic project! Keep up the great work.

@russss
Copy link
Owner

russss commented May 28, 2018

Does emvtool info show any applications at all?

@CharlesButcher
Copy link
Author

CharlesButcher commented May 28, 2018 via email

@CharlesButcher
Copy link
Author

CharlesButcher commented May 28, 2018 via email

@russss
Copy link
Owner

russss commented May 30, 2018

It look me a ridiculously long time today to get my dev environment working on my Mac again...

I've released a new version which fixes a few minor bugs in what you were seeing. pip3 install --upgrade emv to get the newest version.

It turns out it probably wasn't compatible with Python 3 - it's now only compatible with python 3.

If you're still seeing issues, let me know.

@CharlesButcher
Copy link
Author

CharlesButcher commented May 30, 2018 via email

@CharlesButcher
Copy link
Author

CharlesButcher commented May 30, 2018 via email

@russss
Copy link
Owner

russss commented May 30, 2018

I've pushed a new version which has a few more changes. It may at least give you a better error message. But this is quite bizarre.

@CharlesButcher
Copy link
Author

CharlesButcher commented May 31, 2018 via email

@russss
Copy link
Owner

russss commented May 31, 2018

Ah, I'm glad your Barclays card works now! I think the issue there was that emvtool had a bug when there was only one app on the card.

I've published 1.0.3 which should fix those errors on your other Barclays card - it's failing to decode some objects which are unnecessary to do the CAP process.

The Nationwide card is going to be a bit harder unfortunately...

@CharlesButcher
Copy link
Author

CharlesButcher commented May 31, 2018 via email

@russss
Copy link
Owner

russss commented May 31, 2018

1.0.4 released, which should fix that CVMList error.

I've also improved the error handling in the CAP process, but I suspect I haven't fixed that KeyError bug.

On the non-working Barclays card: you can now run emvtool listapps which will show the list of apps. Can you show me the output of that, and take a note of the index of the "Barclays" app and then run emvtool --redact appdata 2 (replacing "2" with the index of the Barclays app if it's different), and send the output of that as well.

@CharlesButcher
Copy link
Author

CharlesButcher commented May 31, 2018 via email

@russss
Copy link
Owner

russss commented May 31, 2018

[Unfortunately the error message you posted contained the card number. I've removed it from your comment and I doubt anyone else would have spotted it in the short time it was up.]

This is very interesting. Unfortunately there's not a huge amount I can do here - from my perspective this card is missing the information I need to be able to construct the CAP query.

It's complicated because the exact process of generating the CAP/pinsentry codes is not publicly standardised. It's clear that there may be more to this than I'm aware of, but short of having possession of a problematic card and a modified reader, it's impossible for me to work out what's happening.

@CharlesButcher
Copy link
Author

CharlesButcher commented May 31, 2018 via email

@CharlesButcher
Copy link
Author

CharlesButcher commented Jun 1, 2020

Closing this because as of v1.0.8 everything seemed to be fine for the cards mentioned here. Now I have a new card and a new error ;-) #12

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

No branches or pull requests

2 participants