OpenSC/OpenSC — pull request #175 by samm-git (2013-07-23 20:30:17+00:00)
Title: Add ability to ignore card based on it ATR

This patch is intended to add ability to ignore card based on it ATR completely or only for specific app. Below is my usecase:

1. I have number of smartcards and most of them are working fine with OpenSC. I am using smartcards for the website authentification and also for SMIME messaging in Firefox and Thunderbird. Thats why i have opensc-pkcs11.so module connected to NSS.
2. I also do have card to access my online banking. It is using proprietary software. I have found that if FF or Thunderbird are running i am unable to use this app. After some debugging i found that NSS always trying to attach driver to this unsopprted card and keeping it open (INUSE flag). Banking application is not trying to open card while it is in use and also it is using EXCLUSIVE access mode, so it will not work anyway. Also this slows down opensc-pkcs11 because it is always trying to detect driver, etc.
3. This patch allows to deny usage of such unsupported cards for OpenSC. After it it is possible to use my banking software without killing all NSS applications.

Provided sample ATR is a real one, from my banking certificate card.