<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23502">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">commands: improve exception string of verify_chv()<br><br>The execption string in verify_chv() is ADM centric, but since<br>pySim-shell also allows the user to verify a regular chv (PIN), this<br>string also appears when the verify_chv command is used with a wrong<br>PIN. Lets make it more generic and lets also output the CHV number so<br>that the user knows which CHV type was tried.<br><br>Change-Id: I41602de8edd22bea30ac68cb1c41e20ea1e4549c<br>Related: OS#4963<br>---<br>M pySim/commands.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/02/23502/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/commands.py b/pySim/commands.py</span><br><span>index 9aed588..cd045c9 100644</span><br><span>--- a/pySim/commands.py</span><br><span>+++ b/pySim/commands.py</span><br><span>@@ -207,5 +207,5 @@</span><br><span>                 fc = rpad(b2h(code), 16)</span><br><span>             data, sw = self._tp.send_apdu(self.cla_byte + '2000' + ('%02X' % chv_no) + '08' + fc)</span><br><span>                if (sw != '9000'):</span><br><span style="color: hsl(0, 100%, 40%);">-                      raise RuntimeError('Failed to authenticate with ADM key %s, %i tries left.' % (code, int(sw[3])))</span><br><span style="color: hsl(120, 100%, 40%);">+                     raise RuntimeError('Failed to authenticate chv_no 0x%02X with code 0x%s, %i tries left.' % (chv_no, b2h(code).upper(), int(sw[3])))</span><br><span>          return (data,sw)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23502">change 23502</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/+/23502"/><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: I41602de8edd22bea30ac68cb1c41e20ea1e4549c </div>
<div style="display:none"> Gerrit-Change-Number: 23502 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>