2
votes

I am writing code to extract as much data as possible from an EMV chip card. I can select the application and I have code to send Get Processing Options, but that needs (in some cases) the PDOL to be evaluated and associated data supplied.

The data the PDOL asks for is based on a transaction though, and there will be no transaction in this sequence. Once I have extracted the data then I'm done, so the only reason for GPO would be to get the Application File Locator (AFL).

I suspect the answer here is 'no', but is there any other way to get the AFL? At the moment the only alternative is a brute-force series of Read Record calls with SFI from 1 to 10 and records from 1 to 31. This is slow and, if I can get the AFL, unnecessary so I'm hoping for a more intelligent approach (but one that doesn't need GPO to be used).

2

2 Answers

1
votes

As per EMV specifications PDOL if exists is returned in response to SELECT in A5 - FCI Proprietary Template.

PDOL will provide the tag and length of data expected, but since you are not looking in a real transaction perspective, pack all tag data as zeros(make sure of the expected length) and send in GPO. It should return AFL which you could then use in READ RECORDS efficiently.

1
votes

There is not a single way to retrieve AFL without issuing the GPO command.