From 982a3075f9919d9651d33ed3ddebd7b52bfc1ad5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 22 Mar 2011 21:47:20 +0100 Subject: commands: Check SW for UPDATE BIN / UPDATE REC / VERIFY CHV --- pySim/commands.py | 6 +++--- 1 file 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) -- cgit v1.2.3