mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-28 08:18:36 +03:00
pySim.esim.saip.validation: Ensure unique PE identification value
Change-Id: I37b9eb4cfb74de79b0493986d976c8a5f8ccd8ea
This commit is contained in:
@@ -95,6 +95,12 @@ class CheckBasicStructure(ProfileConstraintChecker):
|
|||||||
if 'profile-a-p256' in m_svcs and not ('usim' in m_svcs or 'isim' in m_svcs):
|
if 'profile-a-p256' in m_svcs and not ('usim' in m_svcs or 'isim' in m_svcs):
|
||||||
raise ProfileError('profile-a-p256 mandatory, but no usim or isim')
|
raise ProfileError('profile-a-p256 mandatory, but no usim or isim')
|
||||||
|
|
||||||
|
def check_identification_unique(self, pes: ProfileElementSequence):
|
||||||
|
"""Ensure that each PE has a unique identification value."""
|
||||||
|
id_list = [pe.header['identification'] for pe in pes.pe_list if pe.header]
|
||||||
|
if len(id_list) != len(set(id_list)):
|
||||||
|
raise ProfileError('PE identification values are not unique')
|
||||||
|
|
||||||
FileChoiceList = List[Tuple]
|
FileChoiceList = List[Tuple]
|
||||||
|
|
||||||
class FileError(ProfileError):
|
class FileError(ProfileError):
|
||||||
|
|||||||
Reference in New Issue
Block a user