laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/30440 )


Change subject: pySim-trace: Also consider SW 91xx as successful
......................................................................

pySim-trace: Also consider SW 91xx as successful

Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6
---
M pySim/apdu/__init__.py
1 file changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/40/30440/1

diff --git a/pySim/apdu/__init__.py b/pySim/apdu/__init__.py
index 3961fe9..1d1174d 100644
--- a/pySim/apdu/__init__.py
+++ b/pySim/apdu/__init__.py
@@ -135,7 +135,12 @@
         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):

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/30440
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9e4170721be30342bdce7fb4beeefd1927263ca6
Gerrit-Change-Number: 30440
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to