laforge submitted this change.

View Change

Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified dexter: Looks good to me, approved
personalization: EF_SMSP: keep same length as found in template

Leave the decision for the record length to the template: callers can
can modify the value in the template without having to patch this code.

Change-Id: Id24752101ae82c4986209f4103cc9cbdcce8ce1d
Jenkins: skip-card-test
---
M pySim/esim/saip/personalization.py
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 6f88d52..a136aa8 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -635,13 +635,14 @@
# - To generate the right amount of fillFileContent, pass total_len=42 to encode_record_bin().
# - To show the right size in the PES, set f_smsp.rec_len = 42
ef_smsp_dec['alpha_id'] = ''
- f_smsp.rec_len = 42
+
+ # we can set this to choose a fixed length:
+ # f_smsp.rec_len = 42
+ # but leave rec_len unchanged to keep the same length as was found in the eSIM template.

# re-encode into the File body.
- #
- #print("SMSP (new): %s" % f_smsp.body)
- # re-generate the pe.decoded member from the File instance
f_smsp.body = ef_smsp.encode_record_bin(ef_smsp_dec, 1, total_len=f_smsp.rec_len)
+ # re-generate the pe.decoded member from the File instance
pe.file2pe(f_smsp)

@classmethod

To view, visit change 43515. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id24752101ae82c4986209f4103cc9cbdcce8ce1d
Gerrit-Change-Number: 43515
Gerrit-PatchSet: 5
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>