Skip to content

Commit

Permalink
Merge 1618b3f into ba51b70
Browse files Browse the repository at this point in the history
  • Loading branch information
cheriimoya committed Nov 4, 2020
2 parents ba51b70 + 1618b3f commit db09773
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions smartcard/pcsc/PCSCCardConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def doTransmit(self, bytes, protocol=None):
dictProtocolHeader[pcscprotocolheader] + '. ' + \
SCardGetErrorMessage(hresult))

if len(response) < 2:
raise CardConnectionException(
'Card returned no valid response')

sw1 = (response[-2] + 256) % 256
sw2 = (response[-1] + 256) % 256

Expand Down

0 comments on commit db09773

Please sign in to comment.