laforge has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/43866?usp=email )
Change subject: personalization: SUCI: ff-pad remaining file size
......................................................................
personalization: SUCI: ff-pad remaining file size
Change-Id: I9465eac9269e3f76dddd467109f547489a0feb93
Jenkins: skip-card-test
---
M pySim/esim/saip/personalization.py
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/esim/saip/personalization.py
b/pySim/esim/saip/personalization.py
index 484c7f7..b0dfe0d 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -1334,7 +1334,13 @@
if not f_sucici:
continue
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
+ body = rpad(body, is_size, b'\xff')
+ f_sucici.body = body
pe.file2pe(f_sucici)
@classmethod
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43866?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9465eac9269e3f76dddd467109f547489a0feb93
Gerrit-Change-Number: 43866
Gerrit-PatchSet: 4
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>