mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-22 21:38:35 +03:00
commands: get rid of cla4lchan
The send_apdu* methods now support lchan patching, so there is no longer a need for computing the class byte manually (which is prone get forgotten) before calling a send_apdu*. It is now enough to supply an APDU that has a class byte with the default channel selected. This also means we do not need cla4lchan anymore, so let's restruture the code and get rid of it completely. Related: OS#6531 Change-Id: Ia795f3c16a8875484fce3b44e61497d5aa52b447
This commit is contained in:
@@ -322,7 +322,7 @@ class CardApplicationISDR(pySim.global_platform.CardApplicationSD):
|
||||
def store_data(scc: SimCardCommands, tx_do: Hexstr, exp_sw: SwMatchstr ="9000") -> Tuple[Hexstr, SwHexstr]:
|
||||
"""Perform STORE DATA according to Table 47+48 in Section 5.7.2 of SGP.22.
|
||||
Only single-block store supported for now."""
|
||||
capdu = '%sE29100%02x%s' % (scc.cla4lchan('80'), len(tx_do)//2, tx_do)
|
||||
capdu = '80E29100%02x%s' % (len(tx_do)//2, tx_do)
|
||||
return scc.send_apdu_checksw(capdu, exp_sw)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user