Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37932?usp=email )
Change subject: pySim-shell: rework startup procedure and introduce headless mode
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
I would prefer something like --nointeractive or --noprompt over --headless, but I guess those are small details. What do you think?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37932?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: I07ecb27b37e2573629981a0d032cc95cd156be7e
Gerrit-Change-Number: 37932
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:22:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37931?usp=email )
Change subject: scp: fix key length in dek_encrypt and dek_decrypt
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/37931/comment/8c4baa08_496bc272?usp=em… :
PS1, Line 9: When creating the DES cipher object with DES.new, we use the property
: card_keys.dek. This property may hold a 16 byte key, but DES uses
: an 8 byte key. Pycryptodome does not automatically ignore excess key
: bytes. Instead it throws an exception. This means we need to make sure
: to supply only the first 8 bytes of card_keys.dek
did you check the spec and determie that this truncation is required/intended? IF yes, it would be great to add a comment with the spec reference to the code [optionally also the commit log]. Thanks.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37931?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: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f
Gerrit-Change-Number: 37931
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:20:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37919?usp=email )
Change subject: global_platform: use scp_key_identity ICCID for ADF.ISD
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37919?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: I73a6f7088321a2b703074aa5228910709050cab2
Gerrit-Change-Number: 37919
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:19:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37919?usp=email )
Change subject: global_platform: use scp_key_identity ICCID for ADF.ISD
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37919?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: I73a6f7088321a2b703074aa5228910709050cab2
Gerrit-Change-Number: 37919
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:19:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37918?usp=email )
Change subject: global_platform: fix help description for establish_scp03
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37918?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: Ibb26bddf88b2e644a7f0c6b2a06bde228aa8afc7
Gerrit-Change-Number: 37918
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 27 Aug 2024 14:18:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37840?usp=email )
Change subject: ara_m: use class byte of current lchan
......................................................................
Patch Set 8: Code-Review-1
(1 comment)
Patchset:
PS6:
> Ok, I was mistaken (was recalling this from memory). MANAGE CHANNEL is not affected. […]
I saw there's v8 of the patch, but it doesn't address this. If I look at one example (pySim/commands.py: terminal_profile), then it uses send_apdu_checksw which currently forces CLA to 0x80. With your patch applied, apply_lchan would be implicitly true and hence cause a bug.
That's why I wrote we need to make sure all commands that do not work over logical channels need to be changed to include that explicit apply_lchan=False
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37840?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: Ie3e48678f178a488bfaea6cc2b9a3e18145a8d10
Gerrit-Change-Number: 37840
Gerrit-PatchSet: 8
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: Tue, 27 Aug 2024 14:18:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37917?usp=email )
Change subject: filesystem: add command to delete all contents from a BER-TLV EF
......................................................................
filesystem: add command to delete all contents from a BER-TLV EF
When working with BER-TLF files, we can only delete one tag at a time.
There is no way to delete all tags at once. This may make working with
BER-TLV files difficult, in particular when scripting is used and the
script needs to start with an empty file. Also export has problems,
since it does not reset the file before setting the new values there
may be unexpected results in case there still tags in the file that
are not set during import. To fill the gap, let's add a commandd that
deletes all tags in a BER-TLV EF at once.
Related: OS#6531
Change-Id: I5d6bcfe865df7cb8fa6dd0052cab3b364d929f94
---
M pySim/filesystem.py
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 35af140..d5e99a4 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -1338,6 +1338,12 @@
if data:
self._cmd.poutput(data)
+ def do_delete_all(self, opts):
+ """Delete all data from a BER-TLV EF"""
+ tags = self._cmd.lchan.retrieve_tags()
+ for tag in tags:
+ self._cmd.lchan.set_data(tag, None)
+
def __init__(self, fid: str, sfid: str = None, name: str = None, desc: str = None, parent: CardDF = None,
size: Size = (1, None), **kwargs):
"""
@@ -1374,6 +1380,7 @@
if tags == []:
export_str += "# empty file, no tags"
else:
+ export_str += "delete_all\n"
for t in tags:
result = lchan.retrieve_data(t)
(tag, l, val, remainer) = bertlv_parse_one(h2b(result[0]))
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37917?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5d6bcfe865df7cb8fa6dd0052cab3b364d929f94
Gerrit-Change-Number: 37917
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>