mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
ccid_raw.py: SendTransmit: Pass list instead of array
SCardTransmit expects the last function parameter cmd (the bytes to be send) to be of type list, but we pass a binary array to send_receive_cmd. Therefore, the cmd array has to be converted using its function tolist().
This commit is contained in:
@@ -71,7 +71,7 @@ class SmartcardConnection:
|
||||
def send_receive_cmd(self, cmd):
|
||||
print("Cmd to SIM: " + HEX(cmd))
|
||||
hresult, resp = SCardTransmit(self.hcard, self.dwActiveProtocol,
|
||||
cmd)
|
||||
cmd.tolist())
|
||||
if hresult != SCARD_S_SUCCESS:
|
||||
raise SmartcardException('Failed to transmit: ' +
|
||||
SCardGetErrorMessage(hresult))
|
||||
|
||||
Reference in New Issue
Block a user