pysim-Shell: Add sysmocom SJA2 card specific bits
Depending on the ATR, we register the various sysmocom SJA2 card
model specific files [or not].
Change-Id: Id410489841bb9020ddbf74de9114d808b1d5adb6
diff --git a/pySim-shell.py b/pySim-shell.py
index f821e41..871c45e 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -42,12 +42,14 @@
from pySim.utils import dec_st, sanitize_pin_adm, tabulate_str_list, is_hex, boxed_heading_str
from pySim.card_handler import CardHandler
-from pySim.filesystem import CardMF, RuntimeState, CardDF, CardADF
+from pySim.filesystem import CardMF, RuntimeState, CardDF, CardADF, CardModel
from pySim.ts_51_011 import CardProfileSIM, DF_TELECOM, DF_GSM
from pySim.ts_102_221 import CardProfileUICC
from pySim.ts_31_102 import CardApplicationUSIM
from pySim.ts_31_103 import CardApplicationISIM
+import pySim.sysmocom_sja2
+
from pySim.card_key_provider import CardKeyProviderCsv, card_key_provider_register, card_key_provider_get_field
def init_card(sl):
@@ -84,6 +86,8 @@
rs.mf.add_file(DF_TELECOM())
rs.mf.add_file(DF_GSM())
+ CardModel.apply_matching_models(scc, rs)
+
# inform the transport that we can do context-specific SW interpretation
sl.set_sw_interpreter(rs)