mirror of https://gerrit.osmocom.org/pysim
SJA5: EF.USIM_AUTH_KEY: Display / enforce proper length TUAK K
The K value in case of TUAK can be 16 or 32 bytes long. We used to permit/parse/display 32 bytes even if only 16 bytes was configured. Let's enforce the correct length of "K". Fixes: OS#6053 Change-Id: Ia0f9a2138f16dce72f3118001e95baa1c80f23ce
This commit is contained in:
parent
7ec822373e
commit
19b4a971e9
|
@ -207,7 +207,7 @@ class EF_USIM_AUTH_KEY(TransparentEF):
|
|||
'tuak_cfg'/TuakCfgByte,
|
||||
'num_of_keccak_iterations'/Int8ub,
|
||||
'op_opc'/HexAdapter(Bytes(32)),
|
||||
'k'/HexAdapter(Bytes(32)))
|
||||
'k'/HexAdapter(Bytes(this.cfg.key_length//8)))
|
||||
|
||||
def _decode_bin(self, raw_bin_data: bytearray) -> dict:
|
||||
if raw_bin_data[0] & 0x0F == 0x06:
|
||||
|
|
Loading…
Reference in New Issue