pySim.euicc: Add 'get_data sgp02_eid' in ADF.ECASD of M2M eUICC
The M2M eUICC are completely different from the consumer/IoT eUICC. Obtaining the EID works via GET DATA in the ECASD. Let's add support for that. Change-Id: I6cca6f75d268229244c90b3f1f88e26c89a2b4e0
This commit is contained in:
@@ -35,6 +35,13 @@ from pySim.utils import Hexstr, SwHexstr, SwMatchstr
|
||||
from pySim.commands import SimCardCommands
|
||||
import pySim.global_platform
|
||||
|
||||
# SGP.02 Section 2.2.2
|
||||
class Sgp02Eid(BER_TLV_IE, tag=0x5a):
|
||||
_construct = BcdAdapter(GreedyBytes)
|
||||
|
||||
# patch this into global_platform, to allow 'get_data sgp02_eid' in EF.ECASD
|
||||
pySim.global_platform.DataCollection.possible_nested.append(Sgp02Eid)
|
||||
|
||||
def compute_eid_checksum(eid) -> str:
|
||||
"""Compute and add/replace check digits of an EID value according to GSMA SGP.29 Section 10."""
|
||||
if isinstance(eid, str):
|
||||
|
||||
Reference in New Issue
Block a user