laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37536?usp=email )
Change subject: pySim.ota: Add construct definition for SIM File + TK Param definition
......................................................................
pySim.ota: Add construct definition for SIM File + TK Param definition
Change-Id: Ie5aa2babaf66af49eb5223e5e9d4451089baf055
---
M pySim/ota.py
1 file changed, 22 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/pySim/ota.py b/pySim/ota.py
index 751461a..bb5a1f6 100644
--- a/pySim/ota.py
+++ b/pySim/ota.py
@@ -1,6 +1,6 @@
"""Code related to SIM/UICC OTA according to TS 102 225 + TS 31.115."""
-# (C) 2021-2023 by Harald Welte <laforge(a)osmocom.org>
+# (C) 2021-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
@@ -20,7 +20,7 @@
import struct
from typing import Optional, Tuple
from construct import Enum, Int8ub, Int16ub, Struct, Bytes, GreedyBytes, BitsInteger, BitStruct
-from construct import Flag, Padding, Switch, this
+from construct import Flag, Padding, Switch, this, PrefixedArray, GreedyRange
from pySim.construct import *
from pySim.utils import b2h
@@ -99,6 +99,17 @@
'tar'/Bytes(3),
'secured_data'/GreedyBytes)
+# TS 102 226 Section 8.2.1.3.2.1
+SimFileAccessAndToolkitAppSpecParams = Struct('access_domain'/Prefixed(Int8ub, GreedyBytes),
+ 'prio_level_of_tk_app_inst'/Int8ub,
+ 'max_num_of_timers'/Int8ub,
+ 'max_text_length_for_menu_entry'/Int8ub,
+ 'menu_entries'/PrefixedArray(Int8ub, Struct('id'/Int8ub,
+ 'pos'/Int8ub)),
+ 'max_num_of_channels'/Int8ub,
+ 'msl'/Prefixed(Int8ub, GreedyBytes),
+ 'tar_values'/Prefixed(Int8ub, GreedyRange(Bytes(3))))
+
class OtaKeyset:
"""The OTA related data (key material, counter) to be used in encrypt/decrypt."""
def __init__(self, algo_crypt: str, kic_idx: int, kic: bytes,
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37536?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: Ie5aa2babaf66af49eb5223e5e9d4451089baf055
Gerrit-Change-Number: 37536
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37541?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: saip-tool: Fix TAR display for implicit TAR
......................................................................
saip-tool: Fix TAR display for implicit TAR
Until Change-Id Ifba1048e3000829d54769b0420f5134e2f9b04e1 the TAR
output was working for implicit tar. With said commit we fixed it
for explicit tar but broke implicit tar.
With this commit it works for both implicit and explicit TAR.
Change-Id: I76133b0e02996a138257f3fba5ceb0d2fc6fad80
---
M contrib/saip-tool.py
1 file changed, 17 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/contrib/saip-tool.py b/contrib/saip-tool.py
index 8208602..d9d33c0 100755
--- a/contrib/saip-tool.py
+++ b/contrib/saip-tool.py
@@ -202,7 +202,8 @@
adf = rfm.decoded.get('adfRFMAccess', None)
if adf:
print("\tADF AID: %s" % b2h(adf['adfAID']))
- for tar in rfm.decoded['tarList']:
+ tar_list = rfm.decoded.get('tarList', [inst_aid[-3:]])
+ for tar in tar_list:
print("\tTAR: %s" % b2h(tar))
def do_extract_apps(pes:ProfileElementSequence, opts):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37541?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: I76133b0e02996a138257f3fba5ceb0d2fc6fad80
Gerrit-Change-Number: 37541
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37615?usp=email
to look at the new patch set (#3).
Change subject: pySim-shell: clean up method calls in do_switch_channel
......................................................................
pySim-shell: clean up method calls in do_switch_channel
The function do_switch_channel method calls methods in RuntimeLchan
that should be private. There is also a code duplication in
RuntimeLchan that should be cleaned up.
Related: OS#6092
Change-Id: Ie5e5f45787abaaf032e1b49f51d447653cf2c996
---
M pySim-shell.py
M pySim/runtime.py
2 files changed, 29 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/15/37615/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37615?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: Ie5e5f45787abaaf032e1b49f51d447653cf2c996
Gerrit-Change-Number: 37615
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter.
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/37615?usp=email )
Change subject: pySim-shell: clean up method calls in do_switch_channel
......................................................................
Patch Set 2:
(1 comment)
File pySim/runtime.py:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-17340):
https://gerrit.osmocom.org/c/pysim/+/37615/comment/7628e967_f68aec04
PS2, Line 582: """Unregister command set that is associated with the currently seleted file"""
'seleted' may be misspelled - perhaps 'selected'?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37615?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: Ie5e5f45787abaaf032e1b49f51d447653cf2c996
Gerrit-Change-Number: 37615
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 26 Jul 2024 08:36:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment