Added basic multivendor support for token information.

This commit is contained in:
Alessio Di Mauro
2015-07-03 17:23:16 +02:00
parent 2b2fe1f9fa
commit f95c6f2f2d
7 changed files with 154 additions and 13 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "vendors.h"
#include "yubico.h"
vendor_id_t get_vendor_id(char *vendor_name) {
vendor_id_t vid;
if (strncmp(vendor_name, "Yubico", 6) == 0)
return YUBICO;
return UNKNOWN;
}
vendor_t get_vendor(vendor_id_t vid) {
vendor_t v;
switch (vid) {
case YUBICO:
v.get_version = YUBICO_get_version;
break;
case UNKNOWN:
v.get_version = NULL;
}
return v;
}