aboutsummaryrefslogtreecommitdiffstats
path: root/pySim
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-03-22 14:31:36 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-03-22 15:25:19 +0100
commit93b38cd0f53b466478f2d8fcfcca030999bdf695 (patch)
treee71cc80b46ba815b9726b6ba0732141d581b5305 /pySim
parent4d91bf449fb60138ae68c1efad96ea89af674f93 (diff)
usim/opc: Add support to write completely random OPC
Allow to set the OPC, write it out to the state, generate it randomly.
Diffstat (limited to 'pySim')
-rw-r--r--pySim/cards.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index fe8a6c9..88eceb0 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -337,9 +337,8 @@ class SysmoUSIMgr1(Card):
data, sw = self._scc._tp.send_apdu_checksw("0020000A083332323133323332")
# TODO: move into SimCardCommands
- # TODO: Add OPC support support to pySIM
par = ( p['ki'] + # 16b K
- 32*"F" + # 32b OPC
+ p['opc'] + # 32b OPC
self._e_iccid(p['iccid']) + # 10b ICCID
self._e_imsi(p['imsi']) # 9b IMSI_len + id_type(9) + IMSI
)