Skip to content
Success

Changes

Summary

  1. global_platform/scp: refactor _wrap_cmd_apdu (details)
  2. pySim/transport add support for T=1 protocol and fix APDU/TPDU layer (details)
  3. pySim-shell_test: add new testcase for card initialization (details)
  4. fixup (details)
  5. fixup (details)
Commit 1c9fd9b7a0222b45bb4e408e72b21887f796d2c5 by pmaier@sysmocom.de
global_platform/scp: refactor _wrap_cmd_apdu

The _wrap_cmd_apdu methods for SCP02 and SCP03 are a bit hard to read. Let's
refactor them so that it is easier to understand what happens. In particular
that one can not have encryption (cenc) without signing (cmac)

Related: OS#6367
Change-Id: I4c5650337779a4bd1f98673650c6c3cb526d518b
The file was modifiedpySim/global_platform/scp.py
Commit a3ff5e713ba0d1c482f063e9a7ccccace313d60a by pmaier@sysmocom.de
pySim/transport add support for T=1 protocol and fix APDU/TPDU layer conflicts

ETSI TS 102 221, section 7.3 specifies that UICCs (and eUICCs) may support two
different transport protocols: T=0 or T=1 or both. The spec also says that the
terminal must support both protocols.

This patch adds the necessary functionality to support the T=1 protocol
alongside the T=0 protocol. However, this also means that we have to sharpen
the lines between APDUs and TPDUs.

Change-Id: I8b56d7804a2b4c392f43f8540e0b6e70001a8970
The file was modifiedpySim/utils.py
The file was addedtests/pySim-shell_test/apdu/test_apdu.script
The file was addedtests/pySim-shell_test/apdu/test_apdu_scp03.template
The file was modifiedpySim/global_platform/scp.py
The file was modifiedpySim/transport/pcsc.py
The file was modifiedpySim-read.py
The file was modifiedpySim-trace.py
The file was modifiedpySim/transport/serial.py
The file was addedtests/pySim-shell_test/apdu/test_apdu_legacy.script
The file was addedtests/pySim-shell_test/apdu/test_apdu_scp02.template
The file was modifiedtests/unittests/test_globalplatform.py
The file was modifiedpySim/global_platform/__init__.py
The file was addedtests/pySim-shell_test/apdu/test_apdu_legacy_scp03.template
The file was modifiedtests/pySim-shell_test/lchan/test.ok
The file was modifiedpySim/transport/calypso.py
The file was addedtests/pySim-shell_test/apdu/test.py
The file was modifiedpySim/euicc.py
The file was addedtests/pySim-shell_test/apdu/__init__.py
The file was modifiedtests/unittests/test_utils.py
The file was modifiedpySim/transport/modem_atcmd.py
The file was modifiedpySim/commands.py
The file was modifiedtests/pySim-shell_test/config.yaml
The file was modifiedpySim/transport/__init__.py
The file was modifiedpySim-shell.py
The file was addedtests/pySim-shell_test/apdu/test_apdu_legacy_scp02.template
Commit d68109bb2d54ac5b60a29cf0a24345e814135f1c by pmaier@sysmocom.de
pySim-shell_test: add new testcase for card initialization

The card initialization normally takes place automatically. Nearly all
testcases implicitly cover this code-path. However, it is also possible
to skip the card initialization and do it at some later point. This is
commonly the case for unprovisioned card that require some custom APDUs
in a basic initialization step. When this step is done one would use
the "equip" command to level up to the full featured mode. This patch
adds a testcase for this scenario

Related: OS#6367
Change-Id: I01a03fa07d8c62164453bd707c5943288ff1a972
The file was addedtests/pySim-shell_test/card_init/__init__.py
The file was addedtests/pySim-shell_test/card_init/test_card_init.script
The file was addedtests/pySim-shell_test/card_init/test.py
Commit 89ec2405ee8b7d0a941255d212df153f2640567c by pmaier@sysmocom.de
fixup

Change-Id: I6c2946770fff320dbbe8608d5d6ebee1f4bab7df
The file was modifiedpySim/transport/modem_atcmd.py
The file was modifiedpySim/transport/pcsc.py
The file was modifiedpySim/transport/serial.py
The file was modifiedpySim/transport/__init__.py
The file was modifiedpySim/transport/calypso.py
Commit 568e8ae9b817ec2473907bfdd30870410890ffb0 by pmaier@sysmocom.de
fixup

Change-Id: Idfb7e33ffcbad1fc7733b7ab7535bf33c516af55
The file was modifiedpySim/transport/__init__.py
The file was modifiedpySim/transport/modem_atcmd.py