<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23501">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim-shell: fix verify_chv command<br><br>The verify_chv command passes the code directly to _scc.verify_chv(), but<br>this method accepts bytes not an ascii string. Like with verfy_adm we<br>need to run the code through sanitize_pin_adm() and h2b() first.<br><br>Change-Id: I3a003fc57bcf6c4f0a1ea8142e08b3183e655fad<br>Related: OS#4963<br>---<br>M pySim-shell.py<br>1 file changed, 2 insertions(+), 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/01/23501/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim-shell.py b/pySim-shell.py</span><br><span>index 946b3e5..078a5d3 100755</span><br><span>--- a/pySim-shell.py</span><br><span>+++ b/pySim-shell.py</span><br><span>@@ -109,7 +109,8 @@</span><br><span>    @cmd2.with_argparser(verify_chv_parser)</span><br><span>      def do_verify_chv(self, opts):</span><br><span>               """Verify (authenticate) using specified CHV (PIN)"""</span><br><span style="color: hsl(0, 100%, 40%);">-             (data, sw) = self._cmd.card._scc.verify_chv(opts.chv_nr, opts.code)</span><br><span style="color: hsl(120, 100%, 40%);">+           chv = sanitize_pin_adm(opts.code)</span><br><span style="color: hsl(120, 100%, 40%);">+             (data, sw) = self._cmd.card._scc.verify_chv(opts.chv_nr, h2b(chv))</span><br><span>           self._cmd.poutput(data)</span><br><span> </span><br><span>  dir_parser = argparse.ArgumentParser()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23501">change 23501</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/+/23501"/><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: I3a003fc57bcf6c4f0a1ea8142e08b3183e655fad </div>
<div style="display:none"> Gerrit-Change-Number: 23501 </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>