Files
Philipp Maier 25319c5184 ara_m fix export of AID-REF-DO (empty)
GPD_SPE_013 Table 6-3 defines two types of AID-REF-DO objects (both
are fully independed TLV IEs with the same name). The version with
tag '4F' identifies an SE application. It may contain an AID prefix
or even be of length 0 in case the rule should apply to all SE
applications. Then there is the version with tag 'C0', which must
always have length 0 and serves a flag to apply the rule to the
implicitly selected SE application. Technically both are completely
different things, so we must also treat them separately in the
pySim-shell code.

Related: OS#6681
Change-Id: I771d5e860b12215280e3d0a8c314ce843fe0d6a2
2024-12-11 11:11:44 +01:00

32 lines
1.3 KiB
Plaintext

set debug true
set echo true
# Export existing ARA-M configuration
export --filename ADF.ARA-M > restore_adf_ara_m.script.tmp
# Create a known config in ADF.ARA-M
select ADF.ARA-M
aram_delete_all
aram_store_ref_ar_do --aid ffffffffffaa --device-app-id aa6872787654334567840de535c2bbd5a04f0baa --apdu-never --nfc-never --android-permissions 0000000000000004
aram_store_ref_ar_do --aid ffffffffffbb --device-app-id aa6872f28b340b2345678905d5c2bbd5a04f0bdd --apdu-always --nfc-always --android-permissions 0000000000000004
aram_store_ref_ar_do --aid ffffffffffcc --device-app-id a1234567890aaabb1f140de987657891a04f0bdd --apdu-filter aabbccdd01020304 --nfc-always --android-permissions 0000000000000004
aram_store_ref_ar_do --aid "" --device-app-id a1234567890123bb1f140de987aaa891bbbf0bdd --apdu-filter aabbccdd010203041122334405060708 --nfc-never --android-permissions 0000000000000004
# Export ADF.ARA-M to a temporary script file
export --filename ADF.ARA-M > adf_ara-m.script.tmp
# Ensure ADF.ARA-M is empty
aram_delete_all
# Check that ADF.ARA-M is empty
aram_get_all > adf_ara-m_empty.cfg.tmp
# Run the temporary script file to restore ADF.ARA-M again
run_script adf_ara-m.script.tmp
# Read out ADF.ARA-M using aram_get_all
aram_get_all > adf_ara-m.cfg.tmp
# Restore ARA-M configuration to its original state
run_script restore_adf_ara_m.script.tmp