diff options
author | herlesupreeth <herlesupreeth@gmail.com> | 2020-09-11 21:16:51 +0200 |
---|---|---|
committer | herlesupreeth <herlesupreeth@gmail.com> | 2020-09-15 15:56:31 +0200 |
commit | 1a13c44200aa1bcb94c6b0c1f4fc559b73b94557 (patch) | |
tree | 75668a9edf782286476266c5e1c155adef6775e1 | |
parent | 8016405994cf64e6e6900285579e853e67c35727 (diff) |
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
-rw-r--r-- | pySim/cards.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index 76d405b..d1b449a 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -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'): |