<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9561">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cards: update smsp with fixed record length<br><br>When updating ths spsp then rpad() is used to pad the supplied smsp<br>to 48 bytes length. So the length than update_record will dreive is<br>always the same.<br><br>the method update_record() will then do a select_file() and will<br>use the response to determine the record length from the response.<br>Then this length is used in the APDU that is sent to the card.<br><br>However, the record size is fixed since it is gets padded to a<br>hardcoded fixed size but not all cards (USIM?) seem to return the<br>record length with their response so we should set the force_len flag<br>in order to cover also those cases.<br><br>Change-Id: Iea078f8171b6dbe94bd966807802bc30b5824758<br>Related: SYS#4245<br>---<br>M pySim/cards.py<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/61/9561/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/cards.py b/pySim/cards.py</span><br><span>index 0c9c2b8..a3c4d87 100644</span><br><span>--- a/pySim/cards.py</span><br><span>+++ b/pySim/cards.py</span><br><span>@@ -84,7 +84,7 @@</span><br><span>                 return sw</span><br><span> </span><br><span>        def update_smsp(self, smsp):</span><br><span style="color: hsl(0, 100%, 40%);">-            data, sw = self._scc.update_record(EF['SMSP'], 1, rpad(smsp, 84))</span><br><span style="color: hsl(120, 100%, 40%);">+             data, sw = self._scc.update_record(EF['SMSP'], 1, rpad(smsp, 84), True)</span><br><span>              return sw</span><br><span> </span><br><span>        def read_spn(self):</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9561">change 9561</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/9561"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iea078f8171b6dbe94bd966807802bc30b5824758 </div>
<div style="display:none"> Gerrit-Change-Number: 9561 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>