From 71a3fb8b3a38cd70946468a072e9fe9895d73927 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 16 Aug 2023 11:31:31 +0200 Subject: [PATCH] sim-rest-server: do not select ADF.USIM in connect_to_card When the function connect_to_card is done, it selects ADF.USIM. This might be contraproductive in case someone needs to access files on MF level in one of the REST methods. Instead fo ADF.USIM, let's use MF as a common ground to start from. At the moment the only existing REST (info, auth) immediately select ADF.USIM after calling connect_to_card already, so there are no further modifications necessary. Related: RT#67094 Change-Id: I16e7f3c991c83f81989ecc4e4764bb6cc799c01d --- contrib/sim-rest-server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/sim-rest-server.py b/contrib/sim-rest-server.py index f2ed63e1..ccf44309 100755 --- a/contrib/sim-rest-server.py +++ b/contrib/sim-rest-server.py @@ -46,7 +46,9 @@ def connect_to_card(slot_nr:int): scc.sel_ctrl = "0004" card.read_aids() - card.select_adf_by_aid(adf='usim') + + # ensure that MF is selected when we are done. + card._scc.select_file('3f00') return tp, scc, card