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:
Christina Quast
2015-06-19 13:24:29 +02:00
parent ebd0fa9d43
commit a929bc8850

View File

@@ -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))