summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NitrokeyManager.cc4
-rw-r--r--include/NitrokeyManager.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 6d0a24c..14e31b2 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -204,11 +204,11 @@ namespace nitrokey{
return (const char *) get_slot_name(slot_number);
}
- uint8_t *NitrokeyManager::get_slot_name(uint8_t slot_number) { //FIXME -const s/uint/char:string
+ const char * NitrokeyManager::get_slot_name(uint8_t slot_number) {
auto payload = get_payload<GetSlotName>();
payload.slot_number = slot_number;
auto resp = GetSlotName::CommandTransaction::run(*device, payload);
- return (uint8_t *) strdup((const char *) resp.data().slot_name);
+ return strdup((const char *) resp.data().slot_name);
}
bool NitrokeyManager::first_authenticate(const char *pin, const char *temporary_password) {
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index c362644..19b54bd 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -95,7 +95,7 @@ namespace nitrokey {
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, const char *temporary_password);
- uint8_t *get_slot_name(uint8_t slot_number);
+ const char * get_slot_name(uint8_t slot_number);
template <typename ProCommand, PasswordKind StoKind>
void change_PIN_general(char *current_PIN, char *new_PIN);