Make programming OPC optional

Change-Id: Ic600c325557918cb7d5b1fb179c01936a078c96c
This commit is contained in:
Daniel Willmann
2018-06-15 07:42:48 +02:00
committed by Harald Welte
parent 35a96edb0d
commit 67acdbc817

View File

@@ -582,9 +582,9 @@ class SysmoUSIMSJS1(Card):
data, sw = self._scc.update_binary('00FF', p['ki'])
# set OPc in proprietary file
content = "01" + p['opc']
data, sw = self._scc.update_binary('00F7', content)
if 'opc' in p:
content = "01" + p['opc']
data, sw = self._scc.update_binary('00F7', content)
# write EF.IMSI
data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi']))