AndreasFagschlunger / O2Xfs

Java API for accessing CEN/XFS API, EMV Level 2 Kernel
47 stars 28 forks source link

ProcessingOptions.execute() failed #52

Open dotfeng opened 6 years ago

dotfeng commented 6 years ago

ProcessingOptions.execute(), line 60, transaction.getCandidate().getPDOL() is null, InitiateApplicationProcessing.selectCandidate(), line 70, ADF has new pdol, but do not update to candidate

AndreasFagschlunger commented 6 years ago

I don's see yet how PDOL can be null within Candidate. As far as I can see this could only happen when CandidateBuilder.pdol(byte[]) is called with null, which it isn't:

https://github.com/AndreasFagschlunger/O2Xfs/blob/develop/at.o2xfs.emv/src/main/java/at/o2xfs/emv/CandidateList.java#L137

What I agree is, that after final application selection in InitiateApplicationProcessing, the Candidate doesn't get updated. Which should not be be a problem in general, since why should data change between two selections?

dotfeng commented 6 years ago

What you mention is in tryAIDs(), but not tryPSE(), when I get candidates from pse, then selectCandidate in InitiateApplicationProcessing, the adf is from new RAPDU, but it's pdol is not update to candidate, which is already in candidates, I add this to Line 70 in InitiateApplicationProcessing to update candidate's pdol

ADF file = new ADF(TLV.parse(response.getData())); candidate.setPdol(file.getPDOL());

https://github.com/AndreasFagschlunger/O2Xfs/blob/develop/at.o2xfs.emv/src/main/java/at/o2xfs/emv/InitiateApplicationProcessing.java#L70