Change in pysim[master]: pySim-read.py: Add ability to read by AID with correct CLA, P1 and P2...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Apr 26 10:48:52 UTC 2020


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17880 )

Change subject: pySim-read.py: Add ability to read by AID with correct CLA, P1 and P2 bytes
......................................................................


Patch Set 1:

> Yes, without this commit, it was not possible to select an AID on Sysmocom ISIM and USIM (also any operation related to USIM/ISIM AID) as pySim was throwing various forms 6Exx or 6Axx errors. Yeah are right about SIM being classic SIM (0xA0) or an UICC (0x00), I think the commit message here may be a bit misleading.

To be specific: Without chaging the CLA and possibly P1/P2 it was not possible.

> Also, this commit was inspired by the implementation in sysmo-usim-tool, which uses the same CLA, P1 and P2 to read a USIM.

I'm not saying the choice of CLA/P1/P2 is wrong.  I'm saying your conditions are wrong.

The standard approach - AFAIK - is to always use CLA=00 for the first APDU talking to the card.  If it returns an error that CLA is unsupported, you know it's not an UICC and hence only a classic SIM.

So my suggestion would be to follow this approach.  It is much more generic and doesn't rely on very specific AIDs of ISIM or USIM.  It will even work with HPSIM, TSIM, ....

You also don't need to reset the card if you do it that way.


-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/17880
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ifea328eff3a381d7b82118e22d2bc0ec5f8a87e4
Gerrit-Change-Number: 17880
Gerrit-PatchSet: 1
Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-CC: guilly at gmail.com <guilly at gmail.com>
Gerrit-CC: laforge <laforge at osmocom.org>
Gerrit-Comment-Date: Sun, 26 Apr 2020 10:48:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200426/3519d53a/attachment.htm>


More information about the gerrit-log mailing list