Skip to content

Commit

Permalink
_Transmit: use SCARD_PCI_RAW for undefined protocol
Browse files Browse the repository at this point in the history
If the connection to the card/reader was done using SCARD_SHARE_DIRECT
then the card protocol has not been negociated and is undefined.

This is not an error and _Transmit should not fail in this case.
For example this is used to read/write memory cards.

Thanks to Leif Johansson for the bug report.
"T0/T1 marshaling confusion"
#31
  • Loading branch information
LudovicRousseau committed Dec 1, 2016
1 parent 2bb583f commit fa3addb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions smartcard/scard/scard.i
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ static SCARDRETCODE _Transmit(
break;

case SCARD_PROTOCOL_RAW:
case SCARD_PROTOCOL_UNDEFINED:
piorequest=(PSCARD_IO_REQUEST)myg_prgSCardRawPci;
break;

Expand Down

3 comments on commit fa3addb

@leifj
Copy link

@leifj leifj commented on fa3addb Dec 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance this could wind up in a signed release soon(ish) ?

@LudovicRousseau
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is a signed release so important for you?

@leifj
Copy link

@leifj leifj commented on fa3addb Dec 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we have an application that builds from source and I would like to trace as much of it possible back to developers.

Please sign in to comment.