mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-25 14:58:33 +03:00
pySim/commands: Fix envelope command APDU case after T=1 support
When we merged I8b56d7804a2b4c392f43f8540e0b6e70001a8970 for T=1 support, the ENVELOPE C-APDU was not adjusted to reflect the correct case. ENVELOPE expects a response and hence needs a Le byte present. This avoids below related message when performing e.g. OTA via SMS Warning: received unexpected response data, incorrect APDU-case (3, should be 4, missing Le field?)! Change-Id: Ice12675e02aa5438cf9f069f8fcc296c64aabc5a Related: OS#6367
This commit is contained in:
@@ -735,7 +735,7 @@ class SimCardCommands:
|
|||||||
Args:
|
Args:
|
||||||
payload : payload as hex string
|
payload : payload as hex string
|
||||||
"""
|
"""
|
||||||
return self.send_apdu_checksw('80c20000%02x%s' % (len(payload)//2, payload), apply_lchan = False)
|
return self.send_apdu_checksw('80c20000%02x%s' % (len(payload)//2, payload) + "00", apply_lchan = False)
|
||||||
|
|
||||||
def terminal_profile(self, payload: Hexstr) -> ResTuple:
|
def terminal_profile(self, payload: Hexstr) -> ResTuple:
|
||||||
"""Send TERMINAL PROFILE to card
|
"""Send TERMINAL PROFILE to card
|
||||||
|
|||||||
Reference in New Issue
Block a user