<p><a href="https://gerrit.osmocom.org/c/pysim/+/23483">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/23483/3/pySim/commands.py">File pySim/commands.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/23483/3/pySim/commands.py@36">Patch Set #3, Line 36:</a> <code style="font-family:monospace,monospace">            from u</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">WE could simply inherit our own class from TLV() and set the right kind of defaults.</p><p style="white-space: pre-wrap; word-wrap: break-word;">btw: tag_size=1 is default in uttlv, so we can skip it</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23483">change 23483</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/23483"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I971b818836aff2fbeb6769f819d496cee4bfa7cf </div>
<div style="display:none"> Gerrit-Change-Number: 23483 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 27 Mar 2021 18:37:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>