aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey/stick10_commands_0.8.h
diff options
context:
space:
mode:
Diffstat (limited to 'libnitrokey/stick10_commands_0.8.h')
-rw-r--r--libnitrokey/stick10_commands_0.8.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnitrokey/stick10_commands_0.8.h b/libnitrokey/stick10_commands_0.8.h
index 4614f16..9477890 100644
--- a/libnitrokey/stick10_commands_0.8.h
+++ b/libnitrokey/stick10_commands_0.8.h
@@ -322,7 +322,9 @@ namespace nitrokey {
};
uint8_t temporary_admin_password[25];
- bool isValid() const { return numlock < 2 && capslock < 2 && scrolllock < 2 && enable_user_password < 2; }
+ static constexpr uint8_t special_HOTP_slots = 3;
+ bool isValid() const { return numlock < special_HOTP_slots && capslock < special_HOTP_slots
+ && scrolllock < special_HOTP_slots && enable_user_password < 2; }
std::string dissect() const {
std::stringstream ss;