saip-tool: Fix output of TAR values in "print" subcommand

Change-Id: Ifba1048e3000829d54769b0420f5134e2f9b04e1
This commit is contained in:
Harald Welte
2024-07-14 13:08:58 +02:00
committed by laforge
parent 5fdfa1463e
commit 23dd13542e

View File

@@ -197,11 +197,13 @@ def do_info(pes: ProfileElementSequence, opts):
print("Number of RFM instances: %u" % len(rfms)) print("Number of RFM instances: %u" % len(rfms))
for rfm in rfms: for rfm in rfms:
inst_aid = rfm.decoded['instanceAID'] inst_aid = rfm.decoded['instanceAID']
print("RFM instanceAID: %s (-> TAR: %s)" % (b2h(inst_aid), b2h(inst_aid[-3:]))) print("RFM instanceAID: %s" % b2h(inst_aid))
print("\tMSL: 0x%02x" % rfm.decoded['minimumSecurityLevel'][0]) print("\tMSL: 0x%02x" % rfm.decoded['minimumSecurityLevel'][0])
adf = rfm.decoded.get('adfRFMAccess', None) adf = rfm.decoded.get('adfRFMAccess', None)
if adf: if adf:
print("\tADF AID: %s" % b2h(adf['adfAID'])) print("\tADF AID: %s" % b2h(adf['adfAID']))
for tar in rfm.decoded['tarList']:
print("\tTAR: %s" % b2h(tar))
def do_extract_apps(pes:ProfileElementSequence, opts): def do_extract_apps(pes:ProfileElementSequence, opts):
apps = pes.pe_by_type.get('application', []) apps = pes.pe_by_type.get('application', [])