<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17458">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sysmoISIM-SJA2: Add suport for USIM-only and ISIM-only cards<br><br>When pysim-prog programms the application specific files of ISIM and<br>USIM it selects the application by its AID first. If depending on the<br>card profile one of the applications is missing the selection of the<br>related ADF will fail. Lets check the presence of the AID first and if<br>it is not present lets skip the programming of the related files.<br><br>Change-Id: I0eec6ed244320fcd4dc410b6fab20df9c64ff906<br>Related: SYS#4817<br>---<br>M pySim/cards.py<br>1 file changed, 12 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/17458/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 0f84834..a872ee0 100644</span><br><span>--- a/pySim/cards.py</span><br><span>+++ b/pySim/cards.py</span><br><span>@@ -1054,20 +1054,22 @@</span><br><span>                 # update EF-USIM_AUTH_KEY in ADF.ISIM</span><br><span>                self._scc.select_file(['3f00'])</span><br><span>              aid = self.read_aid(isim = True)</span><br><span style="color: hsl(0, 100%, 40%);">-                self._scc.select_adf(aid)</span><br><span style="color: hsl(0, 100%, 40%);">-               if p.get('ki'):</span><br><span style="color: hsl(0, 100%, 40%);">-                 self._scc.update_binary('af20', p['ki'], 1)</span><br><span style="color: hsl(0, 100%, 40%);">-             if p.get('opc'):</span><br><span style="color: hsl(0, 100%, 40%);">-                        self._scc.update_binary('af20', p['opc'], 17)</span><br><span style="color: hsl(120, 100%, 40%);">+         if (aid):</span><br><span style="color: hsl(120, 100%, 40%);">+                     self._scc.select_adf(aid)</span><br><span style="color: hsl(120, 100%, 40%);">+                     if p.get('ki'):</span><br><span style="color: hsl(120, 100%, 40%);">+                               self._scc.update_binary('af20', p['ki'], 1)</span><br><span style="color: hsl(120, 100%, 40%);">+                   if p.get('opc'):</span><br><span style="color: hsl(120, 100%, 40%);">+                              self._scc.update_binary('af20', p['opc'], 17)</span><br><span> </span><br><span>            # update EF-USIM_AUTH_KEY in ADF.USIM</span><br><span>                self._scc.select_file(['3f00'])</span><br><span>              aid = self.read_aid()</span><br><span style="color: hsl(0, 100%, 40%);">-           self._scc.select_adf(aid)</span><br><span style="color: hsl(0, 100%, 40%);">-               if p.get('ki'):</span><br><span style="color: hsl(0, 100%, 40%);">-                 self._scc.update_binary('af20', p['ki'], 1)</span><br><span style="color: hsl(0, 100%, 40%);">-             if p.get('opc'):</span><br><span style="color: hsl(0, 100%, 40%);">-                        self._scc.update_binary('af20', p['opc'], 17)</span><br><span style="color: hsl(120, 100%, 40%);">+         if (aid):</span><br><span style="color: hsl(120, 100%, 40%);">+                     self._scc.select_adf(aid)</span><br><span style="color: hsl(120, 100%, 40%);">+                     if p.get('ki'):</span><br><span style="color: hsl(120, 100%, 40%);">+                               self._scc.update_binary('af20', p['ki'], 1)</span><br><span style="color: hsl(120, 100%, 40%);">+                   if p.get('opc'):</span><br><span style="color: hsl(120, 100%, 40%);">+                              self._scc.update_binary('af20', p['opc'], 17)</span><br><span> </span><br><span>            return</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17458">change 17458</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/+/17458"/><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: I0eec6ed244320fcd4dc410b6fab20df9c64ff906 </div>
<div style="display:none"> Gerrit-Change-Number: 17458 </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>