summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-02-14 11:53:25 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:46 +0100
commit6ee68fa294d1d9ab8fa8e61a009845dc31a9b771 (patch)
tree2647e13c34dbffa7827d3c1dfada51a82ba398c9 /NitrokeyManager.cc
parentadbc664125142c434294bfa795666c90c7608429 (diff)
downloadlibnitrokey-6ee68fa294d1d9ab8fa8e61a009845dc31a9b771.tar.gz
libnitrokey-6ee68fa294d1d9ab8fa8e61a009845dc31a9b771.tar.bz2
Compiles on MXE, but not working on Windows
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index a120085..6ce9910 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -397,7 +397,7 @@ namespace nitrokey{
auto payload = get_payload<GetSlotName>();
payload.slot_number = slot_number;
auto resp = GetSlotName::CommandTransaction::run(device, payload);
- return _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) {
@@ -504,7 +504,7 @@ namespace nitrokey{
auto p = get_payload<GetPasswordSafeSlotName>();
p.slot_number = slot_number;
auto response = GetPasswordSafeSlotName::CommandTransaction::run(device, p);
- return _strdup((const char *) response.data().slot_name);
+ return strdup((const char *) response.data().slot_name);
}
bool NitrokeyManager::is_valid_password_safe_slot_number(uint8_t slot_number) const { return slot_number < 16; }
@@ -514,7 +514,7 @@ namespace nitrokey{
auto p = get_payload<GetPasswordSafeSlotLogin>();
p.slot_number = slot_number;
auto response = GetPasswordSafeSlotLogin::CommandTransaction::run(device, p);
- return _strdup((const char *) response.data().slot_login);
+ return strdup((const char *) response.data().slot_login);
}
const char *NitrokeyManager::get_password_safe_slot_password(uint8_t slot_number) {
@@ -522,7 +522,7 @@ namespace nitrokey{
auto p = get_payload<GetPasswordSafeSlotPassword>();
p.slot_number = slot_number;
auto response = GetPasswordSafeSlotPassword::CommandTransaction::run(device, p);
- return _strdup((const char *) response.data().slot_password); //FIXME use secure way
+ return strdup((const char *) response.data().slot_password); //FIXME use secure way
}
void NitrokeyManager::write_password_safe_slot(uint8_t slot_number, const char *slot_name, const char *slot_login,
@@ -724,7 +724,7 @@ namespace nitrokey{
const char * NitrokeyManager::get_status_storage_as_string(){
auto p = stick20::GetDeviceStatus::CommandTransaction::run(device);
- return _strdup(p.data().dissect().c_str());
+ return strdup(p.data().dissect().c_str());
}
stick20::DeviceConfigurationResponsePacket::ResponsePayload NitrokeyManager::get_status_storage(){
@@ -734,7 +734,7 @@ namespace nitrokey{
const char * NitrokeyManager::get_SD_usage_data_as_string(){
auto p = stick20::GetSDCardOccupancy::CommandTransaction::run(device);
- return _strdup(p.data().dissect().c_str());
+ return strdup(p.data().dissect().c_str());
}
int NitrokeyManager::get_progress_bar_value(){