lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2025

  • 1 participants
  • 1086 discussions
[XS] Change in pysim[master]: esim param_source: add is_abstract flag
by neels 05 Aug '25

05 Aug '25
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/+/40206?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: esim param_source: add is_abstract flag ...................................................................... esim param_source: add is_abstract flag Allow omitting some ParamSource subclassed from ParamSource.get_all_implementations(). My previous attempts at automagically detecting abstract classes failed conceptually, and the easiest, most explicit way is already used in ConfigurableParameter: add an is_abstract flag. Prep for Ie7171c152a7b478736f8825050305606b5af5735 Change-Id: Icfccdd0a8ecb5e0e9d22afa490d73c9f1849a64c --- M pySim/esim/saip/param_source.py 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/06/40206/4 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40206?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: Icfccdd0a8ecb5e0e9d22afa490d73c9f1849a64c Gerrit-Change-Number: 40206 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XL] Change in pysim[master]: add test_configurable_parameters.py
by neels 05 Aug '25

05 Aug '25
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/+/40823?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: add test_configurable_parameters.py ...................................................................... add test_configurable_parameters.py Change-Id: Ia55f0d11f8197ca15a948a83a34b3488acf1a0b4 --- M pySim/esim/saip/personalization.py A tests/unittests/smdpp_data A tests/unittests/test_configurable_parameters.py A tests/unittests/xo/test_configurable_parameters 4 files changed, 1,420 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/40823/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40823?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: Ia55f0d11f8197ca15a948a83a34b3488acf1a0b4 Gerrit-Change-Number: 40823 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[L] Change in pysim[master]: personalization: add param_source.py, implement batch personalization
by neels 05 Aug '25

05 Aug '25
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/+/40096?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: personalization: add param_source.py, implement batch personalization ...................................................................... personalization: add param_source.py, implement batch personalization Implement pySim.esim.saip.personalization.BatchPersonalization, generating N eSIM profiles from a preset configuration. Batch parameters can be fed by a constant, incrementing, random or from CSV rows: add pySim.esim.saip.param_source.* classes to feed such input to each of the BatchPersonalization's ConfigurableParameter instances. Related: SYS#6768 Change-Id: I497c60c101ea0eea980e8b1a4b1f36c0eda39002 --- A pySim/esim/saip/param_source.py M pySim/esim/saip/personalization.py 2 files changed, 282 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/96/40096/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40096?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: I497c60c101ea0eea980e8b1a4b1f36c0eda39002 Gerrit-Change-Number: 40096 Gerrit-PatchSet: 6 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: personalization.ConfigurableParameter: fix BytesIO() input
by neels 05 Aug '25

05 Aug '25
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/+/40824?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: personalization.ConfigurableParameter: fix BytesIO() input ...................................................................... personalization.ConfigurableParameter: fix BytesIO() input Change-Id: I0ad160eef9015e76eef10baee7c6b606fe249123 --- M pySim/esim/saip/personalization.py M tests/unittests/test_configurable_parameters.py M tests/unittests/xo/test_configurable_parameters 3 files changed, 193 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/40824/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40824?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: I0ad160eef9015e76eef10baee7c6b606fe249123 Gerrit-Change-Number: 40824 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[L] Change in pysim[master]: personalization: add int as input type for BinaryParameter
by neels 05 Aug '25

05 Aug '25
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/+/40825?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: personalization: add int as input type for BinaryParameter ...................................................................... personalization: add int as input type for BinaryParameter Change-Id: I31d8142cb0847a8b291f8dc614d57cb4734f0190 --- M pySim/esim/saip/personalization.py M tests/unittests/test_configurable_parameters.py M tests/unittests/xo/test_configurable_parameters 3 files changed, 335 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/40825/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40825?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: I31d8142cb0847a8b291f8dc614d57cb4734f0190 Gerrit-Change-Number: 40825 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: param_source: allow plugging a random implementation (for testing)
by neels 05 Aug '25

05 Aug '25
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40827?usp=email ) Change subject: param_source: allow plugging a random implementation (for testing) ...................................................................... param_source: allow plugging a random implementation (for testing) Change-Id: Idce2b18af70c17844d6f09f7704efc869456ac39 --- M pySim/esim/saip/param_source.py 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/40827/1 diff --git a/pySim/esim/saip/param_source.py b/pySim/esim/saip/param_source.py index adda445..aaef68a 100644 --- a/pySim/esim/saip/param_source.py +++ b/pySim/esim/saip/param_source.py @@ -93,7 +93,10 @@ def from_str(cls, s:str): return cls(cls.expand_str(s)) -class RandomDigitSource(InputExpandingParamSource): +class RandomSourceMixin: + random_impl = random # TODO secure random source? + +class RandomDigitSource(InputExpandingParamSource, RandomSourceMixin): 'return a different sequence of random decimal digits each' is_abstract = False name = 'random decimal digits' @@ -115,7 +118,7 @@ self.val_first_last = (first_value, last_value) def get_next(self, csv_row:dict=None): - val = random.randint(*self.val_first_last) # TODO secure random source? + val = self.random_impl.randint(*self.val_first_last) return self.val_to_digit(val) def val_to_digit(self, val:int): @@ -137,7 +140,7 @@ last_value = int(last_str) if last_str is not None else '9' * len(first_str) return cls(num_digits=len(first_str), first_value=first_value, last_value=last_value) -class RandomHexDigitSource(InputExpandingParamSource): +class RandomHexDigitSource(InputExpandingParamSource, RandomSourceMixin): 'return a different sequence of random hexadecimal digits each' is_abstract = False name = 'random hexadecimal digits' @@ -153,7 +156,7 @@ self.num_digits = num_digits def get_next(self, csv_row:dict=None): - val = random.randbytes(self.num_digits // 2) # TODO secure random source? + val = self.random_impl.randbytes(self.num_digits // 2) return b2h(val) @classmethod -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40827?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: Idce2b18af70c17844d6f09f7704efc869456ac39 Gerrit-Change-Number: 40827 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: RandomHexDigitSource: rather return in string format, not bytes
by neels 05 Aug '25

05 Aug '25
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40826?usp=email ) Change subject: RandomHexDigitSource: rather return in string format, not bytes ...................................................................... RandomHexDigitSource: rather return in string format, not bytes Change-Id: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f --- M pySim/esim/saip/param_source.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/40826/1 diff --git a/pySim/esim/saip/param_source.py b/pySim/esim/saip/param_source.py index 8784261..adda445 100644 --- a/pySim/esim/saip/param_source.py +++ b/pySim/esim/saip/param_source.py @@ -20,6 +20,7 @@ import random import re from pySim.utils import all_subclasses_of +from osmocom.utils import b2h class ParamSourceExn(Exception): pass @@ -153,7 +154,7 @@ def get_next(self, csv_row:dict=None): val = random.randbytes(self.num_digits // 2) # TODO secure random source? - return val + return b2h(val) @classmethod def from_str(cls, s:str): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40826?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: I4e86289f6fb72cbd4cf0c90b8b49538cfab69a7f Gerrit-Change-Number: 40826 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: add test_param_src.py
by neels 05 Aug '25

05 Aug '25
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/40828?usp=email ) Change subject: add test_param_src.py ...................................................................... add test_param_src.py Change-Id: I03087b84030fddae98b965e0075d44e04ec6ba5c --- A tests/unittests/test_param_src.py A tests/unittests/xo/test_param_src 2 files changed, 225 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/28/40828/1 diff --git a/tests/unittests/test_param_src.py b/tests/unittests/test_param_src.py new file mode 100755 index 0000000..b6818c1 --- /dev/null +++ b/tests/unittests/test_param_src.py @@ -0,0 +1,216 @@ +#!/usr/bin/env python3 + +# (C) 2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +# +# Author: Neels Hofmeyr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +import sys +import math +from importlib import resources +import unittest +from pySim.esim.saip import param_source + +import xo +update_expected_output = False + +class D: + mandatory = set() + optional = set() + + def __init__(self, **kwargs): + if (set(kwargs.keys()) - set(self.optional)) != set(self.mandatory): + raise RuntimeError(f'{self.__class__.__name__}.__init__():' + f' {set(kwargs.keys())=!r} - {self.optional=!r} != {self.mandatory=!r}') + for k, v in kwargs.items(): + setattr(self, k, v) + for k in self.optional: + if not hasattr(self, k): + setattr(self, k, None) + +decimals = '0123456789' +hexadecimals = '0123456789abcdefABCDEF' + +class FakeRandom: + vals = b'\xab\xcfm\xf0\x98J_\xcf\x96\x87fp5l\xe7f\xd1\xd6\x97\xc1\xf9]\x8c\x86+\xdb\t^ke\xc1r' + i = 0 + + @classmethod + def next(cls): + cls.i = (cls.i + 1) % len(cls.vals) + return cls.vals[cls.i] + + @staticmethod + def randint(a, b): + d = b - a + n_bytes = math.ceil(math.log(d, 2)) + r = int.from_bytes( bytes(FakeRandom.next() for i in range(n_bytes)) ) + return a + (r % (b - a)) + + @staticmethod + def randbytes(n): + return bytes(FakeRandom.next() for i in range(n)) + + +class ParamSourceTest(unittest.TestCase): + + def test_param_source(self): + + class ParamSourceTest(D): + mandatory = ( + 'param_source', + 'n', + 'expect', + ) + optional = ( + 'expect_arg', + 'csv_rows', + ) + + def expect_const(t, vals): + return tuple(t.expect_arg) == tuple(vals) + + def expect_random(t, vals): + chars = t.expect_arg.get('digits') + repetitions = (t.n - len(set(vals))) + if repetitions: + raise RuntimeError(f'expect_random: there are {repetitions} repetitions in the returned values: {vals}') + for val_i in range(len(vals)): + v = vals[val_i] + val_minlen = t.expect_arg.get('val_minlen') + val_maxlen = t.expect_arg.get('val_maxlen') + if len(v) < val_minlen or len(v) > val_maxlen: + raise RuntimeError(f'expect_random: invalid length {len(v)} for value [{val_i}]: {v!r}, expecting' + f' {val_minlen}..{val_maxlen}') + + if chars is not None and not all(c in chars for c in v): + raise RuntimeError(f'expect_random: invalid char in value [{val_i}]: {v!r}') + return True + + param_source_tests = [ + ParamSourceTest(param_source=param_source.ConstantSource.from_str('123'), + n=3, + expect=expect_const, + expect_arg=('123', '123', '123') + ), + ParamSourceTest(param_source=param_source.RandomDigitSource.from_str('12345'), + n=3, + expect=expect_random, + expect_arg={'digits': decimals, + 'val_minlen': 5, + 'val_maxlen': 5, + }, + ), + ParamSourceTest(param_source=param_source.RandomDigitSource.from_str('1..999'), + n=10, + expect=expect_random, + expect_arg={'digits': decimals, + 'val_minlen': 1, + 'val_maxlen': 3, + }, + ), + ParamSourceTest(param_source=param_source.RandomDigitSource.from_str('001..999'), + n=10, + expect=expect_random, + expect_arg={'digits': decimals, + 'val_minlen': 3, + 'val_maxlen': 3, + }, + ), + ParamSourceTest(param_source=param_source.RandomHexDigitSource.from_str('12345678'), + n=3, + expect=expect_random, + expect_arg={'digits': hexadecimals, + 'val_minlen': 8, + 'val_maxlen': 8, + }, + ), + ParamSourceTest(param_source=param_source.RandomHexDigitSource.from_str('0*8'), + n=3, + expect=expect_random, + expect_arg={'digits': hexadecimals, + 'val_minlen': 8, + 'val_maxlen': 8, + }, + ), + ParamSourceTest(param_source=param_source.RandomHexDigitSource.from_str('00*4'), + n=3, + expect=expect_random, + expect_arg={'digits': hexadecimals, + 'val_minlen': 8, + 'val_maxlen': 8, + }, + ), + ParamSourceTest(param_source=param_source.IncDigitSource.from_str('10001'), + n=3, + expect=expect_const, + expect_arg=('10001', '10002', '10003') + ), + ParamSourceTest(param_source=param_source.CsvSource('column_name'), + n=3, + expect=expect_const, + expect_arg=('first val', 'second val', 'third val'), + csv_rows=( + {'column_name': 'first val',}, + {'column_name': 'second val',}, + {'column_name': 'third val',}, + ) + ), + ] + + outputs = [] + + for t in param_source_tests: + try: + if hasattr(t.param_source, 'random_impl'): + t.param_source.random_impl = FakeRandom + + vals = [] + for i in range(t.n): + csv_row = None + if t.csv_rows is not None: + csv_row = t.csv_rows[i] + vals.append( t.param_source.get_next(csv_row=csv_row) ) + if not t.expect(t, vals): + raise RuntimeError(f'invalid values returned: returned {vals}') + output = f'ok: {t.param_source.__class__.__name__} {vals=!r}' + outputs.append(output) + print(output) + except RuntimeError as e: + raise RuntimeError(f'{t.param_source.__class__.__name__} {t.n=} {t.expect.__name__}({t.expect_arg!r}): {e}') from e + + output = '\n'.join(outputs) + '\n' + xo_name = 'test_param_src' + if update_expected_output: + with resources.path(xo, xo_name) as xo_path: + with open(xo_path, 'w', encoding='utf-8') as f: + f.write(output) + else: + xo_str = resources.read_text(xo, xo_name) + if xo_str != output: + at = 0 + while at < len(output): + if output[at] == xo_str[at]: + at += 1 + continue + break + + raise RuntimeError(f'output differs from expected output at position {at}: {xo_str[at:at+128]!r}') + +if __name__ == "__main__": + if '-u' in sys.argv: + update_expected_output = True + sys.argv.remove('-u') + unittest.main() diff --git a/tests/unittests/xo/test_param_src b/tests/unittests/xo/test_param_src new file mode 100644 index 0000000..d4a947c --- /dev/null +++ b/tests/unittests/xo/test_param_src @@ -0,0 +1,9 @@ +ok: ConstantSource vals=['123', '123', '123'] +ok: RandomDigitSource vals=['13987', '49298', '55670'] +ok: RandomDigitSource vals=['650', '580', '49', '885', '497', '195', '320', '137', '245', '663'] +ok: RandomDigitSource vals=['638', '025', '232', '779', '826', '972', '650', '580', '049', '885'] +ok: RandomHexDigitSource vals=['6b65c172', 'abcf6df0', '984a5fcf'] +ok: RandomHexDigitSource vals=['96876670', '356ce766', 'd1d697c1'] +ok: RandomHexDigitSource vals=['f95d8c86', '2bdb095e', '6b65c172'] +ok: IncDigitSource vals=['10001', '10002', '10003'] +ok: CsvSource vals=['first val', 'second val', 'third val'] -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40828?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: I03087b84030fddae98b965e0075d44e04ec6ba5c Gerrit-Change-Number: 40828 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: personalization: set default values
by neels 04 Aug '25

04 Aug '25
Attention is currently required from: laforge. neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40094?usp=email ) Change subject: personalization: set default values ...................................................................... Patch Set 4: (6 comments) Commit Message: https://gerrit.osmocom.org/c/pysim/+/40094/comment/7d871308_60acd266?usp=em… : PS2, Line 11: This is useful for user interaction, to prefill an input field that : indicates a valid input to modify to taste. > I beg to differ. […] I think it looks odd in this patch because i later on separated the patch from the ParamSource patch. The defaults make more sense when you realize that, in practice, they mostly indicate the lengths for automatically generated digits. For example, for Pin1 + RandomDigitSource, the user input is just '0000' to get a four digit random PIN, or '000000' to get a six digit pin. A default value makes sense to indicate the input format to the user. Indicating IMSI as '0010100000000000' + IncrementingDigitSource: it is obvious that it is not a usual IMSI that I entered, and it greatly clarifies what to enter to get a useful result. A default value can make sense to indicate the most secure / most likely option, like suggesting the longest allowed (random) key length, or choosing Milenage by default. If I remove all defaults from sysmo-esim-mgr, then a user as to manually enter digits for all of K. Opc, Pin, Adm, all SdKeys before generating is possible. It is infinitely more helpful to have a default of e.g. '0*16'+RandomDigitSource set for K, so users don't have to look it up. Note, assigning a default value is not actually done in pysim, it is merely up to a caller to use the default value paired with a param source. code wise, it is very useful to place the info here, not in the caller. File pySim/esim/saip/personalization.py: https://gerrit.osmocom.org/c/pysim/+/40094/comment/64b7939f_cdedf895?usp=em… : PS2, Line 278: default_value > there's no point of an all-zero default ICCID. that's true, it's a copy paste artifact from the random parameters... in the esim mgr, we never let a user enter an ICCID so i never noticed. I think it's still the most useful indicator for number of digits, if anyone ever used it. We can set an empty default... but why drop the informational example? https://gerrit.osmocom.org/c/pysim/+/40094/comment/22716676_d37c6a14?usp=em… : PS2, Line 299: > I also think there's no point in having a default for the IMSI I explained my IMSI point above, let's continue the discussion there https://gerrit.osmocom.org/c/pysim/+/40094/comment/3e590015_d58515a1?usp=em… : PS2, Line 467: default_value = '0' * allow_len > I'm not sure why any security key / pin should have any default value at all. […] I made the point above: it goes with a RandomDigitSource, let's continue the discussion there https://gerrit.osmocom.org/c/pysim/+/40094/comment/faf7649c_757c13aa?usp=em… : PS2, Line 494: default_value = '0' * max_len > same here Done https://gerrit.osmocom.org/c/pysim/+/40094/comment/a75bdfec_0b31fbde?usp=em… : PS2, Line 582: default_value = '00' * allow_len > no cryptographic key should have any default value. It's just creating security nightmares. I made the point above: it is just a length indicator for a RandomDigitSource. Let's continue the discussion there -- 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: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03 Gerrit-Change-Number: 40094 Gerrit-PatchSet: 4 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> Gerrit-Comment-Date: Mon, 04 Aug 2025 17:27:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: personalization: implement reading back values from a PES
by neels 04 Aug '25

04 Aug '25
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/+/40198?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: 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, 122 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/40198/3 -- 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: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • ...
  • 109
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.