mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 02:48:34 +03:00
ISO 7816-4 Section 5.4.3.2 "Expanded Format" permits for nesting
of security conditions using boolean operators OR, AND, NOT.
Let's implement decoding and encoding of these.
An example decoded looks like:
pySIM-shell (MF/EF.ARR)> read_record_decoded 1
[
[
{
"access_mode": [
"activate_file_or_record",
"deactivate_file_or_record",
"update_erase"
]
},
{
"or": [
{
"control_reference_template": "ADM1"
},
{
"control_reference_template": "ADM2"
}
]
}
],
[
{
"access_mode": [
"read_search_compare"
]
},
{
"always": null
}
]
]
Prior to this patch, pySim would raise "ValueError: Unknown Tag 0xa0 in bytearray"
Change-Id: Icb09cf3a90303a86fc77406b8b0806b5c926f1be
Closes: OS#5411