frankmorgner / vsmartcard

umbrella project for emulation of smart card readers or smart cards
http://frankmorgner.github.io/vsmartcard/
712 stars 200 forks source link

allow feature query for maximum APDU size #245

Closed swissbit-csteuer closed 1 year ago

swissbit-csteuer commented 1 year ago

If the reader's maximum APDU size (dwMaxAPDUDataSize) cannot be queried the client application must assume that only short APDUs are supported. Since there is no data size limit for virtual smart card communication dwMaxAPDUDataSize can be set to the maximum APDU size of 65536 (extended APDUs).

frankmorgner commented 1 year ago

and please use the curly braces on the same line as the if statement

swissbit-csteuer commented 1 year ago

Thanks for reviewing the PR.

please import reader.h from ccid-1.3.11 as published by Apple to virtualsmartcard/MacOSX and #include <reader.h> in ifd-vpcd.c instead of copying its contents.

The rest of the changes look good.

The file from the apple page is a bit dated and does not contain the FEATURE_GET_TLV_PROPERTIES definition. I took the file from the PCSC repository instead and put it into virtualsmartcard/src/pcsclite-vpcd/PCSC/.

and please use the curly braces on the same line as the if statement

done

frankmorgner commented 1 year ago

I've merged the changes to master with a minor change in the includes. I've also updated ifdhandler.h in pcsclite-vpcd to 1.9.9 and copied header files from macOS Sierra's CCID driver to virtualsmartcard/MacOSX