Split EF.UST handling from EF.IST and EF.SST
The existing code had the following serious problems:
* when trying to update EF.SST or EF.IST, it would write to EF.UST !
* shell commands were called ust_* even for the EST/IST files
Let's introduce the proper separation between what is shared and what
is file-specific.
Change-Id: Ie55669ca37a4762fac9f71b1db528ca67056e8dd
diff --git a/pySim/cards.py b/pySim/cards.py
index c3766e9..1ed1634 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -425,6 +425,15 @@
EF_USIM_ADF_map['UST'], content)
return sw
+ def update_est(self, service, bit=1):
+ (res, sw) = self._scc.read_binary(EF_USIM_ADF_map['EST'])
+ if sw == '9000':
+ content = enc_st(res, service, bit)
+ (res, sw) = self._scc.update_binary(
+ EF_USIM_ADF_map['EST'], content)
+ return sw
+
+
class IsimCard(SimCard):
@@ -566,6 +575,14 @@
sw)
return uiari_recs
+ def update_ist(self, service, bit=1):
+ (res, sw) = self._scc.read_binary(EF_ISIM_ADF_map['IST'])
+ if sw == '9000':
+ content = enc_st(res, service, bit)
+ (res, sw) = self._scc.update_binary(
+ EF_ISIM_ADF_map['IST'], content)
+ return sw
+
class MagicSimBase(abc.ABC, SimCard):
"""