| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
Related to #133
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
|
|
| |
Handle UNKNOWN_ERROR code (introduced in Storage v0.51, firmware commit
687d4aca31ce405db41231be73864ee2f91b3714) and is returned,
when device fails to retrieve the AES key.
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| |
| | |
Allow to connect to device with model specified by enum.
Fixes #116
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Fix version getter test
Closes #123
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`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.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | | |
Fix connect() return value in offline mode
Fixes #115
|
| | |
| | |
| | |
| | | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|/ |
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
|
| |
Cleanup CMakeList a bit as well.
Fixes #97
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
As discussed in issue #95, the buffer passed to strtoul must be
null-terminated. This patch null-terminates the buffer used in
hexStringToByte in the test_HOTP unit test to avoid a buffer over-read.
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
Done for Pro devices
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
Add it to CMake
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
|
| |
Add C API and tests
Add mutexes
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
model and version
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
|
|
|
| |
Add get_minor_firmware_version
Correct get_major_firmware version (was returning minor instead)
Name 3rd version field for test builds
Use minor firmware version in tests
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
Makes occasional fails
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
Remove redundant file
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| |
| | |
Improve test organization
Disable CRC check
Improve log
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|