]> err.no Git - yubikey-personalization/commitdiff
support for production NEO with new product id and version
authorKlas Lindfors <klas@yubico.com>
Fri, 9 Nov 2012 12:27:09 +0000 (13:27 +0100)
committerKlas Lindfors <klas@yubico.com>
Fri, 9 Nov 2012 12:27:09 +0000 (13:27 +0100)
ykcore/ykcore.c
ykcore/ykdef.h
ykpers.c

index 57702f4cb9f858af9acf748585d7331a5ffaae16..f2f82b8a00ca3da2164661d69e1e63f0c1832710 100644 (file)
@@ -62,6 +62,11 @@ YK_KEY *yk_open_first_key(void)
        YK_KEY *yk = _ykusb_open_device(YUBICO_VID, YUBIKEY_PID);
        int rc = yk_errno;
 
+       if(!yk) {
+               yk = _ykusb_open_device(YUBICO_VID, YUBIKEY_NEO_PID);
+               rc = yk_errno;
+       }
+
        if (yk) {
                YK_STATUS st;
 
@@ -98,7 +103,9 @@ int yk_check_firmware_version(YK_KEY *k)
               (st.versionMinor == 0 ||
                st.versionMinor == 1 ||
                st.versionMinor == 2 ||
-               st.versionMinor == 3)))) {
+               st.versionMinor == 3)) ||
+             (st.versionMajor == 3 &&
+              (st.versionMinor == 0)))) {
                yk_errno = YK_EFIRMWARE;
                return 0;
        }
index 9f82e1169455f22d1918cc4350705c2411393205..a81e9424afaaf052b4bba87c6428551e5d6b52b9 100644 (file)
@@ -27,6 +27,7 @@
 
 #define        YUBICO_VID                              0x1050
 #define        YUBIKEY_PID                             0x0010
+#define        YUBIKEY_NEO_PID                         0x0110
 
 /* Slot entries */
 
index 655a5bd2d1d7ec897ebd80abf5bbd9a745de3a39..c29f69b2af1682995c2312416b976b1e55ad7232 100644 (file)
--- a/ykpers.c
+++ b/ykpers.c
@@ -186,8 +186,8 @@ int ykp_configure_command(YKP_CONFIG *cfg, uint8_t command)
                break;
        case SLOT_NDEF:
                /* NDEF is available for neo, thus within 2.1 from build 4 */
-               if (!(cfg->yk_major_version == 2 && cfg->yk_minor_version == 1 &&
-                         cfg->yk_build_version >= 4)) {
+               if (!((cfg->yk_major_version == 2 && cfg->yk_minor_version == 1 &&
+                         cfg->yk_build_version >= 4) || cfg->yk_major_version == 3)) {
                        ykp_errno = YKP_EYUBIKEYVER;
                        return 0;
                }