mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
pySim.app: Attempt to retrieve the EID of a SGP.22 / SGP.32 eUICC
... and populate the RuntimeState.identity['EID'] wit it, so other [future] parts of the system can use it. Let's also print the EID (if available) from the 'cardinfo' shell command. Change-Id: Idc2ea1d9263f39b3dff403e1535a5e6c4e88b26f
This commit is contained in:
@@ -345,6 +345,13 @@ class CardApplicationISDR(pySim.global_platform.CardApplicationSD):
|
||||
else:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def get_eid(scc: SimCardCommands) -> str:
|
||||
ged_cmd = GetEuiccData(children=[TagList(decoded=[0x5A])])
|
||||
ged = CardApplicationISDR.store_data_tlv(scc, ged_cmd, GetEuiccData)
|
||||
d = ged.to_dict()
|
||||
return flatten_dict_lists(d['get_euicc_data'])['eid_value']
|
||||
|
||||
def decode_select_response(self, data_hex: Hexstr) -> object:
|
||||
t = FciTemplate()
|
||||
t.from_tlv(h2b(data_hex))
|
||||
|
||||
Reference in New Issue
Block a user