aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/NitrokeyManager.h5
-rw-r--r--include/stick10_commands.h12
2 files changed, 9 insertions, 8 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index d9844c9..6f65324 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -50,8 +50,8 @@ namespace nitrokey {
void lock_device();
const char *get_password_safe_slot_name(uint8_t slot_number, const char *temporary_password);
- const char *get_password_safe_slot_password(uint8_t slot_number);
- const char *get_password_safe_slot_login(uint8_t slot_number);
+ const char *get_password_safe_slot_password(uint8_t slot_number, const char *temporary_password);
+ const char *get_password_safe_slot_login(uint8_t slot_number, const char *temporary_password);
private:
NitrokeyManager();
@@ -67,6 +67,7 @@ namespace nitrokey {
uint8_t get_internal_slot_number_for_totp(uint8_t slot_number) const;
bool erase_slot(uint8_t slot_number);
uint8_t *get_slot_name(uint8_t slot_number) const;
+
};
}
diff --git a/include/stick10_commands.h b/include/stick10_commands.h
index d350044..92bddd5 100644
--- a/include/stick10_commands.h
+++ b/include/stick10_commands.h
@@ -376,7 +376,7 @@ class GetPasswordSafeSlotName : Command<CommandID::GET_PW_SAFE_SLOT_NAME> {
bool isValid() const { return !(slot_number & 0xF0); }
std::string dissect() const {
std::stringstream ss;
- ss << "slot_number\t" << slot_number << std::endl;
+ ss << "slot_number\t" << (int)slot_number << std::endl;
return ss.str();
}
} __packed;
@@ -387,7 +387,7 @@ class GetPasswordSafeSlotName : Command<CommandID::GET_PW_SAFE_SLOT_NAME> {
bool isValid() const { return true; }
std::string dissect() const {
std::stringstream ss;
- ss << " slot_name\t" << slot_name << std::endl;
+ ss << " slot_name\t" << (char*)slot_name << std::endl;
return ss.str();
}
} __packed;
@@ -405,7 +405,7 @@ class GetPasswordSafeSlotPassword
bool isValid() const { return !(slot_number & 0xF0); }
std::string dissect() const {
std::stringstream ss;
- ss << " slot_number\t" << slot_number << std::endl;
+ ss << " slot_number\t" << (int)slot_number << std::endl;
return ss.str();
}
} __packed;
@@ -416,7 +416,7 @@ class GetPasswordSafeSlotPassword
bool isValid() const { return true; }
std::string dissect() const {
std::stringstream ss;
- ss << " slot_password\t" << slot_password << std::endl;
+ ss << " slot_password\t" << (char*)slot_password << std::endl;
return ss.str();
}
} __packed;
@@ -434,7 +434,7 @@ class GetPasswordSafeSlotLogin
bool isValid() const { return !(slot_number & 0xF0); }
std::string dissect() const {
std::stringstream ss;
- ss << " slot_number\t" << slot_number << std::endl;
+ ss << " slot_number\t" << (int)slot_number << std::endl;
return ss.str();
}
} __packed;
@@ -445,7 +445,7 @@ class GetPasswordSafeSlotLogin
bool isValid() const { return true; }
std::string dissect() const {
std::stringstream ss;
- ss << " slot_login\t" << slot_login << std::endl;
+ ss << " slot_login\t" << (char*)slot_login << std::endl;
return ss.str();
}
} __packed;