v3.25.0 review: the DF-tree ARR resolution walk-up

The live card references 6F06 from MF-tree files (MF/7F20/6F07 ->
8B 03 6F06 14), but the resolver compared only the path's first
segment: the reference fell back to the ADF.USIM copy instead of the
file's own DF copy (ISO 7816-4 5.4.3.3 / TS 102 221 9.2.7 walk-up) -
masked on this card only because all four copies are byte-identical.

- The server reads the DF.TELECOM and DF.GSM copies too (MF/7F10/6F06,
  MF/7F20/6F06 - TS 51.011), best effort.
- fcpArrRules resolves by the file's DF chain (own DF first, then
  walking up to MF); a reference with no copy in the chain resolves
  only when a single candidate exists, otherwise it stays silent.
- The implicit form prefers the file's DF copy (6F06), walking up to
  the MF copy (2F06).

Tests: the DF copy wins over the ADF copy; two candidates outside the
chain stay unresolved; a single one resolves; the implicit walk-up;
the server reads the DF-tree paths.  879 frontend + 858 Python;
sw cache simple-v424.
This commit is contained in:
2026-10-10 23:26:16 +03:00
parent 3bf005619e
commit a37266f865
7 changed files with 82 additions and 17 deletions
+7
View File
@@ -74,6 +74,13 @@ class ReadArrTests(unittest.TestCase):
self.assertEqual(arrs[0]['record_len'], 6)
self.assertEqual(arrs[1]['path'], 'ADF.USIM/6F06')
def test_reads_the_df_tree_copies(self):
app, _ = _app({'MF/2F06': ['9000'], 'MF/7F10/6F06': ['9000'],
'MF/7F20/6F06': ['9000'], 'ADF.USIM/6F06': ['9000']})
arrs = _read(app)
self.assertEqual([a['path'] for a in arrs],
['MF/2F06', 'MF/7F10/6F06', 'MF/7F20/6F06', 'ADF.USIM/6F06'])
def test_a_missing_copy_is_skipped(self):
app, _ = _app({'ADF.USIM/6F06': ['9000']})
arrs = _read(app)