laforge has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/31814 )
Change subject: SimCardCommands.run_gsm(): use send_apdu_checksw()
......................................................................
SimCardCommands.run_gsm(): use send_apdu_checksw()
Change-Id: Ib713cf8154a3aba72bc5776a8d99ec47631ade28
---
M pySim/commands.py
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/commands.py b/pySim/commands.py
index ba37876..b0f8b39 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -407,7 +407,7 @@
if len(rand) != 32:
raise ValueError('Invalid rand')
self.select_path(['3f00', '7f20'])
- return self._tp.send_apdu('a0' + '88000010' + rand)
+ return self._tp.send_apdu_checksw('a0' + '88000010' + rand,
sw='9000')
def authenticate(self, rand: str, autn: str, context='3g'):
"""Execute AUTHENTICATE (USIM/ISIM).
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/31814
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib713cf8154a3aba72bc5776a8d99ec47631ade28
Gerrit-Change-Number: 31814
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: merged