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

June 2024

  • 1 participants
  • 1566 discussions
[S] Change in pysim[master]: pySim.tlv: Correctly parse COMPREHENSION-TLV without comprehension bit
by laforge 09 Jun '24

09 Jun '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37137?usp=email ) Change subject: pySim.tlv: Correctly parse COMPREHENSION-TLV without comprehension bit ...................................................................... pySim.tlv: Correctly parse COMPREHENSION-TLV without comprehension bit The uppermost bit of COMPREHENSION-TLV tags indicates whether the recipient is required to "comprehend" that IE or not. So every IE actually has two tag values: one with and one without that bit set. As all our existing TLV definitions of COMPR_TLV_IE have that bit set, let's assume this is the default, but use the same definition also for the situation where that bit is not set. Change-Id: I58d04ec13be0c12d9fb8cb3d5a0480d0defb6c95 --- M pySim/tlv.py 1 file changed, 33 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/37137/1 diff --git a/pySim/tlv.py b/pySim/tlv.py index 8bf43c6..5835d33 100644 --- a/pySim/tlv.py +++ b/pySim/tlv.py @@ -224,12 +224,16 @@ val = self.to_bytes(context=context) return self._encode_tag() + self._encode_len(val) + val + def is_tag_compatible(self, rawtag) -> bool: + """Is the given rawtag compatible with this class?""" + return rawtag == self._compute_tag() + def from_tlv(self, do: bytes, context: dict = {}): if len(do) == 0: return {}, b'' (rawtag, remainder) = self.__class__._parse_tag_raw(do) if rawtag: - if rawtag != self._compute_tag(): + if not self.is_tag_compatible(rawtag): raise ValueError("%s: Encountered tag %s doesn't match our supported tag %s" % (self, rawtag, self.tag)) (length, remainder) = self.__class__._parse_len(remainder) @@ -283,6 +287,15 @@ def _parse_len(cls, do: bytes) -> Tuple[int, bytes]: return bertlv_parse_len(do) + def is_tag_compatible(self, rawtag: int) -> bool: + """Override is_tag_compatible as we need to mask out the + comprehension bit when doing compares.""" + ctag = self._compute_tag() + if ctag > 0xff: + return ctag & 0x7fff == rawtag & 0x7fff + else: + return ctag & 0x7f == rawtag & 0x7f + def _encode_tag(self) -> bytes: return comprehensiontlv_encode_tag(self._compute_tag()) @@ -367,6 +380,8 @@ tag, _r = first._parse_tag_raw(remainder) if tag is None: break + if issubclass(first, COMPR_TLV_IE): + tag = tag | 0x80 # HACK: always assume comprehension if tag in self.members_by_tag: cls = self.members_by_tag[tag] # create an instance and parse accordingly -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37137?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: I58d04ec13be0c12d9fb8cb3d5a0480d0defb6c95 Gerrit-Change-Number: 37137 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: pySim/cat: Fix "Decode the "Type of Comand" from numeric value to a s...
by laforge 09 Jun '24

09 Jun '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37136?usp=email ) Change subject: pySim/cat: Fix "Decode the "Type of Comand" from numeric value to a string" ...................................................................... pySim/cat: Fix "Decode the "Type of Comand" from numeric value to a string" This fixes a bug introduced in Change-Id: I833ec02bf281fe49de2be326018e91f521de52c0 Change-Id: I8b466c123173a5be335df3e1d77ef1c5f717a7d9 --- M pySim/cat.py 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/37136/1 diff --git a/pySim/cat.py b/pySim/cat.py index 875806c..bfd22b4 100644 --- a/pySim/cat.py +++ b/pySim/cat.py @@ -1191,7 +1191,7 @@ pcmd.from_tlv(binary) cmd_details = pcmd.find_cmd_details() # then do a second decode stage for the specific - cmd_type = cmd_details.decoded['type_of_command'] + cmd_type = TypeOfCommand.encmapping[cmd_details.decoded['type_of_command']] if cmd_type in self.members_by_tag: cls = self.members_by_tag[cmd_type] inst = cls() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37136?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: I8b466c123173a5be335df3e1d77ef1c5f717a7d9 Gerrit-Change-Number: 37136 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in pysim[master]: esim.saip: Add ProfileElementSequence.remove_naas_of_type
by laforge 09 Jun '24

09 Jun '24
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37010?usp=email ) Change subject: esim.saip: Add ProfileElementSequence.remove_naas_of_type ...................................................................... Patch Set 3: (2 comments) File pySim/esim/saip/__init__.py: https://gerrit.osmocom.org/c/pysim/+/37010/comment/7d618235_a66276df PS3, Line 562: def remove_naas_of_type(self, naa: Naa) -> None: > maybe it would be useful if this function printed which instances of NAAs it removed? I don't like printing by library functions in general, this kind of code might very well be executed in an environment without a console. In tems of returning: The questions is what should it return? The number of matching NAAs removed would be an idea, but then there are many different items removed at various different locations. Which one should count, and which not? https://gerrit.osmocom.org/c/pysim/+/37010/comment/0cb7572d_08b6127d PS3, Line 573: if template in hdr.decoded['eUICC-Mandatory-GFSTEList']: : hdr.decoded['eUICC-Mandatory-GFSTEList'] = [x for x in hdr.decoded['eUICC-Mandatory-GFSTEList'] if not template.prefix_match(x)] > just to be sure: it cannot be that `template.prefix_match() is True` for any element of `hdr. […] I'm not following you here, sorry. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37010?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: I64438bf0be58bad7a561c3744b7e9b1338a7857c Gerrit-Change-Number: 37010 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sun, 09 Jun 2024 10:15:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in docker-playground[master]: asterisk: extensions.conf: Forward call from VoLTE to all registered ...
by laforge 09 Jun '24

09 Jun '24
Attention is currently required from: Hoernchen, jolly, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email ) Change subject: asterisk: extensions.conf: Forward call from VoLTE to all registered local UAs ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37128?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Id3e14ca660f0aa4ed685a90f527feb8732a83806 Gerrit-Change-Number: 37128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 09 Jun 2024 08:02:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in docker-playground[master]: ttcn3-asterisk: Add extra IP addr in ttcn3 docker for IMS Core
by laforge 09 Jun '24

09 Jun '24
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37125?usp=email ) Change subject: ttcn3-asterisk: Add extra IP addr in ttcn3 docker for IMS Core ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37125?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I6e5a261748ec61bb1cfa4aafee8c748d0f46aa9e Gerrit-Change-Number: 37125 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 09 Jun 2024 08:02:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: add support for RTP extensions via TW-TS-003
by fixeria 08 Jun '24

08 Jun '24
Attention is currently required from: falconia. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email ) Change subject: add support for RTP extensions via TW-TS-003 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/37129?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I2a742afff160a9a8286633bf5ae0dd4a828c7a42 Gerrit-Change-Number: 37129 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sat, 08 Jun 2024 19:32:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim/cat: Decode the "Type of Comand" from numeric value to a string
by laforge 08 Jun '24

08 Jun '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37135?usp=email ) Change subject: pySim/cat: Decode the "Type of Comand" from numeric value to a string ...................................................................... pySim/cat: Decode the "Type of Comand" from numeric value to a string This makes pySim-trace of proactive UICC much more readable. Change-Id: I833ec02bf281fe49de2be326018e91f521de52c0 --- M pySim/cat.py 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cat.py b/pySim/cat.py index 2a830c3..875806c 100644 --- a/pySim/cat.py +++ b/pySim/cat.py @@ -51,10 +51,24 @@ class CBSPage(COMPR_TLV_IE, tag=0x0C): pass +# TS 102 223 V15.3.0 Section 9.4 +TypeOfCommand = Enum(Int8ub, refresh=0x01, more_time=0x02, poll_interval=0x03, polling_off=0x04, + set_up_event_list=0x05, set_up_call=0x10, send_ss=0x11, send_ussd=0x12, + send_short_message=0x13, send_dtmf=0x14, launch_browser=0x15, geo_location_req=0x16, + play_tone=0x20, display_text=0x21, get_inkey=0x22, get_input=0x23, select_item=0x24, + set_up_menu=0x25, provide_local_info=0x26, timer_management=0x27, + set_up_idle_mode_text=0x28, perform_card_apdu=0x30, power_on_card=0x31, + power_off_card=0x32, get_reader_status=0x33, run_at_command=0x34, + language_notification=0x35, open_channel=0x40, close_channel=0x41, receive_data=0x42, + send_data=0x43, get_channel_status=0x44, service_search=0x45, get_service_info=0x46, + declare_service=0x47, set_frames=0x50, get_frames_status=0x51, retrieve_mms=0x60, + submit_mms=0x61, display_mms=0x62, activate=0x70, contactless_state_changed=0x71, + command_container=0x72, encapsulated_session_control=0x73) + # TS 102 223 Section 8.6 + TS 31.111 Section 8.6 class CommandDetails(COMPR_TLV_IE, tag=0x81): _construct = Struct('command_number'/Int8ub, - 'type_of_command'/Int8ub, + 'type_of_command'/TypeOfCommand, 'command_qualifier'/Int8ub) # TS 102 223 Section 8.7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37135?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: I833ec02bf281fe49de2be326018e91f521de52c0 Gerrit-Change-Number: 37135 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/cat: Decode the "Type of Comand" from numeric value to a string
by laforge 08 Jun '24

08 Jun '24
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37135?usp=email ) Change subject: pySim/cat: Decode the "Type of Comand" from numeric value to a string ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37135?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: I833ec02bf281fe49de2be326018e91f521de52c0 Gerrit-Change-Number: 37135 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, 08 Jun 2024 18:26:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in pysim[master]: pySim/cat: Decode the "Type of Comand" from numeric value to a string
by laforge 08 Jun '24

08 Jun '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37135?usp=email ) Change subject: pySim/cat: Decode the "Type of Comand" from numeric value to a string ...................................................................... pySim/cat: Decode the "Type of Comand" from numeric value to a string This makes pySim-trace of proactive UICC much more readable. Change-Id: I833ec02bf281fe49de2be326018e91f521de52c0 --- M pySim/cat.py 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/37135/1 diff --git a/pySim/cat.py b/pySim/cat.py index 2a830c3..875806c 100644 --- a/pySim/cat.py +++ b/pySim/cat.py @@ -51,10 +51,24 @@ class CBSPage(COMPR_TLV_IE, tag=0x0C): pass +# TS 102 223 V15.3.0 Section 9.4 +TypeOfCommand = Enum(Int8ub, refresh=0x01, more_time=0x02, poll_interval=0x03, polling_off=0x04, + set_up_event_list=0x05, set_up_call=0x10, send_ss=0x11, send_ussd=0x12, + send_short_message=0x13, send_dtmf=0x14, launch_browser=0x15, geo_location_req=0x16, + play_tone=0x20, display_text=0x21, get_inkey=0x22, get_input=0x23, select_item=0x24, + set_up_menu=0x25, provide_local_info=0x26, timer_management=0x27, + set_up_idle_mode_text=0x28, perform_card_apdu=0x30, power_on_card=0x31, + power_off_card=0x32, get_reader_status=0x33, run_at_command=0x34, + language_notification=0x35, open_channel=0x40, close_channel=0x41, receive_data=0x42, + send_data=0x43, get_channel_status=0x44, service_search=0x45, get_service_info=0x46, + declare_service=0x47, set_frames=0x50, get_frames_status=0x51, retrieve_mms=0x60, + submit_mms=0x61, display_mms=0x62, activate=0x70, contactless_state_changed=0x71, + command_container=0x72, encapsulated_session_control=0x73) + # TS 102 223 Section 8.6 + TS 31.111 Section 8.6 class CommandDetails(COMPR_TLV_IE, tag=0x81): _construct = Struct('command_number'/Int8ub, - 'type_of_command'/Int8ub, + 'type_of_command'/TypeOfCommand, 'command_qualifier'/Int8ub) # TS 102 223 Section 8.7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37135?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: I833ec02bf281fe49de2be326018e91f521de52c0 Gerrit-Change-Number: 37135 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: pySim.apdu.ts_102_221: Decode the ENVELOPE command body using pySim.c...
by laforge 08 Jun '24

08 Jun '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37133?usp=email ) Change subject: pySim.apdu.ts_102_221: Decode the ENVELOPE command body using pySim.cat TLV ...................................................................... pySim.apdu.ts_102_221: Decode the ENVELOPE command body using pySim.cat TLV This will decode the ENVELOPE body in pySim-trace further. Before: 00 ENVELOPE - 9000 {'p1': 0, 'p2': 0, 'cmd': 'd14682028381060291978b3c40048111227ff6407070611535002d02700000281516011212000001eae1bd578fa25791898128811b2206cc71639ca292ec2526da8aef4273d2fe2e', 'rsp': '027100001f0a00000100000001200000ab12800101230d08a0000001510000000f829000'} After: 00 ENVELOPE - 9000 {'p1': 0, 'p2': 0, 'cmd': [{'smspp_download': [{'device_identities': {'source_dev_id': 'network', 'dest_dev_id': 'uicc'}}, {'address': {'ton_npi': 145, 'call_number': '79'}}, {'sms_tpdu': {'tpdu': '40048111227ff6407070611535002d02700000281516011212000001eae1bd578fa25791898128811b2206cc71639ca292ec2526da8aef4273d2fe2e'}}]}], 'rsp': '027100001f0a00000100000001200000ab12800101230d08a0000001510000000f829000'} Change-Id: I5ecdbe0b5fa8856cb723569896b73cd49778ed5f --- M pySim/apdu/ts_102_221.py 1 file changed, 22 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py index 52d88d2..5636da2 100644 --- a/pySim/apdu/ts_102_221.py +++ b/pySim/apdu/ts_102_221.py @@ -1,7 +1,7 @@ # coding=utf-8 """APDU definitions/decoders of ETSI TS 102 221, the core UICC spec. -(C) 2022 by Harald Welte <laforge(a)osmocom.org> +(C) 2022-2024 by Harald Welte <laforge(a)osmocom.org> 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 @@ -27,6 +27,7 @@ from pySim.runtime import RuntimeLchan from pySim.apdu import ApduCommand, ApduCommandSet from pySim.utils import i2h +from pySim import cat logger = logging.getLogger(__name__) @@ -458,6 +459,7 @@ # TS 102 221 Section 11.2.2 / TS 102 223 class Envelope(ApduCommand, n='ENVELOPE', ins=0xC2, cla=['80']): _apdu_case = 4 + _tlv = cat.EventCollection # TS 102 221 Section 11.2.3 / TS 102 223 class Fetch(ApduCommand, n='FETCH', ins=0x12, cla=['80']): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37133?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: I5ecdbe0b5fa8856cb723569896b73cd49778ed5f Gerrit-Change-Number: 37133 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.