global_platform: Correctly decode Key Information Data

The list contains tuples of (key_type, key_length). Let's fix that.

Change-Id: Icf367827d62ed67afa27ee3d0ba9d5cd5bc65c99
This commit is contained in:
Harald Welte
2023-12-23 21:01:39 +01:00
committed by laforge
parent ee6a951774
commit 2538dd7621

View File

@@ -95,8 +95,9 @@ KeyType = Enum(Byte, des=0x80,
# c0 04 02038010
# c0 04 03038010
class KeyInformationData(BER_TLV_IE, tag=0xc0):
KeyTypeLen = Struct('type'/KeyType, 'length'/Int8ub)
_construct = Struct('key_identifier'/Byte, 'key_version_number'/Byte,
'key_types'/GreedyRange(KeyType))
'key_types'/GreedyRange(KeyTypeLen))
class KeyInformation(BER_TLV_IE, tag=0xe0, nested=[KeyInformationData]):
pass