Attention is currently required from: Timur Davydov, pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41878?usp=email
to look at the new patch set (#9).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: build: keep netns API public and gate features with HAVE_*
......................................................................
build: keep netns API public and gate features with HAVE_*
The netns API was previously guarded by platform-specific preprocessor
conditions (e.g. !EMBEDDED and defined(__linux__)), which caused the
netns headers and implementation to be entirely excluded from non-Linux
builds such as Emscripten. This in turn led to build failures in code
depending on the netns API, as the symbols and declarations were not
available at all.
Always build netns.c and keep the public declarations available
for non-embedded builds. Move platform/feature conditionals into the
implementation: guard the netns code paths with HAVE_SETNS/HAVE_UNSHARE/
HAVE_MOUNT and HAVE_CLONE_NEWNET, and return -ENOSYS when the required
functionality is not available.
Add configure-time checks for the required headers/functions and for the
CLONE_NEWNET declaration, defining the
corresponding HAVE_* macros.
No functional changes intended for platforms where netns is available.
Change-Id: I2322eb2936bea35596f1fd6b6a713ea5f997b1ea
---
M configure.ac
M include/osmocom/core/netns.h
M src/core/netns.c
3 files changed, 35 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/41878/9
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41878?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2322eb2936bea35596f1fd6b6a713ea5f997b1ea
Gerrit-Change-Number: 41878
Gerrit-PatchSet: 9
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41917?usp=email )
Change subject: improve Imsi,Iccid.get_values_from_pes()
......................................................................
improve Imsi,Iccid.get_values_from_pes()
Change-Id: I40c888e81fc3172d5abbd5fc49029e5f7cf720ab
---
M pySim/esim/saip/personalization.py
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/41917/1
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 00b8f49..4b865a2 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -393,9 +393,9 @@
yield iccid
for pe in pes.get_pes_for_type('mf'):
- iccid_pe = pe.decoded.get('ef-iccid', None)
- if iccid_pe:
- yield dec_iccid(b2h(file_tuples_content_as_bytes(iccid_pe)))
+ iccid_f = pe.files.get('ef-iccid', None)
+ if iccid_f is not None:
+ yield dec_iccid(b2h(iccid_f.body))
class Imsi(DecimalParam):
"""Configurable IMSI. Expects value to be a string of digits. Automatically sets the ACC to
@@ -420,9 +420,10 @@
@classmethod
def get_values_from_pes(cls, pes: ProfileElementSequence):
for pe in pes.get_pes_for_type('usim'):
- imsi_pe = pe.decoded.get('ef-imsi', None)
- if imsi_pe:
- yield dec_imsi(b2h(file_tuples_content_as_bytes(imsi_pe)))
+ imsi_f = pe.files.get('ef-imsi', None)
+ acc_f = pe.files.get('ef-acc', None)
+ if imsi_f:
+ yield dec_imsi(b2h(imsi_f.body))
class SmspTpScAddr(ConfigurableParameter):
"""Configurable SMSC (SMS Service Centre) TP-SC-ADDR. Expects to be a phone number in national or
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41917?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I40c888e81fc3172d5abbd5fc49029e5f7cf720ab
Gerrit-Change-Number: 41917
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41920?usp=email )
Change subject: saip SmspTpScAddr: safeguard against decoding error
......................................................................
saip SmspTpScAddr: safeguard against decoding error
Reading the TS48 V6.0 eSIM_GTP_SAIP2.1A_NoBERTLV profile results in an
exception [1] in SmspTpScAddr. I have a caller that needs to skip
erratic values instead of raising.
The underlying issue, I presume, is that either the data needs
validation before decode_record_bin(), or decode_record_bin() needs
well-defined error handling.
So far I know only of this IndexError, so, as a workaround, catch that.
[1]
File "/pysim/pySim/esim/saip/personalization.py", line 617, in get_values_from_pes
ef_smsp_dec = ef_smsp.decode_record_bin(f_smsp.body, 1)
File "/pysim/pySim/filesystem.py", line 1047, in decode_record_bin
return parse_construct(self._construct, raw_bin_data)
File "/application/venv/lib/python3.13/site-packages/osmocom/construct.py", line 550, in parse_construct
parsed = c.parse(raw_bin_data, total_len=length, **context)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 404, in parse
return self.parse_stream(io.BytesIO(data), **contextkw)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 416, in parse_stream
return self._parsereport(stream, context, "(parsing)")
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 428, in _parsereport
obj = self._parse(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 2236, in _parse
subobj = sc._parsereport(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 428, in _parsereport
obj = self._parse(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 2770, in _parse
return self.subcon._parsereport(stream, context, path)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 428, in _parsereport
obj = self._parse(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 2236, in _parse
subobj = sc._parsereport(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 428, in _parsereport
obj = self._parse(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 2770, in _parse
return self.subcon._parsereport(stream, context, path)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 428, in _parsereport
obj = self._parse(stream, context, path)
File "/application/venv/lib/python3.13/site-packages/construct/core.py", line 820, in _parse
return self._decode(obj, context, path)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/application/venv/lib/python3.13/site-packages/osmocom/construct.py", line 268, in _decode
if r[-1] == 'f':
~^^^^
File "/application/venv/lib/python3.13/site-packages/osmocom/utils.py", line 50, in __getitem__
return hexstr(super().__getitem__(val))
~~~~~~~~~~~~~~~~~~~^^^^^
IndexError: string index out of range
Change-Id: Ic436e206776b81f24de126e8ee0ae8bf5f3e8d7a
---
M pySim/esim/saip/personalization.py
1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/20/41920/1
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index 828966c..dcb5fe3 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -608,9 +608,15 @@
@classmethod
def get_values_from_pes(cls, pes: ProfileElementSequence):
for pe in pes.get_pes_for_type('usim'):
- f_smsp = pe.files['ef-smsp']
- ef_smsp = EF_SMSP()
- ef_smsp_dec = ef_smsp.decode_record_bin(f_smsp.body, 1)
+ f_smsp = pe.files.get('ef-smsp', None)
+ if f_smsp is None:
+ continue
+
+ try:
+ ef_smsp = EF_SMSP()
+ ef_smsp_dec = ef_smsp.decode_record_bin(f_smsp.body, 1)
+ except IndexError:
+ continue
tp_sc_addr = ef_smsp_dec.get('tp_sc_addr', None)
if not tp_sc_addr:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41920?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ic436e206776b81f24de126e8ee0ae8bf5f3e8d7a
Gerrit-Change-Number: 41920
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: laforge, neels, pespin.
Hello Jenkins Builder, dexter, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/39742?usp=email
to look at the new patch set (#18).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: personalization: refactor ConfigurableParameter, Iccid, Imsi
......................................................................
personalization: refactor ConfigurableParameter, Iccid, Imsi
Main points/rationales of the refactoring, details below:
1) common validation implementation
2) offer classmethods
The new features are optional, and will be heavily used by batch
personalization patches coming soon.
Implement Iccid and Imsi to use the new way, with a common abstract
DecimalParam implementation.
So far leave the other parameter classes working as they always did, to
follow suit in subsequent commits.
Details:
1) common validation implementation:
There are very common validation steps in the various parameter
implementations. It is more convenient and much more readable to
implement those once and set simple validation parameters per subclass.
So there now is a validate_val() classmethod, which subclasses can use
as-is to apply the validation parameters -- or subclasses can override
their cls.validate_val() for specialized validation.
(Those subclasses that this patch doesn't touch still override the
self.validate() instance method. Hence they still work as before this
patch, but don't use the new common features yet.)
2) offer stateless classmethods:
It is useful for...
- batch processing of multiple profiles (in upcoming patches) and
- user input validation
to be able to have classmethods that do what self.validate() and
self.apply() do, but do not modify any self.* members.
So far the paradigm was to create a class instance to keep state about
the value. This remains available, but in addition we make available the
paradigm of a singleton that is stateless (the classmethods).
Using self.validate() and self.apply() still work the same as before
this patch, i.e. via self.input_value and self.value -- but in addition,
there are now classmethods that don't touch self.* members.
Related: SYS#6768
Change-Id: I6522be4c463e34897ca9bff2309b3706a88b3ce8
---
M pySim/esim/saip/personalization.py
1 file changed, 199 insertions(+), 35 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/42/39742/18
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39742?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6522be4c463e34897ca9bff2309b3706a88b3ce8
Gerrit-Change-Number: 39742
Gerrit-PatchSet: 18
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/pysim/+/41845?usp=email )
Change subject: rather move BatchPersonalization to separate module
......................................................................
rather move BatchPersonalization to separate module
Change-Id: I01ae40a06605eb205bfb409189fcd2b3a128855a
---
A pySim/esim/saip/batch.py
M pySim/esim/saip/personalization.py
2 files changed, 117 insertions(+), 95 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/45/41845/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41845?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I01ae40a06605eb205bfb409189fcd2b3a128855a
Gerrit-Change-Number: 41845
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Attention is currently required from: laforge, neels.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40094?usp=email
to look at the new patch set (#11).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: personalization: set example input values
......................................................................
personalization: set example input values
For all ConfigurableParameter subclasses, provide an example_input.
This may be useful for downstream projects' user interaction, to suggest
a value or prefill an input field, as appropriate.
Related: SYS#6768
Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03
---
M pySim/esim/saip/personalization.py
1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/94/40094/11
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40094?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03
Gerrit-Change-Number: 40094
Gerrit-PatchSet: 11
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40198?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Code-Review-1 by laforge, Verified+1 by Jenkins Builder
Change subject: personalization: implement reading back values from a PES
......................................................................
personalization: implement reading back values from a PES
Implement get_values_from_pes(), the reverse direction of apply_val():
read back and return values from a ProfileElementSequence. Implement for
all ConfigurableParameter subclasses.
Future: SdKey.get_values_from_pes() is reading pe.decoded[], which works
fine, but I07dfc378705eba1318e9e8652796cbde106c6a52 will change this
implementation to use the higher level ProfileElementSD members.
Implementation detail:
Implement get_values_from_pes() as classmethod that returns a generator.
Subclasses should yield all occurences of their parameter in a given
PES.
For example, the ICCID can appear in multiple places.
Iccid.get_values_from_pes() yields all of the individual values. A set()
of the results quickly tells whether the PES is consistent.
Rationales for reading back values:
This allows auditing an eSIM profile, particularly for producing an
output.csv from a batch personalization (that generated lots of random
key material which now needs to be fed to an HLR...).
Reading back from a binary result is more reliable than storing the
values that were fed into a personalization.
By auditing final DER results with this code, I discovered:
- "oh, there already was some key material in my UPP template."
- "all IMSIs ended up the same, forgot to set up the parameter."
- the SdKey.apply() implementations currently don't work, see
I07dfc378705eba1318e9e8652796cbde106c6a52 for a fix.
Change-Id: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463
---
M pySim/esim/saip/personalization.py
1 file changed, 165 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/40198/7
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40198?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463
Gerrit-Change-Number: 40198
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40199?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: personalization: allow reading back multiple values from PES
......................................................................
personalization: allow reading back multiple values from PES
Change-Id: Iecb68af7c216c6b9dc3add469564416b6f37f7b2
---
M pySim/esim/saip/personalization.py
1 file changed, 24 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/99/40199/7
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40199?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iecb68af7c216c6b9dc3add469564416b6f37f7b2
Gerrit-Change-Number: 40199
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>