From 9600daa8ffc8a0d727808fcb561911eed6dc0bfb Mon Sep 17 00:00:00 2001 From: onlykey Date: Fri, 4 Nov 2022 12:34:45 -0400 Subject: [PATCH] release testing --- OnlyKey/OnlyKey.ino | 21 +++++++++++---------- usb_keyboard.c | 5 +++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/OnlyKey/OnlyKey.ino b/OnlyKey/OnlyKey.ino index a4295a8..e62c10e 100644 --- a/OnlyKey/OnlyKey.ino +++ b/OnlyKey/OnlyKey.ino @@ -78,10 +78,10 @@ /*************************************/ //Firmware Build Options /*************************************/ -//#define DEBUG //Enable Serial Monitor, debug firmware +#define DEBUG //Enable Serial Monitor, debug firmware #define STD_VERSION //Define for STD edition firmare, undefine for IN TRVL edition firmware #define OK_Color //Define for hardware with color LED -#define FACTORYKEYS2 // Attestation key and other keys encrypted using CHIP ID and RNG for unique per device +//#define FACTORYKEYS2 // Attestation key and other keys encrypted using CHIP ID and RNG for unique per device #ifndef STD_VERSION #undef FACTORYKEYS2 #endif @@ -423,20 +423,21 @@ void setup() { fadeout(); #endif SoftTimer.add(&taskKey); + + if (!initcheck) { + //Default set to no challenge code required for OnlyKey Agent + //User can enable challenge code in OnlyKey app preferences + derived_key_challenge_mode = 1; + stored_key_challenge_mode = 1; + okeeprom_eeset_derived_key_challenge_mode(&derived_key_challenge_mode); + okeeprom_eeset_stored_key_challenge_mode(&stored_key_challenge_mode); + } if (onlykeyhw==OK_HW_DUO) { - if (!initcheck) { - //Default no challenge code required for DUO - derived_key_challenge_mode = 1; - stored_key_challenge_mode = 1; - okeeprom_eeset_derived_key_challenge_mode(&derived_key_challenge_mode); - okeeprom_eeset_stored_key_challenge_mode(&stored_key_challenge_mode); - } if (initialized == true && password.profile1hashevaluate()) { payload(10); } } - } extern elapsedMillis idletimer; diff --git a/usb_keyboard.c b/usb_keyboard.c index 308d17e..7c574dc 100644 --- a/usb_keyboard.c +++ b/usb_keyboard.c @@ -505,6 +505,11 @@ static void usb_keyboard_release_key(uint8_t key, uint8_t modifier) keyboard_modifier_keys &= ~modifier; send_required = 1; usb_keyboard_send(); + // SEND MODKEY MULTIPLE TIMES + usb_keyboard_send(); + usb_keyboard_send(); + usb_keyboard_send(); + usb_keyboard_send(); } } if (key) {