laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/36025?usp=email )
Change subject: osmo-smdpp: Get rid of hard-coded ICCID
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36025?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: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:28:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: lynxis lazus, pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email )
Change subject: debian: Fixes in systemd service
......................................................................
Patch Set 1:
(1 comment)
File contrib/systemd/osmo-epdg.service:
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022/comment/77748ffc_5a5d…
PS1, Line 10: Environment="ERL_FLAGS=-config /etc/osmocom/osmo-epdg/osmo-epdg.config"
* Other configs are in /etc/osmocom without subdir, e.g. /etc/osmocom/osmo-msc.cfg.
Maybe do that here as well for consistency?
* Other config files end in .cfg instead of .config... maybe do that too? Though I realize that it is a completely different format.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36022?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: Icd640d517b33a840d73aaabef9c594541848357a
Gerrit-Change-Number: 36022
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 21 Feb 2024 08:25:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/36016?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: saip.personalization: differentiate input_value from value
......................................................................
saip.personalization: differentiate input_value from value
When personalizing e.g. the ICCID, the input_value is the raw
incrementing counter. From that, we calculate the Luhn check digit,
and that "output" value is what we'll put in to the EF.ICCID specific
encoder.
However, we also store that output value in the instance in order
to generate the output CSV file containig the card-specific
personalization data.
Change-Id: Idfcd26c8ca9d73a9c2955f7c97e711dd59a27c4e
---
M pySim/esim/saip/personalization.py
1 file changed, 50 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/16/36016/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36016?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: Idfcd26c8ca9d73a9c2955f7c97e711dd59a27c4e
Gerrit-Change-Number: 36016
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/36027?usp=email )
Change subject: saip.personalization: automatically compute class 'name' attribute
......................................................................
saip.personalization: automatically compute class 'name' attribute
We can use the metaclass to set a proper non-camel-case name attribute.
Change-Id: If02df436c8f5ce01d21e9ee077ad3736e669d103
---
M pySim/esim/saip/personalization.py
1 file changed, 13 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/36027/1
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 7ac0dbd..3dad208 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -19,6 +19,7 @@
import io
from typing import List, Tuple
+from pySim.tlv import camel_to_snake
from pySim.utils import enc_iccid, enc_imsi, h2b, rpad, sanitize_iccid
from pySim.esim.saip import ProfileElement, ProfileElementSequence
@@ -41,6 +42,7 @@
x = super().__new__(metacls, name, bases, namespace)
for k, v in kwargs.items():
setattr(x, k, v)
+ setattr(x, 'name', camel_to_snake(name))
return x
class ConfigurableParameter(abc.ABC, metaclass=ClassVarMeta):
@@ -63,7 +65,6 @@
class Iccid(ConfigurableParameter):
"""Configurable ICCID. Expects the value to be a string of decimal digits.
If the string of digits is only 18 digits long, a Luhn check digit will be added."""
- name = 'iccid'
def validate(self):
# convert to string as it migt be an integer
@@ -83,7 +84,6 @@
class Imsi(ConfigurableParameter):
"""Configurable IMSI. Expects value to be a string of digits. Automatically sets the ACC to
the last digit of the IMSI."""
- name = 'imsi'
def validate(self):
# convert to string as it migt be an integer
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36027?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: If02df436c8f5ce01d21e9ee077ad3736e669d103
Gerrit-Change-Number: 36027
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/28/36028/1
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 <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/36026?usp=email )
Change subject: osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs
......................................................................
osmo-smdpp: Add TS.48 profiles modified for unique ICCIDs
The original TS.48 profiles have shared/overlapping ICCIDs meaning you
can always install one of them on a given eUICC. Let's add a set of
modified TS.48 profiles so you can install any number of them in
parallel on a single eUICC, switching between them via your LPA.
Change-Id: Id5019b290db1ee90ae1c72b312f08bf3184908ea
---
A smdpp-data/upp/TS48V1-A-UNIQUE.der
A smdpp-data/upp/TS48V1-B-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
A smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der
A smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der
18 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/36026/1
diff --git a/smdpp-data/upp/TS48V1-A-UNIQUE.der b/smdpp-data/upp/TS48V1-A-UNIQUE.der
new file mode 100644
index 0000000..18559be
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-A-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V1-B-UNIQUE.der b/smdpp-data/upp/TS48V1-B-UNIQUE.der
new file mode 100644
index 0000000..24ffb8d
--- /dev/null
+++ b/smdpp-data/upp/TS48V1-B-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 0000000..657a48e
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..3eba990
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 0000000..4c8d7f2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..52999e2
--- /dev/null
+++ b/smdpp-data/upp/TS48V2-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
new file mode 100644
index 0000000..700edb5
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..ab731ad
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-1-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 0000000..e340003
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..59bfe56
--- /dev/null
+++ b/smdpp-data/upp/TS48V3-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..e8ac2c2
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1A-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..8cd3a31
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-1B-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
new file mode 100644
index 0000000..4c8433a
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-3-BERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..8a08988
--- /dev/null
+++ b/smdpp-data/upp/TS48V4-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..2a91ef6
--- /dev/null
+++ b/smdpp-data/upp/TS48V5-SAIP2-1A-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..747cead
--- /dev/null
+++ b/smdpp-data/upp/TS48V5-SAIP2-1B-NOBERTLV-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der b/smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der
new file mode 100644
index 0000000..d7cbeeb
--- /dev/null
+++ b/smdpp-data/upp/TS48V5-SAIP2-3-BERTLV-SUCI-UNIQUE.der
Binary files differ
diff --git a/smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der b/smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der
new file mode 100644
index 0000000..0276eac
--- /dev/null
+++ b/smdpp-data/upp/TS48V5-SAIP2-3-NOBERTLV-UNIQUE.der
Binary files differ
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36026?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: Id5019b290db1ee90ae1c72b312f08bf3184908ea
Gerrit-Change-Number: 36026
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/36025?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: osmo-smdpp: Get rid of hard-coded ICCID
......................................................................
osmo-smdpp: Get rid of hard-coded ICCID
Read the ICCID from the header of the UPP when building the
ProfileMetdata. This allows the download of profiles with arbitrary ICCID.
Change-Id: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
---
M osmo-smdpp.py
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/36025/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36025?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: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/36025?usp=email )
Change subject: osmo-smdpp: Get rid of hard-coded ICCID
......................................................................
osmo-smdpp: Get rid of hard-coded ICCID
Read the ICCID from the header of the UPP when building the
ProfileMetdata. This allows the download of profiles with arbitrary ICCID.
Change-Id: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
---
M osmo-smdpp.py
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/36025/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 8cb0082..001a00e 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -35,6 +35,7 @@
from pySim.utils import h2b, b2h, swap_nibbles
import pySim.esim.rsp as rsp
+from pySim.esim import saip
from pySim.esim.es8p import *
from pySim.esim.x509_cert import oid, cert_policy_has_oid, cert_get_auth_key_id
from pySim.esim.x509_cert import CertAndPrivkey, CertificateSet, cert_get_subject_key_id, VerifyError
@@ -363,11 +364,14 @@
if not os.path.isfile(path) or not os.access(path, os.R_OK):
raise ApiError('8.2.6', '3.8', 'Refused')
ss.matchingId = matchingId
+ with open(path, 'rb') as f:
+ pes = saip.ProfileElementSequence.from_der(f.read())
+ iccid_str = b2h(pes.get_pe_for_type('header').decoded['iccid'])
# FIXME: we actually want to perform the profile binding herr, and read the profile metadat from the profile
# Put together profileMetadata + _bin
- ss.profileMetadata = ProfileMetadata(iccid_bin= h2b(swap_nibbles('89000123456789012358')), spn="OsmocomSPN", profile_name="OsmocomProfile")
+ ss.profileMetadata = ProfileMetadata(iccid_bin=h2b(swap_nibbles(iccid_str))), spn="OsmocomSPN", profile_name=matchingId)
profileMetadata_bin = ss.profileMetadata.gen_store_metadata_request()
# Put together smdpSigned2 + _bin
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36025?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: I1b9e17f757f9935436828e6dc1ab75ff17d1d1a4
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange