mirror of https://gerrit.osmocom.org/pysim
fix writing of ICCID for sysmo-usim-sjs1
The programming procedure for sysmo-usim-sjs1 lacks writing the ICCID. This commit adds the missing call to update_binary() Change-Id: Ief85aa07c562d8d7b2a6dec302d2f485d0b1e577
This commit is contained in:
parent
4146086d2f
commit
e960488338
|
@ -434,20 +434,20 @@ class SysmoUSIMSJS1(Card):
|
||||||
|
|
||||||
def program(self, p):
|
def program(self, p):
|
||||||
|
|
||||||
|
# authenticate as ADM using default key (written on the card..)
|
||||||
|
if not p['pin_adm']:
|
||||||
|
raise ValueError("Please provide a PIN-ADM as there is no default one")
|
||||||
|
self._scc.verify_chv(0x0A, h2b(p['pin_adm']))
|
||||||
|
|
||||||
# select MF
|
# select MF
|
||||||
r = self._scc.select_file(['3f00'])
|
r = self._scc.select_file(['3f00'])
|
||||||
|
|
||||||
|
# write EF.ICCID
|
||||||
|
data, sw = self._scc.update_binary('2fe2', enc_iccid(p['iccid']))
|
||||||
|
|
||||||
# select DF_GSM
|
# select DF_GSM
|
||||||
r = self._scc.select_file(['7f20'])
|
r = self._scc.select_file(['7f20'])
|
||||||
|
|
||||||
# authenticate as ADM using default key (written on the card..)
|
|
||||||
if not p['pin_adm']:
|
|
||||||
raise ValueError("Please provide a PIN-ADM as there is no default one")
|
|
||||||
|
|
||||||
self._scc.verify_chv(0x0A, h2b(p['pin_adm']))
|
|
||||||
|
|
||||||
|
|
||||||
# set Ki in proprietary file
|
# set Ki in proprietary file
|
||||||
data, sw = self._scc.update_binary('00FF', p['ki'])
|
data, sw = self._scc.update_binary('00FF', p['ki'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue