laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/36028?usp=email )

Change subject: saip.personalization: Fix encoding of ICCID in ProfileHeader
......................................................................

saip.personalization: Fix encoding of ICCID in ProfileHeader

To make things exciting, they decided that the ICCID in the profile
header is encoded different from the ICCID contained in EF.ICCID...

Change-Id: I5eacdcdc6bd0ada431eb047bfae930d79d6e3af8
---
M pySim/esim/saip/personalization.py
1 file changed, 13 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 3dad208..dc3435b 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -77,7 +77,7 @@

     def apply(self, pes: ProfileElementSequence):
         # patch the header
-        pes.get_pe_for_type('header').decoded['iccid'] = self.value
+        pes.get_pe_for_type('header').decoded['iccid'] = h2b(rpad(self.value, 
20))
         # patch MF/EF.ICCID
         file_replace_content(pes.get_pe_for_type('mf').decoded['ef-iccid'], 
h2b(enc_iccid(self.value)))


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36028?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5eacdcdc6bd0ada431eb047bfae930d79d6e3af8
Gerrit-Change-Number: 36028
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-MessageType: merged

Reply via email to