diff --git a/src/pcsc.hxx b/src/pcsc.hxx index f9d6e29..0f1cb14 100644 --- a/src/pcsc.hxx +++ b/src/pcsc.hxx @@ -486,13 +486,20 @@ namespace pcsc { @returns list of readers that contain @c atr in their ATR */ static Strings getReadersWithAtr(const std::string& atr, Scope s=USER, bool exceptions=true) { + CRYPTOLOG("getting all readers with atr: "<status().atr).find(atr)!=string::npos) - res.push_back(*it); + it!=readers.end(); ++it) + try { + if (crypto::hex(c.reader(*it)->status().atr).find(atr) + !=string::npos) + CRYPTOLOG("found reader: "<<*it); + res.push_back(*it); + } catch (std::exception& x) { // ignore unusable readers + CRYPTOLOG("ignored unusable reader: "<