bertlv_parse_one: Also return remainder after end of TLV

Change-Id: I10ebd87f72ee934561118b768108e5dc76277660
This commit is contained in:
Harald Welte
2021-05-21 21:47:55 +02:00
parent de02718631
commit c1475307c8
3 changed files with 6 additions and 4 deletions

View File

@@ -265,7 +265,7 @@ class PySimCommands(CommandSet):
tags = self._cmd.rs.retrieve_tags()
for t in tags:
result = self._cmd.rs.retrieve_data(t)
(tag, l, val) = bertlv_parse_one(h2b(result[0]))
(tag, l, val, remainer) = bertlv_parse_one(h2b(result[0]))
self._cmd.poutput("set_data 0x%02x %s" % (t, b2h(val)))
else:
raise RuntimeError('Unsupported structure "%s" of file "%s"' % (structure, filename))