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

December 2023

  • 1 participants
  • 1601 discussions
[S] Change in pysim[master]: Add TLV decoder test data
by laforge 23 Dec '23

23 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35442?usp=email ) Change subject: Add TLV decoder test data ...................................................................... Add TLV decoder test data This adds some first test data for the new unitdata driven test cases for the TLV encoder/decoder. It also fixes a bug in the ts_102_221.FileDescriptor decoder for BER-TLV structured files which was found and fixed while introducing the test data. Related: OS#6317 Change-Id: Ief156b7e466a772c78fb632b2fa00cba2eb1eba5 --- M pySim/ts_102_221.py 1 file changed, 36 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/42/35442/1 diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index 67381f3..cb02bd3 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -90,14 +90,24 @@ # ETSI TS 102 221 11.1.1.4.3 class FileDescriptor(BER_TLV_IE, tag=0x82): + _test_decode = [ + # FIXME: this doesn't work as _encode test for some strange reason. + ( '82027921', { "file_descriptor_byte": { "shareable": True, "structure": "ber_tlv" }, "record_len": None, "num_of_rec": None } ), + ] + _test_de_encode = [ + ( '82027821', { "file_descriptor_byte": { "shareable": True, "file_type": "df", "structure": "no_info_given" }, "record_len": None, "num_of_rec": None }), + ( '82024121', { "file_descriptor_byte": { "shareable": True, "file_type": "working_ef", "structure": "transparent" }, "record_len": None, "num_of_rec": None } ), + ( '82054221006e05', { "file_descriptor_byte": { "shareable": True, "file_type": "working_ef", "structure": "linear_fixed" }, "record_len": 110, "num_of_rec": 5 } ), + ] class BerTlvAdapter(Adapter): def _parse(self, obj, context, path): - if obj == 0x39: + data = obj.read() + if data == b'\x01\x01\x01\x00\x00\x01': return 'ber_tlv' raise ValidationError def _build(self, obj, context, path): if obj == 'ber_tlv': - return 0x39 + return b'\x01\x01\x01\x00\x00\x01' raise ValidationError FDB = Select(BitStruct(Const(0, Bit), 'shareable'/Flag, 'structure'/BerTlvAdapter(Const(0x39, BitsInteger(6)))), @@ -200,6 +210,9 @@ # ETSI TS 102 221 11.1.1.4.9 class LifeCycleStatusInteger(BER_TLV_IE, tag=0x8A): + _test_de_encode = [ + ( '8a0105', 'operational_activated' ), + ] def _from_bytes(self, do: bytes): lcsi = int.from_bytes(do, 'big') if lcsi == 0x00: @@ -583,6 +596,10 @@ { "application_label": "USim1" }, { "discretionary_template": h2b("a00c80011781025f608203454150") } ] } ), + ( '61194f10a0000000871004ffffffff890709000050054953696d31', + { "application_template": [ { "application_id": h2b("a0000000871004ffffffff8907090000") }, + { "application_label": "ISim1" } ] } + ), ] class ApplicationLabel(BER_TLV_IE, tag=0x50): # TODO: UCS-2 coding option as per Annex A of TS 102 221 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35442?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: Ief156b7e466a772c78fb632b2fa00cba2eb1eba5 Gerrit-Change-Number: 35442 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: decode security attributes compact field in FCP
by laforge 23 Dec '23

23 Dec '23
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35363?usp=email ) The change is no longer submittable: Code-Review is unsatisfied now. Change subject: decode security attributes compact field in FCP ...................................................................... Patch Set 6: -Code-Review -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35363?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: Iaa1167349027222e69a561d20a4c595fba2fdd2b Gerrit-Change-Number: 35363 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 23 Dec 2023 13:24:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: decode security attributes compact field in FCP
by laforge 23 Dec '23

23 Dec '23
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35363?usp=email ) Change subject: decode security attributes compact field in FCP ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35363?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: Iaa1167349027222e69a561d20a4c595fba2fdd2b Gerrit-Change-Number: 35363 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 23 Dec 2023 11:21:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: decode security attributes compact field in FCP
by laforge 23 Dec '23

23 Dec '23
Attention is currently required from: dexter, fixeria, laforge. laforge has uploaded a new patch set (#6) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/pysim/+/35363?usp=email ) The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: decode security attributes compact field in FCP ...................................................................... decode security attributes compact field in FCP When we select files, we currently display the security attributes compact field as raw bytes only. Let's decode this field using construct so that it gets displayed in human readable form. Change-Id: Iaa1167349027222e69a561d20a4c595fba2fdd2b Related: OS#6211 --- M pySim/ts_102_221.py 1 file changed, 44 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/35363/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35363?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: Iaa1167349027222e69a561d20a4c595fba2fdd2b Gerrit-Change-Number: 35363 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: filsystem: use pySim.utils.build_construct()
by laforge 23 Dec '23

23 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35439?usp=email ) Change subject: filsystem: use pySim.utils.build_construct() ...................................................................... filsystem: use pySim.utils.build_construct() We recently introduced a pySim.utils.build_construct() wrapper around the raw call of the construct.build() method. So far, this wrapper was only used from pySim.tlv, but let's also use it from pySim.filesystem. Basically, whenever we use parse_construct(), we should use build_construct() as the inverse operation. Change-Id: Ibfd61cd87edc72882aa66d6ff17861a3e918affb --- M pySim/filesystem.py M pySim/sysmocom_sja2.py 2 files changed, 26 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/39/35439/1 diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 0e72921..438e969 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -39,7 +39,7 @@ from smartcard.util import toBytes from pySim.utils import sw_match, h2b, b2h, i2h, is_hex, auto_int, bertlv_parse_one, Hexstr -from pySim.construct import filter_dict, parse_construct +from pySim.construct import filter_dict, parse_construct, build_construct from pySim.exceptions import * from pySim.jsonpath import js_path_find, js_path_modify from pySim.commands import SimCardCommands @@ -749,7 +749,7 @@ if callable(method): return h2b(method(abstract_data)) if self._construct: - return self._construct.build(abstract_data) + return build_construct(self._construct, abstract_data) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -777,7 +777,7 @@ raw_bin_data = method(abstract_data) return b2h(raw_bin_data) if self._construct: - return b2h(self._construct.build(abstract_data)) + return b2h(build_construct(self._construct, abstract_data)) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -1025,7 +1025,7 @@ raw_bin_data = method(abstract_data, record_nr=record_nr) return b2h(raw_bin_data) if self._construct: - return b2h(self._construct.build(abstract_data)) + return b2h(build_construct(self._construct, abstract_data)) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -1053,7 +1053,7 @@ if callable(method): return h2b(method(abstract_data, record_nr=record_nr)) if self._construct: - return self._construct.build(abstract_data) + return build_construct(self._construct, abstract_data) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -1169,7 +1169,7 @@ if callable(method): return b2h(method(abstract_data)) if self._construct: - return b2h(filter_dict(self._construct.build(abstract_data))) + return b2h(filter_dict(build_construct(self._construct, abstract_data))) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -1196,7 +1196,7 @@ if callable(method): return h2b(method(abstract_data)) if self._construct: - return filter_dict(self._construct.build(abstract_data)) + return filter_dict(build_construct(self._construct, abstract_data)) elif self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py index 8d3750c..a25bece 100644 --- a/pySim/sysmocom_sja2.py +++ b/pySim/sysmocom_sja2.py @@ -237,9 +237,9 @@ def _encode_bin(self, abstract_data: dict) -> bytearray: if abstract_data['cfg']['algorithm'] == 'tuak': - return self._constr_tuak.build(abstract_data) + return build_construct(self._constr_tuak, abstract_data) else: - return self._construct.build(abstract_data) + return build_construct(self._construct, abstract_data) class EF_USIM_AUTH_KEY_2G(TransparentEF): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35439?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: Ibfd61cd87edc72882aa66d6ff17861a3e918affb Gerrit-Change-Number: 35439 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: decode security attributes compact field in FCP
by laforge 23 Dec '23

23 Dec '23
Attention is currently required from: dexter, fixeria, laforge. laforge has uploaded a new patch set (#5) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/pysim/+/35363?usp=email ) The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: decode security attributes compact field in FCP ...................................................................... decode security attributes compact field in FCP When we select files, we currently display the security attributes compact field as raw bytes only. Let's decode this field using construct so that it gets displayed in human readable form. Change-Id: Iaa1167349027222e69a561d20a4c595fba2fdd2b Related: OS#6211 --- M pySim/ts_102_221.py 1 file changed, 44 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/35363/5 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35363?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: Iaa1167349027222e69a561d20a4c595fba2fdd2b Gerrit-Change-Number: 35363 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: extend documentation about transports
by laforge 23 Dec '23

23 Dec '23
laforge has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/35388?usp=email ) Change subject: extend documentation about transports ...................................................................... Abandoned obsoleted by I8807bfb11f43b167f1321d556e09ec5234fff629 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35388?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: I84d926b45c97477e77a7852bc8254ce9a7614a33 Gerrit-Change-Number: 35388 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[S] Change in pysim[master]: pySim-trace_test.sh: Force termcolor to suppress color generation
by laforge 23 Dec '23

23 Dec '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/35438?usp=email ) Change subject: pySim-trace_test.sh: Force termcolor to suppress color generation ...................................................................... pySim-trace_test.sh: Force termcolor to suppress color generation on some systems, the output would otherwise contain colored status words, which in turn mean the test otuput no longer matches the expected output. Change-Id: Icb700f6e85a285748e00367a398975aa5e75dec5 --- M tests/pySim-trace_test.sh 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/pySim-trace_test.sh b/tests/pySim-trace_test.sh index f7b97e8..3e200c3 100755 --- a/tests/pySim-trace_test.sh +++ b/tests/pySim-trace_test.sh @@ -25,6 +25,8 @@ TEMPFILE=temp.tmp export PYSIM_INTEGRATION_TEST=1 +# to avoid termcolor.colored generating colors; https://github.com/termcolor/termcolor +export ANSI_COLORS_DISABLED=1 echo "pySim-trace_test - a test program to test pySim-trace.py" echo "========================================================" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35438?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: Icb700f6e85a285748e00367a398975aa5e75dec5 Gerrit-Change-Number: 35438 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in pysim[master]: pySim-trace_test.sh: Force termcolor to suppress color generation
by laforge 23 Dec '23

23 Dec '23
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/35438?usp=email ) Change subject: pySim-trace_test.sh: Force termcolor to suppress color generation ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35438?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: Icb700f6e85a285748e00367a398975aa5e75dec5 Gerrit-Change-Number: 35438 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sat, 23 Dec 2023 10:08:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim-trace_test.sh: Force termcolor to suppress color generation
by laforge 23 Dec '23

23 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35438?usp=email ) Change subject: pySim-trace_test.sh: Force termcolor to suppress color generation ...................................................................... pySim-trace_test.sh: Force termcolor to suppress color generation on some systems, the output would otherwise contain colored status words, which in turn mean the test otuput no longer matches the expected output. Change-Id: Icb700f6e85a285748e00367a398975aa5e75dec5 --- M tests/pySim-trace_test.sh 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/38/35438/1 diff --git a/tests/pySim-trace_test.sh b/tests/pySim-trace_test.sh index f7b97e8..3e200c3 100755 --- a/tests/pySim-trace_test.sh +++ b/tests/pySim-trace_test.sh @@ -25,6 +25,8 @@ TEMPFILE=temp.tmp export PYSIM_INTEGRATION_TEST=1 +# to avoid termcolor.colored generating colors; https://github.com/termcolor/termcolor +export ANSI_COLORS_DISABLED=1 echo "pySim-trace_test - a test program to test pySim-trace.py" echo "========================================================" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35438?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: Icb700f6e85a285748e00367a398975aa5e75dec5 Gerrit-Change-Number: 35438 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.