<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23535">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pySim-shell: use -a / -A commandline option to authenticate<br><br>pySim-shell defines, just like the other pySim programs commandline<br>arguments that take an ADM pin to authenticate at the card as admin. The<br>arguments are defined, but not used. Add the missing authentication<br>part.<br><br>Change-Id: I6bed14eb8f4124e28d593cf0816dbe58e7271322<br>Related: OS#4963<br>---<br>M pySim-shell.py<br>1 file changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/23535/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 e596d11..41febd6 100755</span><br><span>--- a/pySim-shell.py</span><br><span>+++ b/pySim-shell.py</span><br><span>@@ -339,4 +339,14 @@</span><br><span> </span><br><span>      app = PysimApp(card, rs, opts.script)</span><br><span>        rs.select('MF', app)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        # If the user supplies an ADM PIN at via commandline args authenticate</span><br><span style="color: hsl(120, 100%, 40%);">+        # immediatley so that the user does not have to use the shell commands</span><br><span style="color: hsl(120, 100%, 40%);">+        pin_adm = sanitize_pin_adm(opts.pin_adm, opts.pin_adm_hex)</span><br><span style="color: hsl(120, 100%, 40%);">+    if pin_adm:</span><br><span style="color: hsl(120, 100%, 40%);">+           try:</span><br><span style="color: hsl(120, 100%, 40%);">+                  card.verify_adm(h2b(pin_adm))</span><br><span style="color: hsl(120, 100%, 40%);">+         except Exception as e:</span><br><span style="color: hsl(120, 100%, 40%);">+                        print(e)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   app.cmdloop()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23535">change 23535</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/+/23535"/><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: I6bed14eb8f4124e28d593cf0816dbe58e7271322 </div>
<div style="display:none"> Gerrit-Change-Number: 23535 </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>