Attention is currently required from: dexter.
Jenkins Builder has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37819?usp=email )
Change subject: Add testsuite for pySim-shell with real cards
......................................................................
Patch Set 17:
(1 comment)
File tests/pySim-shell_test/README.txt:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18296):
https://gerrit.osmocom.org/c/pysim/+/37819/comment/abb02935_d93f3c3e?usp=em… :
PS17, Line 10: Each testcase has its own subdirectory and can be executed separatly. The sub
'separatly' may be misspelled - perhaps 'separately'?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?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: Ieae1330767a6e55e62437f5f988a0d33b727b5de
Gerrit-Change-Number: 37819
Gerrit-PatchSet: 17
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: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Sep 2024 07:54:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38022?usp=email )
Change subject: suci-tutorial: fix typo s/symo/sysmo/
......................................................................
suci-tutorial: fix typo s/symo/sysmo/
Change-Id: I0d3bdcf590e8dfef6deabc9967fd2f04152e1020
---
M docs/suci-tutorial.rst
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/22/38022/1
diff --git a/docs/suci-tutorial.rst b/docs/suci-tutorial.rst
index f1aef5b..cdf44c9 100644
--- a/docs/suci-tutorial.rst
+++ b/docs/suci-tutorial.rst
@@ -30,7 +30,7 @@
For specific information on sysmocom SIM cards, refer to
-* the `symoISIM-SJA5 User Manual <https://sysmocom.de/manuals/sysmoisim-sja5-manual.pdf>`__ for the curent
+* the `sysmoISIM-SJA5 User Manual <https://sysmocom.de/manuals/sysmoisim-sja5-manual.pdf>`__ for the curent
sysmoISIM-SJA5 product
* the `sysmoISIM-SJA2 User Manual <https://sysmocom.de/manuals/sysmousim-manual.pdf>`__ for the older
sysmoISIM-SJA2 product
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38022?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0d3bdcf590e8dfef6deabc9967fd2f04152e1020
Gerrit-Change-Number: 38022
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38000?usp=email )
Change subject: pySim-shell: do not display 'AIDs:' when there are none
......................................................................
pySim-shell: do not display 'AIDs:' when there are none
The command cardinfo also displays the AIDs of the card applications.
However, on classic GSM sim cards there are no applications. In this
case cardinfo will still display the string 'AIDs:', but it will of
course not list any AIDs under this string.
Related: OS#6531
Change-Id: Ifb111ce43fdebe85d30857dfc61ab570380b68d1
---
M pySim-shell.py
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index 16a6b97..4081ef9 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -826,8 +826,9 @@
self._cmd.poutput(" ICCID: %s" % self._cmd.rs.identity['ICCID'])
self._cmd.poutput(" Class-Byte: %s" % self._cmd.lchan.scc.cla_byte)
self._cmd.poutput(" Select-Ctrl: %s" % self._cmd.lchan.scc.sel_ctrl)
- self._cmd.poutput(" AIDs:")
- for a in self._cmd.rs.mf.applications:
+ if len(self._cmd.rs.mf.applications) > 0:
+ self._cmd.poutput(" AIDs:")
+ for a in self._cmd.rs.mf.applications:
self._cmd.poutput(" %s" % a)
@with_default_category('ISO7816 Commands')
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38000?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: Ifb111ce43fdebe85d30857dfc61ab570380b68d1
Gerrit-Change-Number: 38000
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37947?usp=email )
Change subject: suci-tutorial: add section about SUCI calculation by the USIM
......................................................................
suci-tutorial: add section about SUCI calculation by the USIM
The tutorial describes how SUCI calculation in the UE is configured,
let's now add a section about SUCI calculation by the USIM.
Related: OS#6531
Change-Id: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
---
M docs/suci-tutorial.rst
1 file changed, 88 insertions(+), 14 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/docs/suci-tutorial.rst b/docs/suci-tutorial.rst
index 9227d1d..f1aef5b 100644
--- a/docs/suci-tutorial.rst
+++ b/docs/suci-tutorial.rst
@@ -1,26 +1,23 @@
Guide: Enabling 5G SUCI
-========================
+=======================
SUPI/SUCI Concealment is a feature of 5G-Standalone (SA) to encrypt the
IMSI/SUPI with a network operator public key. 3GPP Specifies two different
variants for this:
-* SUCI calculation *in the UE*, using data from the SIM
+* SUCI calculation *in the UE*, using key data from the SIM
* SUCI calculation *on the card itself*
-pySIM supports writing the 5G-specific files for *SUCI calculation in the UE* on USIM cards, assuming that
-your cards contain the required files, and you have the privileges/credentials to write to them. This is
-the case using sysmocom sysmoISIM-SJA2 cards (or successor products).
+pySim supports writing the 5G-specific files for *SUCI calculation in the UE* on USIM cards, assuming
+that your cards contain the required files, and you have the privileges/credentials to write to them.
+This is the case using sysmocom sysmoISIM-SJA2 or any flavor of sysmoISIM-SJA5.
-In short, you can enable SUCI with these steps:
+There is no 3GPP/ETSI standard method for configuring *SUCI calculation on the card*; pySim currently
+supports the vendor-specific method for the sysmoISIM-SJA5-S17).
-* activate USIM **Service 124**
-* make sure USIM **Service 125** is disabled
-* store the public keys in **SUCI_Calc_Info**
-* set the **Routing Indicator** (required)
+This document describes both methods.
-If you want to disable the feature, you can just disable USIM Service 124 (and 125).
Technical References
~~~~~~~~~~~~~~~~~~~~
@@ -31,11 +28,29 @@
* USIM tests (incl. file content examples): `3GPP TS 31.121 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131121/16.01.00_60/ts_13…>`__
* Test keys for SUCI calculation: `3GPP TS 33.501 <https://www.etsi.org/deliver/etsi_ts/133500_133599/133501/16.05.00_60/ts_13…>`__
-For specific information on sysmocom SIM cards, refer to Section 9.1 of the `sysmoUSIM User
-Manual <https://www.sysmocom.de/manuals/sysmousim-manual.pdf>`__.
+For specific information on sysmocom SIM cards, refer to
+
+* the `symoISIM-SJA5 User Manual <https://sysmocom.de/manuals/sysmoisim-sja5-manual.pdf>`__ for the curent
+ sysmoISIM-SJA5 product
+* the `sysmoISIM-SJA2 User Manual <https://sysmocom.de/manuals/sysmousim-manual.pdf>`__ for the older
+ sysmoISIM-SJA2 product
--------------
+
+Enabling 5G SUCI *calculated in the UE*
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In short, you can enable *SUCI calculation in the UE* with these steps:
+
+* activate USIM **Service 124**
+* make sure USIM **Service 125** is disabled
+* store the public keys in **EF.SUCI_Calc_Info**
+* set the **Routing Indicator** (required)
+
+If you want to disable the feature, you can just disable USIM Service 124 (and 125) in `EF.UST`.
+
+
Admin PIN
---------
@@ -185,7 +200,7 @@
USIM Error with 5G and sysmoISIM
--------------------------------
-sysmoISIMs come 5GS-enabled. By default however, the configuration stored
+sysmoISIM-SJA2 come 5GS-enabled. By default however, the configuration stored
in the card file-system is **not valid** for 5G networks: Service 124 is enabled,
but EF.SUCI_Calc_Info and EF.Routing_Indicator are empty files (hence
do not contain valid data).
@@ -194,3 +209,62 @@
whole modem shutting 5G down. If you don’t need SUCI concealment but the
smartphone refuses to connect to any 5G network, try to disable the UST
service 124.
+
+sysmoISIM-SJA5 are shipped with a more forgiving default, with valid EF.Routing_Indicator
+contents and disabled Service 124
+
+
+SUCI calculation by the USIM
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The SUCI calculation can also be performed by the USIM application on the UICC
+directly. The UE then uses the GET IDENTITY command (see also 3GPP TS 31.102,
+section 7.5) to retrieve a SUCI value.
+
+The sysmoISIM-SJA5-S17 supports *SUCI calculation by the USIM*. The configuration
+is not much different to the above described configuration of *SUCI calculation
+in the UE*.
+
+The main difference is how the key provisioning is done. When the SUCI
+calculation is done by the USIM, then the key material is not accessed by the
+UE. The specification (see also 3GPP TS 31.102, section 7.5.1.1), also does not
+specify any file or file format to store the key material. This means the exact
+way to perform the key provisioning is an implementation detail of the USIM
+card application.
+
+In the case of sysmoISIM-SJA5-S17, the key material for *SUCI calculation by the USIM* is stored in
+`ADF.USIM/DF.SAIP/EF.SUCI_Calc_Info` (**not** in `ADF.USIM/DF.5GS/EF.SUCI_Calc_Info`!).
+
+::
+
+ pySIM-shell (00:MF)> select MF
+ pySIM-shell (00:MF)> select ADF.USIM
+ pySIM-shell (00:MF/ADF.USIM)> select DF.SAIP
+ pySIM-shell (00:MF/ADF.USIM/DF.SAIP)> select EF.SUCI_Calc_Info
+
+The file format is exactly the same as specified in 3GPP TS 31.102, section
+4.4.11.8. This means the above described key provisioning procedure can be
+applied without any changes, except that the file location is different.
+
+To signal to the UE that the USIM is setup up for SUCI calculation, service
+125 must be enabled in addition to service 124 (see also 3GPP TS 31.102,
+section 5.3.48)
+
+::
+
+ pySIM-shell (00:MF/ADF.USIM/EF.UST)> ust_service_activate 124
+ pySIM-shell (00:MF/ADF.USIM/EF.UST)> ust_service_activate 125
+
+To verify that the SUCI calculation works as expected, it is possible to issue
+a GET IDENTITY command using pySim-shell:
+
+::
+
+ select ADF.USIM
+ get_identity
+
+The USIM should then return a SUCI TLV Data object that looks like this:
+
+::
+
+ SUCI TLV Data Object: 0199f90717ff021b027a2c58ce1c6b89df088a9eb4d242596dd75746bb5f3503d2cf58a7461e4fd106e205c86f76544e9d732226a4e1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37947?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: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
Gerrit-Change-Number: 37947
Gerrit-PatchSet: 4
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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38008?usp=email )
Change subject: pySim-shell: use upper case letters for positional arguments
......................................................................
pySim-shell: use upper case letters for positional arguments
When we define positional arguments for the argument parser, we usually
use upper case letters only. However, there are some code locations that
use lower case letters. Let's translate those to capital letters to
have a consistent appeariance.
Related: OS#6531
Change-Id: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574
---
M pySim-shell.py
M pySim/filesystem.py
M pySim/ts_102_221.py
M pySim/ts_31_102.py
M pySim/ts_51_011.py
5 files changed, 36 insertions(+), 37 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index 4081ef9..4f168d8 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -348,8 +348,7 @@
return -1
bulk_script_parser = argparse.ArgumentParser()
- bulk_script_parser.add_argument(
- 'script_path', help="path to the script file")
+ bulk_script_parser.add_argument('SCRIPT_PATH', help="path to the script file")
bulk_script_parser.add_argument('--halt_on_error', help='stop card handling if an exeption occurs',
action='store_true')
bulk_script_parser.add_argument('--tries', type=int, default=2,
@@ -365,7 +364,7 @@
"""Run script on multiple cards (bulk provisioning)"""
# Make sure that the script file exists and that it is readable.
- if not os.access(opts.script_path, os.R_OK):
+ if not os.access(opts.SCRIPT_PATH, os.R_OK):
self.poutput("Invalid script file!")
return
@@ -390,7 +389,7 @@
os.system(opts.pre_card_action)
# process the card
- rc = self._process_card(first, opts.script_path)
+ rc = self._process_card(first, opts.SCRIPT_PATH)
if rc == 0:
success_count = success_count + 1
self._show_success_sign()
@@ -442,13 +441,13 @@
first = False
echo_parser = argparse.ArgumentParser()
- echo_parser.add_argument('string', help="string to echo on the shell", nargs='+')
+ echo_parser.add_argument('STRING', help="string to echo on the shell", nargs='+')
@cmd2.with_argparser(echo_parser)
@cmd2.with_category(CUSTOM_CATEGORY)
def do_echo(self, opts):
"""Echo (print) a string on the console"""
- self.poutput(' '.join(opts.string))
+ self.poutput(' '.join(opts.STRING))
@cmd2.with_category(CUSTOM_CATEGORY)
def do_version(self, opts):
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 93371a9..43a72f2 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -627,19 +627,19 @@
upd_bin_parser = argparse.ArgumentParser()
upd_bin_parser.add_argument(
'--offset', type=auto_uint16, default=0, help='Byte offset for start of read')
- upd_bin_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
+ upd_bin_parser.add_argument('DATA', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(upd_bin_parser)
def do_update_binary(self, opts):
"""Update (Write) data of a transparent EF"""
- (data, _sw) = self._cmd.lchan.update_binary(opts.data, opts.offset)
+ (data, _sw) = self._cmd.lchan.update_binary(opts.DATA, opts.offset)
if data:
self._cmd.poutput(data)
upd_bin_dec_parser = argparse.ArgumentParser()
upd_bin_dec_parser.add_argument('--json-path', type=str,
help='JSON path to modify specific element of file only')
- upd_bin_dec_parser.add_argument('data', help='Abstract data (JSON format) to write')
+ upd_bin_dec_parser.add_argument('DATA', help='Abstract data (JSON format) to write')
@cmd2.with_argparser(upd_bin_dec_parser)
def do_update_binary_decoded(self, opts):
@@ -647,9 +647,9 @@
if opts.json_path:
(data_json, _sw) = self._cmd.lchan.read_binary_dec()
js_path_modify(data_json, opts.json_path,
- json.loads(opts.data))
+ json.loads(opts.DATA))
else:
- data_json = json.loads(opts.data)
+ data_json = json.loads(opts.DATA)
(data, _sw) = self._cmd.lchan.update_binary_dec(data_json)
if data:
self._cmd.poutput_json(data)
@@ -842,13 +842,13 @@
read_rec_parser.add_argument(
'--count', type=auto_uint8, default=1, help='Number of records to be read, beginning at record_nr')
read_rec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
@cmd2.with_argparser(read_rec_parser)
def do_read_record(self, opts):
"""Read one or multiple records from a record-oriented EF"""
for r in range(opts.count):
- recnr = opts.record_nr + r
+ recnr = opts.RECORD_NR + r
(data, _sw) = self._cmd.lchan.read_record(recnr)
if len(data) > 0:
recstr = str(data)
@@ -860,12 +860,12 @@
read_rec_dec_parser.add_argument('--oneline', action='store_true',
help='No JSON pretty-printing, dump as a single line')
read_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
@cmd2.with_argparser(read_rec_dec_parser)
def do_read_record_decoded(self, opts):
"""Read + decode a record from a record-oriented EF"""
- (data, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (data, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
self._cmd.poutput_json(data, opts.oneline)
read_recs_parser = argparse.ArgumentParser()
@@ -899,13 +899,13 @@
upd_rec_parser = argparse.ArgumentParser()
upd_rec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
- upd_rec_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
+ upd_rec_parser.add_argument('DATA', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(upd_rec_parser)
def do_update_record(self, opts):
"""Update (write) data to a record-oriented EF"""
- (data, _sw) = self._cmd.lchan.update_record(opts.record_nr, opts.data)
+ (data, _sw) = self._cmd.lchan.update_record(opts.RECORD_NR, opts.DATA)
if data:
self._cmd.poutput(data)
@@ -913,31 +913,31 @@
upd_rec_dec_parser.add_argument('--json-path', type=str,
help='JSON path to modify specific element of record only')
upd_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
upd_rec_dec_parser.add_argument('data', help='Abstract data (JSON format) to write')
@cmd2.with_argparser(upd_rec_dec_parser)
def do_update_record_decoded(self, opts):
"""Encode + Update (write) data to a record-oriented EF"""
if opts.json_path:
- (data_json, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (data_json, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
js_path_modify(data_json, opts.json_path,
json.loads(opts.data))
else:
data_json = json.loads(opts.data)
(data, _sw) = self._cmd.lchan.update_record_dec(
- opts.record_nr, data_json)
+ opts.RECORD_NR, data_json)
if data:
self._cmd.poutput(data)
edit_rec_dec_parser = argparse.ArgumentParser()
edit_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be edited')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be edited')
@cmd2.with_argparser(edit_rec_dec_parser)
def do_edit_record_decoded(self, opts):
"""Edit the JSON representation of one record in an editor."""
- (orig_json, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (orig_json, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
with tempfile.TemporaryDirectory(prefix='pysim_') as dirname:
filename = '%s/file' % dirname
# write existing data as JSON to file
@@ -951,7 +951,7 @@
self._cmd.poutput("Data not modified, skipping write")
else:
(data, _sw) = self._cmd.lchan.update_record_dec(
- opts.record_nr, edited_json)
+ opts.RECORD_NR, edited_json)
if data:
self._cmd.poutput_json(data)
@@ -1303,12 +1303,12 @@
retrieve_data_parser = argparse.ArgumentParser()
retrieve_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to retrieve')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to retrieve')
@cmd2.with_argparser(retrieve_data_parser)
def do_retrieve_data(self, opts):
"""Retrieve (Read) data from a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.retrieve_data(opts.tag)
+ (data, _sw) = self._cmd.lchan.retrieve_data(opts.TAG)
self._cmd.poutput(data)
def do_retrieve_tags(self, _opts):
@@ -1318,24 +1318,24 @@
set_data_parser = argparse.ArgumentParser()
set_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to set')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to set')
set_data_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(set_data_parser)
def do_set_data(self, opts):
"""Set (Write) data for a given tag in a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.set_data(opts.tag, opts.data)
+ (data, _sw) = self._cmd.lchan.set_data(opts.TAG, opts.data)
if data:
self._cmd.poutput(data)
del_data_parser = argparse.ArgumentParser()
del_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to set')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to set')
@cmd2.with_argparser(del_data_parser)
def do_delete_data(self, opts):
"""Delete data for a given tag in a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.set_data(opts.tag, None)
+ (data, _sw) = self._cmd.lchan.set_data(opts.TAG, None)
if data:
self._cmd.poutput(data)
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index d671c3e..aba28cd 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -906,14 +906,14 @@
'Negotiated Duration: %u secs, Token: %s, SW: %s' % (duration, token, sw))
resume_uicc_parser = argparse.ArgumentParser()
- resume_uicc_parser.add_argument('token', type=str, help='Token provided during SUSPEND')
+ resume_uicc_parser.add_argument('TOKEN', type=str, help='Token provided during SUSPEND')
@cmd2.with_argparser(resume_uicc_parser)
def do_resume_uicc(self, opts):
"""Perform the REUSME UICC operation. Only supported on some UICC. Also: A power-cycle
of the card is required between SUSPEND and RESUME, and only very few non-RESUME
commands are permitted between SUSPEND and RESUME. See TS 102 221 Section 11.1.22."""
- self._cmd.card._scc.resume_uicc(opts.token)
+ self._cmd.card._scc.resume_uicc(opts.TOKEN)
term_cap_parser = argparse.ArgumentParser()
# power group
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index b70ae54..e27d2db 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -1707,14 +1707,14 @@
@with_default_category('Application-Specific Commands')
class AddlShellCommands(CommandSet):
authenticate_parser = argparse.ArgumentParser()
- authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge')
- authenticate_parser.add_argument('autn', type=is_hexstr, help='Authentication Nonce')
+ authenticate_parser.add_argument('RAND', type=is_hexstr, help='Random challenge')
+ authenticate_parser.add_argument('AUTN', type=is_hexstr, help='Authentication Nonce')
#authenticate_parser.add_argument('--context', help='Authentication context', default='3G')
@cmd2.with_argparser(authenticate_parser)
def do_authenticate(self, opts):
"""Perform Authentication and Key Agreement (AKA)."""
- (data, _sw) = self._cmd.lchan.scc.authenticate(opts.rand, opts.autn)
+ (data, _sw) = self._cmd.lchan.scc.authenticate(opts.RAND, opts.AUTN)
self._cmd.poutput_json(data)
term_prof_parser = argparse.ArgumentParser()
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 9c94c02..c6720fe 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -1076,12 +1076,12 @@
super().__init__()
authenticate_parser = argparse.ArgumentParser()
- authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge')
+ authenticate_parser.add_argument('RAND', type=is_hexstr, help='Random challenge')
@cmd2.with_argparser(authenticate_parser)
def do_authenticate(self, opts):
"""Perform GSM Authentication."""
- (data, sw) = self._cmd.lchan.scc.run_gsm(opts.rand)
+ (data, sw) = self._cmd.lchan.scc.run_gsm(opts.RAND)
self._cmd.poutput_json(data)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38008?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: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574
Gerrit-Change-Number: 38008
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38008?usp=email )
Change subject: pySim-shell: use upper case letters for positional arguments
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38008?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: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574
Gerrit-Change-Number: 38008
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: Wed, 04 Sep 2024 07:49:28 +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/+/38000?usp=email )
Change subject: pySim-shell: do not display 'AIDs:' when there are none
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38000?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: Ifb111ce43fdebe85d30857dfc61ab570380b68d1
Gerrit-Change-Number: 38000
Gerrit-PatchSet: 3
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: Wed, 04 Sep 2024 07:49:21 +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/+/37947?usp=email )
Change subject: suci-tutorial: add section about SUCI calculation by the USIM
......................................................................
Patch Set 4: Code-Review+2
(1 comment)
File docs/suci-tutorial.rst:
https://gerrit.osmocom.org/c/pysim/+/37947/comment/2d27b61c_b740b5b5?usp=em… :
PS3, Line 210: accessed
> "not accessed" means like "it's there but could be accessed, but it is not". […]
Done
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37947?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: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
Gerrit-Change-Number: 37947
Gerrit-PatchSet: 4
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: Wed, 04 Sep 2024 07:49:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter, fixeria.
laforge has uploaded a new patch set (#4) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37947?usp=email )
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified-1 by Jenkins Builder
Change subject: suci-tutorial: add section about SUCI calculation by the USIM
......................................................................
suci-tutorial: add section about SUCI calculation by the USIM
The tutorial describes how SUCI calculation in the UE is configured,
let's now add a section about SUCI calculation by the USIM.
Related: OS#6531
Change-Id: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
---
M docs/suci-tutorial.rst
1 file changed, 88 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/37947/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37947?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
Gerrit-Change-Number: 37947
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>