Change in pysim[master]: filesystem: decode select response for MF

laforge gerrit-no-reply at lists.osmocom.org
Wed Mar 3 07:51:44 UTC 2021


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


Change subject: filesystem: decode select response for MF
......................................................................

filesystem: decode select response for MF

We always use the select response parser from the parent file. The usual
case will be that on the way up at least one parent has overloeaded the
response parser from the MF. However, this is not the case when an EF at
the top level is selected, then we will just get the hexdump of the
response since no response parser is available. Lets add a response
parser for the MF as well so that we always parse the select response.

Change-Id: Ib2b2476fc0e7d34cdacf7eb100ffadceb788c4d2
Related: OS#4963
---
M pySim/filesystem.py
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/23209/1

diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 71392fa..a1f9b8e 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -34,6 +34,8 @@
 from pySim.utils import sw_match, h2b, b2h
 from pySim.exceptions import *
 
+import pySim.ts_51_011
+
 class CardFile(object):
     """Base class for all objects in the smart card filesystem.
     Serve as a common ancestor to all other file types; rarely used directly.
@@ -241,8 +243,8 @@
 
     def decode_select_response(self, data_hex):
         """Decode the response to a SELECT command."""
-        return data_hex
 
+        return pySim.ts_51_011.decode_select_response(data_hex)
 
 
 class CardADF(CardDF):

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ib2b2476fc0e7d34cdacf7eb100ffadceb788c4d2
Gerrit-Change-Number: 23209
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210303/620ed4f8/attachment.htm>


More information about the gerrit-log mailing list