aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'pr_131'Szczepan Zalega2018-07-24
|\ | | | | | | | | | | | | | | Add virtual destructor to logger classes. Fixes compilation warning Fixes #131 Fixes #129
| * log: define default virtual destructor for LogHandlerIgor Gnatenko2018-07-18
| | | | | | | | | | Fixes: https://github.com/Nitrokey/libnitrokey/issues/129 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | Merge branch 'pr_132'Szczepan Zalega2018-07-24
|\ \ | | | | | | | | | | | | | | | | | | Update Catch to 2.3.0 Both CMake and Meson build files updated. Tests compile (with both) and run with a Storage device. Fixes #132
| * | Update for compatibility with Catch2 version 2.3.0Tom Hughes2018-07-24
| | |
| * | Update Catch to version 2.3.0Tom Hughes2018-07-24
| | |
| * | Update URL for Catch submoduleTom Hughes2018-07-24
|/ /
* | Merge branch 'pr_130'Szczepan Zalega2018-07-18
|\ \ | |/ |/| | | | | Meson: copy udev, fallback for git version. Fixes #130
| * meson: install udev rulesIgor Gnatenko2018-07-18
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * meson: improve generation of vcs_tagIgor Gnatenko2018-07-18
|/ | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Merge branch 'pr_128'Szczepan Zalega2018-07-18
|\ | | | | | | | | | | Meson fixes for tests build Fixes #128
| * meson: add support for bundled catchIgor Gnatenko2018-07-18
| | | | | | | | | | | | Better to use meson's subproject, but let's go with submodule for now. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * meson: fix usage of system-wide catchIgor Gnatenko2018-07-18
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * meson: test_minimal is written in CIgor Gnatenko2018-07-18
|/ | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Merge branch 'pr_127'Szczepan Zalega2018-07-18
|\ | | | | | | | | | | | | | | Meson: - fix typo in lib name - use real library version in getter Fixes #127
| * meson: fix sneaky typo of the library nameSzczepan Zalega2018-07-18
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * meson: add support for generated VCS tagIgor Gnatenko2018-07-18
|/ | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Merge branch 'pr_85'Szczepan Zalega2018-07-18
|\ | | | | | | | | | | Support build via Meson and Ninja Fixes #85
| * Mention build with meson in the ReadmeSzczepan Zalega2018-07-18
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Update meson definition to v3.4.1Szczepan Zalega2018-07-18
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * add meson buildsystem definitionsIgor Gnatenko2018-07-18
|/ | | | | References: https://github.com/Nitrokey/nitrokey-app/issues/306 Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
* Allow for <patch> field in library version getter testSzczepan Zalega2018-07-18
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle get_library_version for Qt (temporarily)Szczepan Zalega2018-07-18
| | | | | | Return version 3.0 and Git string "unknown" Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Bump version to 3.4.1Szczepan Zalega2018-07-18
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle build without Git repository infoSzczepan Zalega2018-07-18
| | | | | | | Sets version to "unknown" Fixes #126 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merge branch 'pr_116'Szczepan Zalega2018-07-07
|\ | | | | | | | | | | Allow to connect to device with model specified by enum. Fixes #116
| * Handle new enum model value in NK_login_enumSzczepan Zalega2018-07-07
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Replace *out function parameter with return valueSzczepan Zalega2018-06-20
| | | | | | | | | | | | | | Using return value instead of memory manipulation seem to be cleaner solution and less error prone due to avoiding pointer usage. Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Expose device model in C APIRobin Krahl2018-05-25
| | | | | | | | | | | | | | | | | | The C++ API already provides access to the model of the connected device in NitrokeyManager::get_connected_device_model(). This patch also exposes this information in the C API by adding NK_get_device_model. As there might be no device connected, the function returns a boolean indicating the connection status and writes the model of the connected device to a pointer passed as an argument.
* | Merge branch 'pr_124'Szczepan Zalega2018-07-07
|\ \ | | | | | | | | | Fixes #124
| * | Add general DEPRECATED macro for marking deprecated functions.Szczepan Zalega2018-07-07
| | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | Replace deprecated attribute in C API with a commentRobin Krahl2018-07-05
| | | | | | | | | | | | | | | | | | Attribute specifiers are a C++-only feature. Therefore this patch removes the [[deprecated(...)]] attribute from the NK_totp_get_time method in NK_C_API.h and replaces it with a comment.
* | | Merge branch 'pr_125'Szczepan Zalega2018-07-07
|\ \ \ | |/ / |/| | | | | | | | | | | Add C minimal offline test Fixes #125
| * | Add a test to ensure valid C code in the C APIRobin Krahl2018-07-05
|/ / | | | | | | | | | | | | | | | | | | All current tests are written in C++. Therefore C++-only code in the C API might not be detected by the tests. This patch adds a minimal test written in C that only includes the C API header. This should make sure that the C API code is valid. The new test is called `test_minimal.c` and is added to the CMake COMPILE_OFFLINE_TESTS option.
* | Merge branch 'production_info'Szczepan Zalega2018-06-28
|\ \ | | | | | | | | | Handle command for getting production info
| * | Handle command for getting production dataSzczepan Zalega2018-06-28
|/ / | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* | Merge branch 'handle_wink_command'Szczepan Zalega2018-06-23
|\ \ | | | | | | | | | Handle WINK command, introduced in Storage v0.52
| * | Handle WINK commandSzczepan Zalega2018-06-23
| | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* | | Merge branch 'pr_123'Szczepan Zalega2018-06-22
|\ \ \ | |/ / |/| | | | | | | | | | | Fix version getter test Closes #123
| * | Fix unit test for get_library_version for release commitsRobin Krahl2018-06-21
| | | | | | | | | | | | | | | | | | | | | `git describe` may return a tag name or <tag>-<n>-g<hash>, where <n> is the number of commits since the last tag <tag> and <hash> is the hash of the current commit. The current test case only considers the latter case. This patch adds a regular expression to handle both cases.
* | | Merge branch 'pr_115'Szczepan Zalega2018-06-20
|\ \ \ | |/ / |/| | | | | | | | | | | Fix connect() return value in offline mode Fixes #115
| * | Add extended test for the connect() return value in offline modeSzczepan Zalega2018-06-20
| | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | Fix log warning regarding repeated disconnectionSzczepan Zalega2018-06-20
| | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | Correct return value for NitrokeyManager::connect()Robin Krahl2018-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NitrokeyManager::connect() currently returns true if the device pointer is set. Yet this does not mean that the connection was successful. For example, NitrokeyManger::connect(const char*) sets the device pointer even if it was not successful. This patch introduces a variable that keeps track of the connection instead of checking the device pointer. This corrects the return value without changing the behavior of the connect method (returning the Storage device if both a Pro and a Storage device are present).
* | | Merge branch 'pr_114'Szczepan Zalega2018-06-19
|\ \ \ | | | | | | | | | | | | | | | | | | | | Cleanup API related to device's TOTP time management Fixes #114
| * | | Remove NK_totp_get_time implementation, since it always results in error on ↵Szczepan Zalega2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | device's side Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | | Add "deprecated" tags to get_time and NK_totp_get_time functionsSzczepan Zalega2018-06-19
| | | | | | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | | Add set_time_soft to replace get_timeRobin Krahl2018-06-19
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SetTime command supports two modes: set the time without checking the currently set time, or verify that the currently set time is not zero and not larger than the new time (see cmd_set_time(uint8_t*, uint8_t*) in src/keyboard/report_protocol.c, lines 678--710, in the Nitrokey Pro firmware). NitrokeyManager called these two modes set_time(uint64_t) and get_time(uint64_t), which is highly misleading -- the command does never get the time. Furthermore, the get_time method per default calls the command with the time zero, which will always result in an error. The C API has the methods NK_totp_set_time(uint64_t) and NK_totp_get_time(). NK_totp_get_time() calls get_time(uint64_t) with the time zero, leading to an error, and is therefore useless. This patch proposes a new wording. While it would make sense to call the first mode “reset” and the second mode “set”, this would break compatibility. Therefore, new methods set_time_soft(uint64_t) and NK_totp_set_time_soft(uint64_t) are introduced to represent the difference between a hard and a soft setting of the time. The old methods, get_time(uint64_t) and NK_totp_get_time(), are not removed but marked as deprecated. They should be removed in an upcoming major release.
* | | Merge branch 'pr_117'Szczepan Zalega2018-06-19
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Library version getter for C API Fixes #117 Fixes #35 Fixes #62
| * | | Add offline test for version getterSzczepan Zalega2018-06-19
| | | | | | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * | | Move implementation from header back to compilation unitSzczepan Zalega2018-06-19
| | | | | | | | | | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>