mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-20 12:28:33 +03:00
pySim-prog.py: add presence/length checks for user-provided SPN
Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0
This commit is contained in:
committed by
Vadim Yanitskiy
parent
6af4c21cdf
commit
840a9e2a76
@@ -613,8 +613,9 @@ class SysmoUSIMSJS1(Card):
|
||||
data, sw = self._scc.update_binary('00F7', content)
|
||||
|
||||
# set Service Provider Name
|
||||
content = enc_spn(p['name'], True, True)
|
||||
data, sw = self._scc.update_binary('6F46', rpad(content, 32))
|
||||
if p.get('name') is not None:
|
||||
content = enc_spn(p['name'], True, True)
|
||||
data, sw = self._scc.update_binary('6F46', rpad(content, 32))
|
||||
|
||||
# write EF.IMSI
|
||||
data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi']))
|
||||
|
||||
Reference in New Issue
Block a user