--- pcsc-lite-1.5.2/src/winscard.c.orig 2009-02-06 09:46:20.000000000 +0100 +++ pcsc-lite-1.5.2/src/winscard.c 2009-04-02 22:54:43.137718835 +0200 @@ -430,6 +430,12 @@ { (void)SYS_MutexUnLock(rContext->mMutex); + /* + * If it is set to ANY let it do any of the protocols + */ + if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD) + dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1; + if (! (dwPreferredProtocols & rContext->readerState->cardProtocol)) return SCARD_E_PROTO_MISMATCH; } @@ -758,6 +764,12 @@ { (void)SYS_MutexUnLock(rContext->mMutex); + /* + * If it is set to ANY let it do any of the protocols + */ + if (dwPreferredProtocols & SCARD_PROTOCOL_ANY_OLD) + dwPreferredProtocols = SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1; + if (! (dwPreferredProtocols & rContext->readerState->cardProtocol)) return SCARD_E_PROTO_MISMATCH; }