diff --git a/virtualsmartcard/src/vpcd/ifd.c b/virtualsmartcard/src/vpcd/ifd.c index 3ec9cfc..a9ca1c0 100644 --- a/virtualsmartcard/src/vpcd/ifd.c +++ b/virtualsmartcard/src/vpcd/ifd.c @@ -3,8 +3,11 @@ #include -/* XXX see bug #312749 on https://alioth.debian.org/projects/pcsclite/ */ -/*#define IFDHANDLERv2*/ +/* XXX see bug #312749 on https://alioth.debian.org/projects/pcsclite/ + * should use the right reader.conf, but pcscd older than r5294 will throw an + * error with the new configuration + * */ +#define IFDHANDLERv2 #include #include @@ -141,8 +144,11 @@ IFDHPowerICC (DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength) return IFD_COMMUNICATION_ERROR; } + /* XXX see bug #312754 on https://alioth.debian.org/projects/pcsclite */ +#if 0 *AtrLength = 0; +#endif return IFD_SUCCESS; case IFD_POWER_UP: if (vicc_poweron() < 0) { @@ -161,11 +167,6 @@ IFDHPowerICC (DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength) return IFD_NOT_SUPPORTED; } - /* XXX this is a workaround - * pcscd should normally set the length to the number of bytes in Atr */ - if (!*AtrLength) - *AtrLength = MAX_ATR_SIZE; - return IFDHGetCapabilities (Lun, TAG_IFD_ATR, AtrLength, Atr); }