Use the function select_adf_by_aid for selecting an AID

Basically, the idea is to read all the AIDs on the UICC once
rather than reading each time we want to select an ADF.

The function select_adf_by_aid select the ADF by its AID which
is already populated by read_aids() function

Change-Id: I5e0e87e9cf238922d60fda7a7836e65f91f2c233
This commit is contained in:
herlesupreeth
2020-09-11 21:16:51 +02:00
parent 8016405994
commit 1a13c44200

View File

@@ -1165,20 +1165,14 @@ class SysmoISIMSJA2(UsimCard):
self._scc.update_binary('6f20', p['opc'], 17)
# update EF-USIM_AUTH_KEY in ADF.ISIM
self._scc.select_file(['3f00'])
aid = self.read_aid(isim = True)
if (aid):
self._scc.select_adf(aid)
if '9000' == self.select_adf_by_aid(adf="isim"):
if p.get('ki'):
self._scc.update_binary('af20', p['ki'], 1)
if p.get('opc'):
self._scc.update_binary('af20', p['opc'], 17)
self._scc.select_file(['3f00'])
aid = self.read_aid()
if (aid):
if '9000' == self.select_adf_by_aid():
# update EF-USIM_AUTH_KEY in ADF.USIM
self._scc.select_adf(aid)
if p.get('ki'):
self._scc.update_binary('af20', p['ki'], 1)
if p.get('opc'):