fileystem: fix ADF selection

When the ADF is selected, then this is done by the AID. At the moment
only the first 7 bytes of the AID are used to select the ADF.
sysmo-isim-sja2 tolerates this, but sysmo-usim-sjs1 does not. The Cards
class already has methods to deal with this problem. The method
select_adf_by_aid takes an ADF name and completes the AID from an
internal list. This can be extended to support partial hexadecimal AIDs
as well.

Change-Id: If99b143ae5ff42a889c52e8023084692e709e1b1
Related: OS#4963
This commit is contained in:
Philipp Maier
2021-03-11 13:03:18 +01:00
committed by Harald Welte
parent ad073e834a
commit cba6dbce9a
3 changed files with 26 additions and 21 deletions

View File

@@ -665,7 +665,7 @@ class RuntimeState(object):
f = sels[name]
try:
if isinstance(f, CardADF):
(data, sw) = self.card._scc.select_adf(f.aid)
(data, sw) = self.card.select_adf_by_aid(f.aid)
else:
(data, sw) = self.card._scc.select_file(f.fid)
self.selected_file = f