Change in pysim[master]: commands, ts_102_221: replace pytlv with uttlv

laforge gerrit-no-reply at lists.osmocom.org
Sat Mar 27 18:37:23 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/23483 )

Change subject: commands, ts_102_221: replace pytlv with uttlv
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/pysim/+/23483/3/pySim/commands.py 
File pySim/commands.py:

https://gerrit.osmocom.org/c/pysim/+/23483/3/pySim/commands.py@36 
PS3, Line 36: 		from u
there's at least 5 instances of "... = TLV() tag_size=1, len_size=1" in the code.  That's copy+paste and it will only grow more.

WE could simply inherit our own class from TLV() and set the right kind of defaults.

btw: tag_size=1 is default in uttlv, so we can skip it

Finally, even while uttlv might be much nicer: I doubt it really implements the BER-TLV semantics that are required in many parts of smart cards.  For example, the length is not a fixed one byte length, but it's a variable-length length field.

So sooner or later we will have to (write if we cannot find) and switch to a proper implementation that really implements what we require.  WE shoud study tools like cyberflex-shell, mitshell, pycrate, etc. and see if there really isn't anything that implements what's needed.



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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I971b818836aff2fbeb6769f819d496cee4bfa7cf
Gerrit-Change-Number: 23483
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Comment-Date: Sat, 27 Mar 2021 18:37:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210327/f7654f6d/attachment.htm>


More information about the gerrit-log mailing list