aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-03-22 21:47:20 +0100
committerHarald Welte <laforge@gnumonks.org>2011-03-22 21:47:20 +0100
commit982a3075f9919d9651d33ed3ddebd7b52bfc1ad5 (patch)
treeeb1b86de60169bff476b89340af4e3196c783430
parent530076ebbad71b2026ea1b5924f691ce7e8bcffc (diff)
commands: Check SW for UPDATE BIN / UPDATE REC / VERIFY CHV
-rw-r--r--pySim/commands.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pySim/commands.py b/pySim/commands.py
index 0e449e6..f650272 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -50,7 +50,7 @@ class SimCardCommands(object):
ef = [ef]
self.select_file(ef)
pdu = 'a0d6%04x%02x' % (offset, len(data)/2) + data
- return self._tp.send_apdu(pdu)
+ return self._tp.send_apdu_checksw(pdu)
def read_record(self, ef, rec_no):
if not hasattr(type(ef), '__iter__'):
@@ -71,7 +71,7 @@ class SimCardCommands(object):
else:
rec_length = len(data)/2
pdu = ('a0dc%02x04%02x' % (rec_no, rec_length)) + data
- return self._tp.send_apdu(pdu)
+ return self._tp.send_apdu_checksw(pdu)
def record_size(self, ef):
r = self.select_file(ef)
@@ -92,4 +92,4 @@ class SimCardCommands(object):
def verify_chv(self, chv_no, code):
fc = rpad(b2h(code), 16)
- return self._tp.send_apdu('a02000' + ('%02x' % chv_no) + '08' + fc)
+ return self._tp.send_apdu_checksw('a02000' + ('%02x' % chv_no) + '08' + fc)