diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2020-07-28 13:21:33 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2020-07-28 13:21:33 +0200 |
commit | 882bdd78f217b994066b78e21f9c64fd396206cc (patch) | |
tree | bf6a9d70aca43ecd0eb4e5731ccd50b92989c74b /NitrokeyManager.cc | |
parent | 24221fd2acd211e19c13515cc1f121cc5951445b (diff) | |
download | libnitrokey-882bdd78f217b994066b78e21f9c64fd396206cc.tar.gz libnitrokey-882bdd78f217b994066b78e21f9c64fd396206cc.tar.bz2 |
Move missing auth function to OTP unit
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r-- | NitrokeyManager.cc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index fa12a5e..0d566d2 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -20,6 +20,7 @@ */ #include "libnitrokey/NitrokeyManager.h" +#include "NitrokeyManager.h" #include "NitrokeyManagerOTP.h" #include "NitrokeyManagerPWS.h" #include "libnitrokey/LibraryException.h" @@ -41,19 +42,6 @@ namespace nitrokey{ using nitrokey::misc::strcpyT; - - // package type to auth, auth type [Authorize,UserAuthorize] - template <typename S, typename A, typename T> - void NitrokeyManager::authorize_packet(T &package, const char *admin_temporary_password, shared_ptr<Device> device){ - if (!is_authorization_command_supported()){ - LOG("Authorization command not supported, skipping", Loglevel::WARNING); - } - auto auth = get_payload<A>(); - strcpyT(auth.temporary_password, admin_temporary_password); - auth.crc_to_authorize = S::CommandTransaction::getCRC(package); - A::CommandTransaction::run(device, auth); - } - shared_ptr <NitrokeyManager> NitrokeyManager::_instance = nullptr; NitrokeyManager::NitrokeyManager() : device(nullptr) |