laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/25873
)
Change subject: cards: Make select_adf_by_aid() use prefix AID selection
......................................................................
cards: Make select_adf_by_aid() use prefix AID selection
There is no need for us to expand a partial AID to the full AID before
selecting that ADF. The UICC specifications permit AID selection by
prefix only. So we could pass the prefix to the card, and the card would
do the prefix matching. In order to avoid problems with cards that fail
to do the prefix matching themselves we will still do the AID
completion, but in case we cannot complete the AID (AID not listed in
EF.DIR), we will try with the AID prefix anyway.
>From the API user point of view, this allows us to select applications
not listed in EF.DIR
Change-Id: I0747b4e46ca7e30bd96d76053765080367ac1317
---
M pySim/cards.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/pySim/cards.py b/pySim/cards.py
index a822161..45e44a2 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -308,6 +308,9 @@
aid_full = self._complete_aid(aid)
if aid_full:
return self._scc.select_adf(aid_full)
+ else:
+ # If we cannot get the full AID, try with short
AID
+ return self._scc.select_adf(aid)
return (None, None)
def erase_binary(self, ef):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/25873
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0747b4e46ca7e30bd96d76053765080367ac1317
Gerrit-Change-Number: 25873
Gerrit-PatchSet: 12
Gerrit-Owner: laforge <[email protected]>
Gerrit-Assignee: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged