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
This commit is contained in:
Philipp Maier 2023-08-16 11:31:31 +02:00 committed by laforge
parent a42ee6f99d
commit 71a3fb8b3a
1 changed files with 3 additions and 1 deletions

View File

@ -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