cards: All derived of SimCardBase use CLA=A0; all UiccCardBase use CLA=00

Change-Id: Id61b549f68410631529349ee62b08a102f609405
This commit is contained in:
Harald Welte
2023-07-10 22:20:40 +02:00
parent b314b9be34
commit 172c28eba8
2 changed files with 6 additions and 4 deletions

View File

@@ -83,6 +83,10 @@ class SimCardBase(CardBase):
any higher-layer processing."""
name = 'SIM'
def __init__(self, scc: LinkBase):
super(SimCardBase, self).__init__(scc)
self._scc.cla_byte = "A0"
def probe(self) -> bool:
df_gsm = DF_GSM()
return self.file_exists(df_gsm.fid)
@@ -93,7 +97,8 @@ class UiccCardBase(SimCardBase):
def __init__(self, ssc: LinkBase):
super(UiccCardBase, self).__init__(ssc)
# See also: ETSI TS 102 221, Table 9.3
self._scc.cla_byte = "00"
# See also: ETSI TS 102 221, Table 9.3
self._adm_chv_num = 0xA0
def probe(self) -> bool:

View File

@@ -893,7 +893,6 @@ class SysmoUSIMSJS1(UsimCard):
def __init__(self, ssc):
super(SysmoUSIMSJS1, self).__init__(ssc)
self._scc.cla_byte = "00"
self._scc.sel_ctrl = "0004" # request an FCP
@classmethod
@@ -1206,7 +1205,6 @@ class WavemobileSim(UsimCard):
def __init__(self, ssc):
super(WavemobileSim, self).__init__(ssc)
self._adm_chv_num = 0x0A
self._scc.cla_byte = "00"
self._scc.sel_ctrl = "0004" # request an FCP
@classmethod
@@ -1301,7 +1299,6 @@ class SysmoISIMSJA2(UsimCard, IsimCard):
def __init__(self, ssc):
super(SysmoISIMSJA2, self).__init__(ssc)
self._scc.cla_byte = "00"
self._scc.sel_ctrl = "0004" # request an FCP
@classmethod