pySim.esim.saip: Don't try to generate file contents for MF/DF/ADF

only EFs have data content

Change-Id: I02a54a3b2f73a0e9118db87f8b514d1dbf53971f
This commit is contained in:
Harald Welte
2024-09-01 18:44:20 +02:00
parent d8c45dc07e
commit 167d6aca36

View File

@@ -441,6 +441,8 @@ class File:
into the asn.1 encoder. If optimize is True, it will try to encode only the differences from the into the asn.1 encoder. If optimize is True, it will try to encode only the differences from the
fillFileContent of the profile template. Otherwise, the entire file contents will be encoded fillFileContent of the profile template. Otherwise, the entire file contents will be encoded
as-is.""" as-is."""
if not self.file_type in ['TR', 'LF', 'CY', 'BT']:
return []
if not optimize: if not optimize:
# simplistic approach: encode the full file, ignoring the template/default # simplistic approach: encode the full file, ignoring the template/default
return [('fillFileContent', self.body)] return [('fillFileContent', self.body)]