Change in pysim[master]: commands, ts_102_221: replace pytlv with uttlv
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:
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-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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log