aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Extend test case for drop() with authenticated devicesRobin Krahl2018-05-22
| | | | | As Drop is only implemented for UnauthenticatedDevice, it is relevant to test whether it also works if we work on authenticated devices.
* Use drop() instead of disconnect()Robin Krahl2018-05-22
| | | | | | | | Previously, the user had to explicitly call diconnect() to terminate the connection to the Nitrokey. Now NK_logout() is called automatically once the device is out of scope as UnauthenticatedDevice implements Drop. AdminAuthenticatedDevice and UserAuthenticatedDevice do not have to implement Drop, as it will be called recursively.
* Activate tests for unauthorized OTP code generationRobin Krahl2018-05-22
| | | | | | | In a previous commit, we changed get_string_result to only free the string if the operation was successful. Therefore we can re-enable the tests in hotp_pin and totp_pin that cause failing OTP code generation commands.
* Add support for change_admin_pin and change_user_pinRobin Krahl2018-05-22
|
* Add support for erase_hotp_slot and erase_totp_slotRobin Krahl2018-05-22
|
* Correct invalid slot handlingRobin Krahl2018-05-22
| | | | | | | | | | | While the Nitrokey device would generate a WrongSlot error, libnitrokey catches these errors and raises an InvalidSlotException with error code 201. This patch matches this error code to CommandError::InvalidSlot, corrects the documentation and adds test cases. To be able to test a failing OTP generation command, we have to adapt get_string_result to free the string only if successful. This is due to the segfault issue in libnitrokey v3.3 (see todo list).
* Refactor test casesRobin Krahl2018-05-21
|
* Use NK_login_enum instead of NK_loginRobin Krahl2018-05-21
| | | | | | NK_login used a string to identify the model to connect to. Since libnitrokey v3.3, we can use NK_login_enum together with an enum value as a more type-safe alternative.
* Add get_minor_firmware_version to DeviceRobin Krahl2018-05-21
| | | | Since libnitrokey v3.3, we can also access the minor firmware version.
* Update nitrokey-sys dependency to v3.3.0Robin Krahl2018-05-21
| | | | | | | Now libnitrokey v3.3 is compiled from source, fixing the problems with older libnitrokey versions (freeing strings, firmware version getter). Also, bindgen is no longer a build dependency. This makes the build process a lot faster.
* Initial commitRobin Krahl2018-05-19