mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-08-07 04:13:11 +03:00
saip/personalization: add EuiccMandatoryServiceParam for 3 services
Even though the eUICC-Mandatory-services are always set by saip.PES.rebuild_mandatory_services(), these new params are useful to audit and validate the values as present in a given DER. Change-Id: Icddeb2488c4a024c6ee5afcc1b6c8cc0e436c43c
This commit is contained in:
@@ -1517,8 +1517,11 @@ class ProfileElementHeader(ProfileElement):
|
||||
def mandatory_service_add(self, service_name):
|
||||
self.decoded['eUICC-Mandatory-services'][service_name] = None
|
||||
|
||||
def mandatory_service_present(self, service_name):
|
||||
return service_name in self.decoded['eUICC-Mandatory-services'].keys()
|
||||
|
||||
def mandatory_service_remove(self, service_name):
|
||||
if service_name in self.decoded['eUICC-Mandatory-services'].keys():
|
||||
if self.mandatory_service_present(service_name):
|
||||
del self.decoded['eUICC-Mandatory-services'][service_name]
|
||||
else:
|
||||
raise ValueError("service not in eUICC-Mandatory-services list, cannot remove")
|
||||
|
||||
Reference in New Issue
Block a user