Files
pysim-local/tests/pySim-shell_test/apdu/test_apdu_scp02.template
Philipp Maier 852eff54df 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.

As this patch also touches the low level interface to readers it was also
manually tested with a classic serial reader. Calypso and AT command readers
were not tested.

Change-Id: I8b56d7804a2b4c392f43f8540e0b6e70001a8970
Related: OS#6367
2024-11-19 10:56:26 +01:00

26 lines
1.0 KiB
Plaintext

set debug true
set echo true
set apdu_trace true
set apdu_strict true
# Establish secure channel:
select ADF.ISD
establish_scp02 --key-provider-suffix 1 --key-ver 112 --security-level $SEC_LEVEL
# Case #1: (get status with no data field to mimic a case #1 APDU)
# No command data field, No response data field present
apdu 80F22002 --expect-sw 6a80 --expect-response-regex '^$$'
# Case #2: (get data)
# No command data field, Response data field present
apdu 80ca006600 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$$'
# Case #3: (get status with wrong parameters to mimic a case #3 APDU)
# Command data field present, No response data field
apdu 80F220020a4f0212345c054f9f70c5 --expect-sw 6a80 --expect-response-regex '^$$'
# Case #4: (initialize update, to mimic a case #4 APDU, this will unfortunately kill the session but we are done anyway)
# Command data field present, Response data field present
apdu 805000000855baa7eca1cd629e00 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$$'
release_scp