mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-22 21:38:35 +03:00
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
This commit is contained in:
@@ -425,6 +425,15 @@ class UsimCard(SimCard):
|
||||
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 @@ class IsimCard(SimCard):
|
||||
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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user