From 76b3488829af27ce0e8e0baf2fd9ba64de03f974 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 8 Jul 2024 18:33:43 +0200 Subject: [PATCH] saip-tool: Also dump RFM information in "info" command example output: Number of RFM instances: 2 RFM instanceAID: d276000005aa060200000000b00000 (-> TAR: b00000) MSL: 0x16 RFM instanceAID: d276000005aa060200000000b00001 (-> TAR: b00001) MSL: 0x16 ADF AID: a0000000871002ff33ffff8901010100 Change-Id: I534267c7420fc5bd96eaded6078e986161729073 --- contrib/saip-tool.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contrib/saip-tool.py b/contrib/saip-tool.py index 4a9bec93..d73cc902 100755 --- a/contrib/saip-tool.py +++ b/contrib/saip-tool.py @@ -191,6 +191,18 @@ def do_info(pes: ProfileElementSequence, opts): for key in sd.keys: print("\tKVN=0x%02x, KID=0x%02x, %s" % (key.key_version_number, key.key_identifier, key.key_components)) + # RFM + print() + rfms = pes.pe_by_type.get('rfm', []) + print("Number of RFM instances: %u" % len(rfms)) + for rfm in rfms: + inst_aid = rfm.decoded['instanceAID'] + print("RFM instanceAID: %s (-> TAR: %s)" % (b2h(inst_aid), b2h(inst_aid[-3:]))) + print("\tMSL: 0x%02x" % rfm.decoded['minimumSecurityLevel'][0]) + adf = rfm.decoded.get('adfRFMAccess', None) + if adf: + print("\tADF AID: %s" % b2h(adf['adfAID'])) + def do_extract_apps(pes:ProfileElementSequence, opts): apps = pes.pe_by_type.get('application', []) for app_pe in apps: