mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-06-12 16:46:09 +03:00
personalization: SUCI: ff-pad remaining file size
Change-Id: I9465eac9269e3f76dddd467109f547489a0feb93
This commit is contained in:
@@ -1344,7 +1344,15 @@ class SuciCalcInfoParameter(ConfigurableParameter):
|
|||||||
if not f_sucici:
|
if not f_sucici:
|
||||||
continue
|
continue
|
||||||
ef_sucici = EF_SUCI_Calc_Info()
|
ef_sucici = EF_SUCI_Calc_Info()
|
||||||
f_sucici.body = ef_sucici.encode_bin(val)
|
body = ef_sucici.encode_bin(val)
|
||||||
|
|
||||||
|
# 0xff pad up to the existing file size, so that the underlying template doesn't come through
|
||||||
|
is_size = f_sucici.file_size
|
||||||
|
pad_n = is_size - len(body)
|
||||||
|
if pad_n > 0:
|
||||||
|
body = body + b'\xff' * pad_n
|
||||||
|
|
||||||
|
f_sucici.body = body
|
||||||
pe.file2pe(f_sucici)
|
pe.file2pe(f_sucici)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user