summaryrefslogtreecommitdiff
path: root/include/NitrokeyManager.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-26 23:35:24 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:57 +0200
commitf5b5339a0cd272b3be33013f01e14f5bcc6e5aa8 (patch)
tree78d21a5736b96c859f02ca51c8c9e87bd3e696b8 /include/NitrokeyManager.h
parent128a98b0f0a4eca879dbf9d6562ab744a36510e8 (diff)
downloadlibnitrokey-f5b5339a0cd272b3be33013f01e14f5bcc6e5aa8.tar.gz
libnitrokey-f5b5339a0cd272b3be33013f01e14f5bcc6e5aa8.tar.bz2
Erasing slot - initial version with some authorization issues
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/NitrokeyManager.h')
-rw-r--r--include/NitrokeyManager.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index 00011e2..e6e79c7 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -17,7 +17,7 @@ namespace nitrokey {
public:
static NitrokeyManager *instance();
- bool authorize(const char *pin, const char *temporary_password);
+ bool first_authenticate(const char *pin, const char *temporary_password);
bool write_HOTP_slot(uint8_t slot_number, const char *slot_name, const char *secret, uint64_t hotp_counter,
const char *temporary_password);
bool write_TOTP_slot(uint8_t slot_number, const char *slot_name, const char *secret,
@@ -27,8 +27,8 @@ namespace nitrokey {
uint8_t last_interval);
bool set_time(uint64_t time);
bool get_time();
- bool erase_totp_slot(uint8_t slot_number);
- bool erase_hotp_slot(uint8_t slot_number);
+ bool erase_totp_slot(uint8_t slot_number, const char *temporary_password);
+ bool erase_hotp_slot(uint8_t slot_number, const char *temporary_password);
bool connect();
bool disconnect();
void set_debug(bool state);
@@ -59,6 +59,8 @@ namespace nitrokey {
void erase_password_safe_slot(uint8_t slot_number);
+ void user_authenticate(const char *user_password, const char *temporary_password);
+
private:
NitrokeyManager();
~NitrokeyManager();
@@ -72,7 +74,7 @@ namespace nitrokey {
bool is_valid_password_safe_slot_number(uint8_t slot_number) const;
uint8_t get_internal_slot_number_for_hotp(uint8_t slot_number) const;
uint8_t get_internal_slot_number_for_totp(uint8_t slot_number) const;
- bool erase_slot(uint8_t slot_number);
+ bool erase_slot(uint8_t slot_number, const char *temporary_password);
uint8_t *get_slot_name(uint8_t slot_number) const;
};