aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-10-16 10:44:23 +0200
committerHarald Welte <laforge@osmocom.org>2021-10-16 10:46:05 +0200
commiteb45838c474c6c1a731bb808058b5037a06d96ea (patch)
treee4f4c162414b7c6e2d7fdf95191530c2c38a3390
parent7a8aa863a649390ddbdba7daad3d434bac4d63f1 (diff)
sysmocom_sja2: Properly decode EF.USIM_SQN freshness
The freshness parameter is not one opaque bytestring, but an array of 6-byte integer values. before: "freshness": "000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" after: "freshness": [ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] Change-Id: I53edbcdb40652eb0e2bc4c982cf7b6f7d585cab9
-rw-r--r--pySim/sysmocom_sja2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py
index 337eca7..263999d 100644
--- a/pySim/sysmocom_sja2.py
+++ b/pySim/sysmocom_sja2.py
@@ -166,7 +166,7 @@ class EF_USIM_SQN(TransparentEF):
'aus_concealed'/Bit, 'autn_concealed'/Bit)
self._construct = Struct('flag1'/Flag1, 'flag2'/Flag2,
'delta_max'/BytesInteger(6), 'age_limit'/BytesInteger(6),
- 'freshness'/HexAdapter(GreedyBytes))
+ 'freshness'/GreedyRange(BytesInteger(6)))
class EF_USIM_AUTH_KEY(TransparentEF):
def __init__(self, fid='af20', name='EF.USIM_AUTH_KEY'):