jay-to-the-dee / javaemvreader

Automatically exported from Google Code as a backup - I am NOT the original author!

Home Page:https://code.google.com/p/javaemvreader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If partial match is allowed, only the first occurrence is added to the candidate list

GoogleCodeExporter opened this issue · comments

During direct selection of applications, if a partial match is allowed, only 
the first occurrence is added to the candidate list. For the second and next 
selections, before the corresponding FCI is parsed, an application object is 
created with the AID used during the partial selection (only the beginning of 
the complete AID). When the FCI is parsed, the complete AID is set to the 
application. When setting the new (longer) AID an exception is thrown 
("Attempting to assign a different AID value").

The problem is reproducible only when the AID obtained by partial selection is 
not present in the known AID list. If the AID is known, it will be selected 
during the direct selection and the problem will be hidden.

I observed this bug while reading a VISA Electron card with 2 applications 
(VISA Electron and VISA Auth), not supporting PSE. VISA Auth (AID: A000000003 
8002) was not known and, while it was selected using partial selection for AID 
A000000003, it did not show up in the candidate list.

I attached a patch for this bug and also another patch for adding VISA Auth to 
the known AID list.

Also, I think that the hack from line 434 of file EMVSession.java isn't needed 
(or if you decide to keep the hack, also apply it for the first selection - 
line 412).

Original issue reported on code.google.com by doruc...@gmail.com on 9 Nov 2012 at 9:15

Attachments:

Original comment by sasc...@gmail.com on 9 Nov 2012 at 7:50

  • Changed state: Started

Original comment by sasc...@gmail.com on 9 Nov 2012 at 7:52

  • Added labels: Priority-High
  • Removed labels: Priority-Medium
Fixed in the latest version (0.4.0)

Original comment by sasc...@gmail.com on 17 Nov 2012 at 9:27

  • Changed state: Fixed