mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-24 14:28:32 +03:00
fix SimCardCommands.run_gsm(): always use CLA=0xa0
Depending on the card type (SIM or USIM/ISUM), self.cla_byte may be either 0xa0 or 0x00. Sending RUN GSM ALGORITHM with CLA=0x00 fails with SW=6985 (Command not allowed), so let's make sure that we always use CLA=0xa0 regardless of the card type. Change-Id: Ia0abba136dbd4cdea8dbbc3c4d6abe12c2863680
This commit is contained in:
@@ -407,7 +407,7 @@ class SimCardCommands:
|
|||||||
if len(rand) != 32:
|
if len(rand) != 32:
|
||||||
raise ValueError('Invalid rand')
|
raise ValueError('Invalid rand')
|
||||||
self.select_path(['3f00', '7f20'])
|
self.select_path(['3f00', '7f20'])
|
||||||
return self._tp.send_apdu(self.cla_byte + '88000010' + rand)
|
return self._tp.send_apdu('a0' + '88000010' + rand)
|
||||||
|
|
||||||
def authenticate(self, rand: str, autn: str, context='3g'):
|
def authenticate(self, rand: str, autn: str, context='3g'):
|
||||||
"""Execute AUTHENTICATE (USIM/ISIM).
|
"""Execute AUTHENTICATE (USIM/ISIM).
|
||||||
|
|||||||
Reference in New Issue
Block a user