From bc7437d3b6df686c62af289fe49a58f31a176a04 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 2 Dec 2022 23:21:18 +0100 Subject: [PATCH] pySim-trace: Also consider SW 91xx as successful Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6 --- pySim/apdu/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pySim/apdu/__init__.py b/pySim/apdu/__init__.py index 3961fe9d..1d1174d6 100644 --- a/pySim/apdu/__init__.py +++ b/pySim/apdu/__init__.py @@ -135,7 +135,12 @@ class Apdu(Tpdu): if callable(method): return method() # default case: only 9000 is success - return self.sw == b'\x90\x00' + if self.sw == b'\x90\x00': + return True + # This is not really a generic positive APDU SW but specific to UICC/SIM + if self.sw[0] == 0x91: + return True + return False class ApduCommand(Apdu, metaclass=ApduCommandMeta):