aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Do not make longer waiting than 500ms on iterationSzczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Make only 10 retries on receivingSzczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Log formatting: Enumerate from 1Szczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not resend command to deviceSzczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Tests: do additional authentication for Pro 0.7Szczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Catch invalid CRC exception in C APISzczepan Zalega2017-09-20
| | | | | | To handle invalid response packets in C API Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Show warning message about invalid incoming packet's CRCSzczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Show more detailed status in debug logSzczepan Zalega2017-09-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add C++ tests for some current issuesSzczepan Zalega2017-06-27
| | | | | | | | Issues: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/36 https://github.com/Nitrokey/nitrokey-storage-firmware/issues/31 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merge branch 'do_not_log_volatile_data'Szczepan Zalega2017-05-13
|\
| * Fix typo in logging macroSzczepan Zalega2017-05-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Log temporary password as hexdump instead of string representationSzczepan Zalega2017-05-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Log accepting responses with invalid CRCSzczepan Zalega2017-05-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Code refactoringSzczepan Zalega2017-05-13
| | | | | | | | | | | | | | Remove doubled implementation Remove clutter from DEBUG log level Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Assume slot_names are volatile dataSzczepan Zalega2017-05-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Do not log volatile dataSzczepan Zalega2017-05-13
|/ | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Pack structures for NK Pro v0.8 commandsSzczepan Zalega2017-05-12
| | | | | | | Apparently the GCC "packed" command is skipped while compiling for Win, VS style ones works Fixes nitrokey-app#242 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Refactor log codeSzczepan Zalega2017-05-12
| | | | | | | Inverse log levels order. Allow to change logging level with int. Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use bool explicitly for success variableSzczepan Zalega2017-05-12
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Detect device correctly under WindowsSzczepan Zalega2017-05-12
| | | | | | | Update hidapi Fixes nitrokey-app#243 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return empty value on no connectionSzczepan Zalega2017-04-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Fix includes in C_APISzczepan Zalega2017-04-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use alternative device connection checkSzczepan Zalega2017-04-26
| | | | | | | Do not use hid_enumarate under OSX Hidapi: do not call event loop on OSX Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Rename device mutex in NitrokeyManagerSzczepan Zalega2017-04-25
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use own strndup implementation under WindowsSzczepan Zalega2017-04-25
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Security: exchange strdup with strndupSzczepan Zalega2017-04-14
| | | | | | Keep build directory (removed in earlier commit) Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Translate HOTP counter for StorageSzczepan Zalega2017-04-14
| | | | | | | | Storage returns its HOTP counter as string in readslot command. This adds translating it from string to ULL. Fixes #59 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle print function in logger by functorSzczepan Zalega2017-04-07
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not abort compilation at all on OSXSzczepan Zalega2017-04-04
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use correct format letterSzczepan Zalega2017-04-03
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not abort compilation on warnings in hid.c on OSXSzczepan Zalega2017-04-03
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return OTP codes as strings to make sure they are zero-filled properlySzczepan Zalega2017-04-03
| | | | | | | | | Adjust Python tests for new OTP codes return value Also remove manual 0-filling Fixes #57 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Fix compilation warning on OSXSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not fail compilation on testsSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not check for warnings on 3rd-party code - hidapiSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Fix compilation warningsSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not allow to set delays lower than 20 msSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Show warnings during the compilation and treat warnings as errorSzczepan Zalega2017-03-31
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Allow to directly choose loglevelSzczepan Zalega2017-03-29
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Allow to change device commands delays runtimeSzczepan Zalega2017-03-29
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Change log's date-time format. Code reformat.Szczepan Zalega2017-03-29
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use separate exception for wrong receiving packet's CRCSzczepan Zalega2017-03-27
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use proper frameworks with cmake and OSXSzczepan Zalega2017-03-20
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merge branch 'osx_build'Szczepan Zalega2017-03-16
|\
| * Add function commentSzczepan Zalega2017-03-14
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Do not link hidapi under OSXSzczepan Zalega2017-03-14
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Use hidapi patched for macSzczepan Zalega2017-03-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Never call hid exit on OSXSzczepan Zalega2017-03-13
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* | Documentation updateSzczepan Zalega2017-03-16
|/ | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merge branch 'libnitrokey_3'Szczepan Zalega2017-03-11
|\