Files
pysim-local/tests/pySim-shell_test/card_init/test_card_init.script
Philipp Maier 385d4407da 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
2024-11-19 10:56:26 +01:00

30 lines
987 B
Plaintext

set debug true
set echo true
# In this test we start without initializing any card profile. In this situation
# only the "apdu" command and the "reset" command will work.
# Select a file deep in the file system using APDUs only
apdu 00a40004023f0000 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$'
apdu 00a4040410a0000000871002ffffffff890709000000 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$'
apdu 00a40004026f0700 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$'
# Try a reset
reset
# If the reset had an effect, selecting a file at MF level should work
apdu 00a40004022fe200 --expect-sw 9000 --expect-response-regex '^[a-fA-F0-9]+$'
# Equip the card, this will do the profile initialization. After this,
# pySim-shell commands should work normally.
equip
# Select a file deep in the file system
select MF/ADF.USIM/EF.IMSI
# Try again to reset the card
reset
# If the reset had an effect, selecting a file at MF level should work
select EF.ICCID