Change in pysim[master]: sysmocom_sja2: Properly decode EF.USIM_SQN freshness

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Oct 16 08:46:14 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/25807 )


Change subject: sysmocom_sja2: Properly decode EF.USIM_SQN freshness
......................................................................

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
---
M pySim/sysmocom_sja2.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/07/25807/1

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 @@
                           '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'):

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/25807
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I53edbcdb40652eb0e2bc4c982cf7b6f7d585cab9
Gerrit-Change-Number: 25807
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211016/4fd1b42b/attachment.htm>


More information about the gerrit-log mailing list