mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-31 09:24:48 +03:00
pySim.esim.saip: Add subcasses for EAP, DF.SNPN and DF.5G_ProSe
Change-Id: I8f29e72d387c66c99ceccffc9de23a68fd15dc46
This commit is contained in:
@@ -300,9 +300,11 @@ class ProfileElement:
|
|||||||
'gsm-access': ProfileElementGsmAccess,
|
'gsm-access': ProfileElementGsmAccess,
|
||||||
# TODO: csim
|
# TODO: csim
|
||||||
# TODO: opt-csim
|
# TODO: opt-csim
|
||||||
# TODO: eap
|
'eap': ProfileElementEAP,
|
||||||
'df-5gs': ProfileElementDf5GS,
|
'df-5gs': ProfileElementDf5GS,
|
||||||
'df-saip': ProfileElementDfSAIP,
|
'df-saip': ProfileElementDfSAIP,
|
||||||
|
'df-snpn': ProfileElementDfSNPN,
|
||||||
|
'df-5gprose': ProfileElementDf5GProSe,
|
||||||
}
|
}
|
||||||
if pe_type in class4petype:
|
if pe_type in class4petype:
|
||||||
return class4petype[pe_type]
|
return class4petype[pe_type]
|
||||||
@@ -553,6 +555,18 @@ class ProfileElementDf5GS(FsProfileElement):
|
|||||||
for fname in ['df-5gs']:
|
for fname in ['df-5gs']:
|
||||||
self.decoded[fname] = []
|
self.decoded[fname] = []
|
||||||
|
|
||||||
|
class ProfileElementEAP(FsProfileElement):
|
||||||
|
type = 'eap'
|
||||||
|
|
||||||
|
def __init__(self, decoded: Optional[dict] = None):
|
||||||
|
super().__init__(decoded)
|
||||||
|
if decoded:
|
||||||
|
return
|
||||||
|
# provide some reasonable defaults
|
||||||
|
self.decoded['templateID'] = str(oid.DF_EAP)
|
||||||
|
for fname in ['df-eap', 'ef-eapstatus']:
|
||||||
|
self.decoded[fname] = []
|
||||||
|
|
||||||
class ProfileElementDfSAIP(FsProfileElement):
|
class ProfileElementDfSAIP(FsProfileElement):
|
||||||
type = 'df-saip'
|
type = 'df-saip'
|
||||||
|
|
||||||
@@ -565,6 +579,30 @@ class ProfileElementDfSAIP(FsProfileElement):
|
|||||||
for fname in ['df-saip']:
|
for fname in ['df-saip']:
|
||||||
self.decoded[fname] = []
|
self.decoded[fname] = []
|
||||||
|
|
||||||
|
class ProfileElementDfSNPN(FsProfileElement):
|
||||||
|
type = 'df-snpn'
|
||||||
|
|
||||||
|
def __init__(self, decoded: Optional[dict] = None):
|
||||||
|
super().__init__(decoded)
|
||||||
|
if decoded:
|
||||||
|
return
|
||||||
|
# provide some reasonable defaults
|
||||||
|
self.decoded['templateID'] = str(oid.DF_SNPN)
|
||||||
|
for fname in ['df-snpn']:
|
||||||
|
self.decoded[fname] = []
|
||||||
|
|
||||||
|
class ProfileElementDf5GProSe(FsProfileElement):
|
||||||
|
type = 'df-5gprose'
|
||||||
|
|
||||||
|
def __init__(self, decoded: Optional[dict] = None):
|
||||||
|
super().__init__(decoded)
|
||||||
|
if decoded:
|
||||||
|
return
|
||||||
|
# provide some reasonable defaults
|
||||||
|
self.decoded['templateID'] = str(oid.DF_5GProSe)
|
||||||
|
for fname in ['df-df-5g-prose']:
|
||||||
|
self.decoded[fname] = []
|
||||||
|
|
||||||
|
|
||||||
class SecurityDomainKeyComponent:
|
class SecurityDomainKeyComponent:
|
||||||
"""Representation of a key-component of a key for a security domain."""
|
"""Representation of a key-component of a key for a security domain."""
|
||||||
|
|||||||
Reference in New Issue
Block a user