summaryrefslogtreecommitdiff
path: root/libcacard
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-03-22 20:00:36 +0200
committerAlon Levy <alevy@redhat.com>2012-03-26 18:39:00 +0200
commit6f06f178f96de3597e1098258ab5d11733ae8602 (patch)
tree3129f84a5989cb78c1fcdcfd0e7f220fb4f0a916 /libcacard
parent4e339882362102da63ab060f952d249a99ab6752 (diff)
libcacard/vcard_emul_nss: add warning for old coolkey
Older coolkey versions (before the future fix of RHBZ 802435) have a fake card reader created if no reader is detected during module initialization. Warn libcacard users if the faulty coolkey is detected by checking for the fake reader name "E-Gate 0 0". Signed-off-by: Alon Levy <alevy@redhat.com>
Diffstat (limited to 'libcacard')
-rw-r--r--libcacard/vcard_emul_nss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c
index 3703fdcbe9..802cae3a29 100644
--- a/libcacard/vcard_emul_nss.c
+++ b/libcacard/vcard_emul_nss.c
@@ -1018,6 +1018,16 @@ vcard_emul_init(const VCardEmulOptions *options)
if (slot == NULL || !PK11_IsRemovable(slot) || !PK11_IsHW(slot)) {
continue;
}
+ if (strcmp("E-Gate 0 0", PK11_GetSlotName(slot)) == 0) {
+ /*
+ * coolkey <= 1.1.0-20 emulates this reader if it can't find
+ * any hardware readers. This causes problems, warn user of
+ * problems.
+ */
+ fprintf(stderr, "known bad coolkey version - see "
+ "https://bugzilla.redhat.com/show_bug.cgi?id=802435\n");
+ continue;
+ }
vreader_emul = vreader_emul_new(slot, options->hw_card_type,
options->hw_type_params);
vreader = vreader_new(PK11_GetSlotName(slot), vreader_emul,