summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-11-17 18:53:34 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-11-17 18:53:34 +0100
commit4a83714253a6dee42bb0b27abcf9fb9ffcc6906f (patch)
treeb5de51fc1067df8537aa9c5f01a7d38e76ad9861
parent3aa7180202aeae701a61331619e51888082f19fb (diff)
Add winscard emul backend
-rw-r--r--vcard_emul_winscard.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/vcard_emul_winscard.c b/vcard_emul_winscard.c
new file mode 100644
index 0000000..7d95f2f
--- /dev/null
+++ b/vcard_emul_winscard.c
@@ -0,0 +1,68 @@
+/*
+ * WinSCard vcard emul
+ *
+ * Copyright (c) 2012 Red Hat.
+ * Written by Marc-André Lureau <marcandre.lureau@redhat.com>.
+ *
+ * This code is licenced under the GNU LGPL, version 2 or later.
+ */
+#include <windows.h>
+
+#include "vcard.h"
+#include "card_7816t.h"
+#include "vcard_emul.h"
+#include "vreader.h"
+#include "vevent.h"
+
+/* return the number of login attempts still possible on the card. if unknown,
+ * return -1 */
+int
+vcard_emul_get_login_count(VCard *card)
+{
+ return -1;
+}
+
+vcard_7816_status_t
+vcard_emul_login(VCard *card, unsigned char *pin, int pin_len)
+{
+ /* map the error from port get error */
+ return VCARD7816_STATUS_ERROR_CONDITION_NOT_SATISFIED;
+}
+
+void
+vcard_emul_get_atr(VCard *card, unsigned char *atr, int *atr_len)
+{
+}
+
+void
+vcard_emul_reset(VCard *card, VCardPower power)
+{
+}
+
+VCardEmulError
+vcard_emul_init(const VCardEmulOptions *options)
+{
+}
+
+VCardEmulError
+vcard_emul_force_card_insert(VReader *vreader)
+{
+ return VCARD_EMUL_FAIL;
+}
+
+VCardEmulError
+vcard_emul_force_card_remove(VReader *vreader)
+{
+ return VCARD_EMUL_FAIL;
+}
+
+VCardEmulOptions *
+vcard_emul_options(const char *args)
+{
+ return NULL;
+}
+
+void
+vcard_emul_usage(void)
+{
+}