Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHSetProtocol(): negotiate PTS also for the backup protocol
If the first call to IFDSetPTS() fails with IFD_PROTOCOL_NOT_SUPPORTED or IFD_ERROR_NOT_SUPPORTED and another protocol can be negotiated then we call IFDSetPTS() with this second/backup protocol instead of doing nothing. This allows the driver to correctly configure the reader with the selected protocol. This happens if a card supports both T=0 and T=1, the application uses SCARD_PROTOCOL_ANY but the reader only supports T=0. 1. The first protocol tried is T=1 (preferred over T=0). 2. If the T=1 PTS negotiation fails then we try T=0. 3. If the T=0 PTS negotiation fails then we report an error. The step 3 was missing.
- Loading branch information