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 2023

  • 1 participants
  • 2480 discussions
[M] Change in pysim[master]: HPSIM application support
by laforge 06 Jun '23

06 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/33183 ) Change subject: HPSIM application support ...................................................................... HPSIM application support Support HPSIM as specified in 3GPP TS 31.104 Change-Id: I2729fd2b88cd13c36d7128753ad8d3e3d08a9b52 --- M pySim-shell.py A pySim/ts_31_104.py 2 files changed, 73 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/pySim-shell.py b/pySim-shell.py index 2b8c0be..fc825ef 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -61,6 +61,7 @@ from pySim.ts_102_222 import Ts102222Commands from pySim.ts_31_102 import CardApplicationUSIM from pySim.ts_31_103 import CardApplicationISIM +from pySim.ts_31_104 import CardApplicationHPSIM from pySim.ara_m import CardApplicationARAM from pySim.global_platform import CardApplicationISD from pySim.gsm_r import DF_EIRENE @@ -123,6 +124,7 @@ if isinstance(profile, CardProfileUICC): profile.add_application(CardApplicationUSIM()) profile.add_application(CardApplicationISIM()) + profile.add_application(CardApplicationHPSIM()) profile.add_application(CardApplicationARAM()) profile.add_application(CardApplicationISD()) diff --git a/pySim/ts_31_104.py b/pySim/ts_31_104.py new file mode 100644 index 0000000..0adafba --- /dev/null +++ b/pySim/ts_31_104.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- + +""" +Support for 3GPP TS 31.104 V17.0.0 +""" + +# Copyright (C) 2023 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 +# 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/>. +# + +from pySim.filesystem import * +from pySim.utils import * +from pySim.tlv import * +from pySim.ts_31_102 import ADF_USIM +from pySim.ts_51_011 import EF_IMSI, EF_AD +import pySim.ts_102_221 +from pySim.ts_102_221 import EF_ARR + + +class ADF_HPSIM(CardADF): + def __init__(self, aid='a000000087100A', name='ADF.HPSIM', fid=None, sfid=None, + desc='HPSIM Application'): + super().__init__(aid=aid, fid=fid, sfid=sfid, name=name, desc=desc) + + files = [ + EF_ARR(fid='6f06', sfid=0x06), + EF_IMSI(fid='6f07', sfid=0x07), + EF_AD(fid='6fad', sfid=0x03), + ] + self.add_files(files) + # add those commands to the general commands of a TransparentEF + self.shell_commands += [ADF_USIM.AddlShellCommands()] + + def decode_select_response(self, data_hex): + return pySim.ts_102_221.CardProfileUICC.decode_select_response(data_hex) + + +# TS 31.104 Section 7.1 +sw_hpsim = { + 'Security management': { + '9862': 'Authentication error, incorrect MAC', + } +} + + +class CardApplicationHPSIM(CardApplication): + def __init__(self): + super().__init__('HPSIM', adf=ADF_HPSIM(), sw=sw_hpsim) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2729fd2b88cd13c36d7128753ad8d3e3d08a9b52 Gerrit-Change-Number: 33183 Gerrit-PatchSet: 2 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in pysim[master]: Move "suspend_uicc" command from pySim-shell to ts_102_221.py
by laforge 06 Jun '23

06 Jun '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33209 ) Change subject: Move "suspend_uicc" command from pySim-shell to ts_102_221.py ...................................................................... Patch Set 2: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/33209/comment/d8eec187_7bfffe4e PS1, Line 291: print > `self. […] sorry, that's a left-over debug statement that should be removed. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I574348951f06b749aeff986589186110580328bc Gerrit-Change-Number: 33209 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Jun 2023 16:24:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: Move "suspend_uicc" command from pySim-shell to ts_102_221.py
by laforge 06 Jun '23

06 Jun '23
Attention is currently required from: laforge. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/33209 to look at the new patch set (#2). Change subject: Move "suspend_uicc" command from pySim-shell to ts_102_221.py ...................................................................... Move "suspend_uicc" command from pySim-shell to ts_102_221.py The SUSPEND UICC command is a TS 102 221 (UICC) command, so move it to the UICC Card Profile. Also, make sure that any shell command sets specified in the CardProfile are actually installed during equip(). Change-Id: I574348951f06b749aeff986589186110580328bc --- M docs/shell.rst M pySim-shell.py M pySim/ts_102_221.py 3 files changed, 47 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/09/33209/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I574348951f06b749aeff986589186110580328bc Gerrit-Change-Number: 33209 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: ts_102221: Add "resume_uicc" command
by laforge 06 Jun '23

06 Jun '23
Attention is currently required from: dexter. Hello Jenkins Builder, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/33210 to look at the new patch set (#2). Change subject: ts_102221: Add "resume_uicc" command ...................................................................... ts_102221: Add "resume_uicc" command We've had a "suspend_uicc" command since commit ec95053249bc7f9308ca1f659d8ef6ac97a6e393 in 2021, but didn't yet have the corresponding "resume" pair. Note that you cannot really execute this in a reasonable way from within pySim, as it is issuing other commands than those permitted between SUSPEND and RESUME by TS 102 221 Section 11.1.22.3.2 Change-Id: I3322fde74f680e77954e1d3e18a32ef5662759f2 --- M docs/shell.rst M pySim/commands.py M pySim/ts_102_221.py 3 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/10/33210/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I3322fde74f680e77954e1d3e18a32ef5662759f2 Gerrit-Change-Number: 33210 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: ts_31_102: Add shell command for GET IDENTITY
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/pysim/+/33212 ) Change subject: ts_31_102: Add shell command for GET IDENTITY ...................................................................... ts_31_102: Add shell command for GET IDENTITY GET IDENTITY is used in the "SUCI computation on USIM" feature. Change-Id: I619d397900dbd6565f8f46acdabcee511903830c --- M docs/shell.rst M pySim/commands.py M pySim/ts_31_102.py 3 files changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/12/33212/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I619d397900dbd6565f8f46acdabcee511903830c Gerrit-Change-Number: 33212 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: ts_31_102: Add shell command for GET IDENTITY
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33212 ) Change subject: ts_31_102: Add shell command for GET IDENTITY ...................................................................... ts_31_102: Add shell command for GET IDENTITY GET IDENTITY is used in the "SUCI computation on USIM" feature. Change-Id: I619d397900dbd6565f8f46acdabcee511903830c --- M docs/shell.rst M pySim/commands.py M pySim/ts_31_102.py 3 files changed, 39 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/12/33212/1 diff --git a/docs/shell.rst b/docs/shell.rst index cce790a..e13d054 100644 --- a/docs/shell.rst +++ b/docs/shell.rst @@ -566,6 +566,12 @@ :module: pySim.ts_31_102 :func: ADF_USIM.AddlShellCommands.envelope_sms_parser +get_identity +~~~~~~~~~~~~ +.. argparse:: + :module: pySim.ts_31_102 + :func: ADF_USIM.AddlShellCommands.get_id_parser + File-specific commands ---------------------- diff --git a/pySim/commands.py b/pySim/commands.py index 424ed0d..81ad285 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -642,3 +642,8 @@ def get_data(self, tag: int, cla: int = 0x00): data, sw = self._tp.send_apdu('%02xca%04x00' % (cla, tag)) return (data, sw) + + # TS 31.102 Section 7.5.2 + def get_identity(self, context: int): + data, sw = self._tp.send_apdu_checksw('807800%02x00' % (context)) + return (data, sw) diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 14e7cae..d7e2817 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -1664,6 +1664,23 @@ (data, sw) = self._cmd.card._scc.envelope(b2h(sms_dl.to_tlv())) self._cmd.poutput('SW: %s, data: %s' % (sw, data)) + get_id_parser = argparse.ArgumentParser() + get_id_parser.add_argument("--nswo-context", action='store_true') + + @cmd2.with_argparser(get_id_parser) + def do_get_identity(self, opts): + """Send a GET IDENTITY command to the card. This is part of the + procedure for "SUCI calculation performed on USIM" supported + by USIM with support for both EFT.USIM service 124 and 125.""" + context = 0x01 # SUCI + if opts.nswo_context: + context = 0x02 # SUCI 5G NSWO + (data, sw) = self._cmd.card._scc.get_identity(context) + do = SUCI_TlvDataObject() + do.from_tlv(h2b(data)) + do_d = do.to_dict() + self._cmd.poutput('SUCI TLV Data Object: %s' % do_d['suci__tlv_data_object']) + # TS 31.102 Section 7.3 sw_usim = { -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I619d397900dbd6565f8f46acdabcee511903830c Gerrit-Change-Number: 33212 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_31_102.py: Add Rel17 5G NSWO context for GET IDENTITY
by laforge 06 Jun '23

06 Jun '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33211 ) Change subject: pySim/apdu/ts_31_102.py: Add Rel17 5G NSWO context for GET IDENTITY ...................................................................... pySim/apdu/ts_31_102.py: Add Rel17 5G NSWO context for GET IDENTITY Change-Id: I6ce5848ca4cf04430be7767e9cb2d18f4c5a5531 --- M pySim/apdu/ts_31_102.py 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/11/33211/1 diff --git a/pySim/apdu/ts_31_102.py b/pySim/apdu/ts_31_102.py index 7602e50..2200388 100644 --- a/pySim/apdu/ts_31_102.py +++ b/pySim/apdu/ts_31_102.py @@ -108,7 +108,7 @@ class UsimGetIdentity(ApduCommand, n='GET IDENTITY', ins=0x78, cla=['8X', 'CX', 'EX']): _apdu_case = 4 _construct_p2 = BitStruct('scope'/Enum(Flag, mf=0, df_adf_specific=1), - 'identity_context'/Enum(BitsInteger(7), suci=1)) + 'identity_context'/Enum(BitsInteger(7), suci=1, suci_5g_nswo=2)) _tlv_rsp = SUCI_TlvDataObject ApduCommands = ApduCommandSet('TS 31.102', cmds=[UsimAuthenticateEven, UsimAuthenticateOdd, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6ce5848ca4cf04430be7767e9cb2d18f4c5a5531 Gerrit-Change-Number: 33211 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32339 ) Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Patch Set 5: Code-Review+1 (2 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/32339/comment/9bdb9bb7_5ae447d3 PS4, Line 16: () > redundant `()` Done https://gerrit.osmocom.org/c/osmo-pcu/+/32339/comment/52c234d9_6b98effd PS4, Line 37: he > the Done -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Jun 2023 15:56:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by pespin 06 Jun '23

06 Jun '23
Attention is currently required from: pespin. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 to look at the new patch set (#5). Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK Dispatching TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS means the UL TBF is able to be used to assign DL TBFs over PACCH. However, there's an extra implicit restriction: if the PCU already sent the final UL ACK/NACK to that UL TBF, then whatever message sent after it cannot be reliably answered, since the MS will go back to idle state after issues the PKT CTRL ACK for that final UL ACK/NACK. This condition is already being checked in contention_resolution_success(): """ if (ms_need_dl_tbf(ms()) && !tbf_ul_ack_waiting_cnf_final_ack(this)) ms_new_dl_tbf_assigned_on_pacch(ms(), this); """ Since we are considering the UL TBF to have done contention resolution when we transmit the *first* UL ACK/NACK, it mans we are doing both things on the same code path iif the *first* UL ACK/NACK is at the same time the *final* UL ACK for that UL TBF. This can happen if the UL TBF is only sending 1 block, which will have CV=0. This can usually happen during GMM Attach Request. In this scenario, with current code goes into a situation where first the TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS is triggered and *afterwards* the UL_ACK/NACK state is updated. As a result, the code snippet check above (!tbf_ul_ack_waiting_cnf_final_ack()) will be true and the DL TBF be assigned, but afterwards in the same code path it figures out the final ack happens. In order to fix this, first update the ACK/NACK state and only afterwards trigger the Contention Resolution Success event. Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 --- M src/tbf_ul_ack_fsm.c M tests/tbf/TbfTest.err 2 files changed, 64 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/32339/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-pcu[master]: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT ...
by fixeria 06 Jun '23

06 Jun '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32339 ) Change subject: Fix DL_TBF PACCH ass done on UL_TBF already scheduled to tx last PKT CTRL ACK ...................................................................... Patch Set 4: Code-Review+1 (2 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/32339/comment/784848ee_509b708e PS4, Line 16: () redundant `()` https://gerrit.osmocom.org/c/osmo-pcu/+/32339/comment/d0f4a3e3_fa678820 PS4, Line 37: he the -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62ae91b494e4fd0ade3f4a3ba3817bcaedbdebf5 Gerrit-Change-Number: 32339 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Jun 2023 15:54:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.