aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-02-26 13:38:28 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2021-04-01 17:47:45 +0200
commit4894fbe5f534717e11ab15f04349e0b67043e683 (patch)
tree3f851b3d54df3a77ee863cefa68bb25166ab1d50
parent069c98729d453d8476aa091b65b26247c32c0cbd (diff)
filesystem: decode select response for MFpmaier/shell2
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
-rw-r--r--pySim/filesystem.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 8ba6be3..0d3f740 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -34,6 +34,8 @@ import argparse
from pySim.utils import sw_match, h2b, b2h, is_hex
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.
@@ -252,8 +254,8 @@ class CardMF(CardDF):
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):