| Commit message (Collapse) | Author | Age |
... | |
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure all C API strings are deallocable.
Tested with Python's 3.6.5 'pytest -sv test_{pro,storage}.py' on Storage v0.50,
Ubuntu 18.04
Closes #110
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
| |
| |
| |
| |
| |
| | |
All functions returning duplicated C-strings, which needs to be deallocated on caller side, are typed char* instead of const char*
Issue #110
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|/
|
|
|
|
| |
Issue #110
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| |
| | |
Update documentation of C API regarding OTP secret length and type.
Closes #106
|
| |
| |
| |
| |
| |
| |
| | |
These were to meant, that the sizes were confirmed for Pro and not for Storage, during library development. Storage has maintained the compatibility, hence there is no need for the mentioned marks.
Issue #106
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
| |
| |
| |
| |
| | |
Same for C-string requirements for fields and sizes
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|/
|
|
|
|
|
| |
While the actual secret is 20 bytes, the functions accept a hex string.
That means that every byte of the secret is represented by two bytes
(characters) in the hex string. So the argument secret for the
functions NK_write_{hotp,totp}_slot is char[40], not char[20].
|
|\ |
|
|/
|
|
|
|
|
| |
Cleanup CMakeList a bit as well.
Fixes #97
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
|
|
| |
from another CMake project
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| | |
Closes #108
|
|/
|
|
|
| |
Contrary to C++, C requires the type `enum NK_device_model` instead of
only `NK_device_model` when refering to the enum with that name.
|
|
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| | |
Update version to v3.3
|
|/
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\ |
|
|/
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| | |
Fixes #102
|
| |
| |
| |
| | |
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>
|
|\ \
| | |
| | |
| | | |
Fixes #105
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As with the C++ API, identifying the model by the first character of a
string is not intuitive. This patch adds the NK_login_enum function to
the C API that accepts an enum value instead of a string. It also adds
a new enum NK_device_model as device::DeviceModel is an enum class and
therefore cannot be used in C.
|
|/ /
| |
| |
| |
| |
| |
| | |
Identifying the model to connect to by the first character of a string
is not intuitive. This patch adds an overload for the connect function
that accepts a device::DeviceModel enum value, providing a cleaner
interface.
|
|\ \
| | |
| | |
| | | |
Fixes #103
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
The readme suggested to use the option `-DCOMPILE_TESTS` for CMake in
order to compile unit tests. Yet CMake expectes option values of the
form `<var>:<type>=<value>` or `<var>=<value>` (see cmake(1)).
Therefore, this patch replaces `-DCOMPILE_TESTS` with
`-DCOMPILE_TESTS=ON`, matching the general build instructions in the
CMake section.
|
|\ \
| |/
|/|
| | |
Fixes #104
|
|/
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| | |
Fixup for QMake
Issue #101
|
| |
| |
| |
| |
| |
| | |
Fixup to #101
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\|
| |
| |
| |
| |
| | |
Fixed header path. Allow to override UDEV rules.
Closes #101
|
| | |
|
|/ |
|
|\ |
|
|/
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| | |
Update C API with new command, determining the PIN type for unencrypted
volume RO/RW state change.
|
|/
|
|
| |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| | |
Fix compilation warning with missing 'break'
|
|/
|
|
|
|
| |
Break was indeed missing this time.
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| | |
Allow to use multiple devices, iteratively.
Storage only.
|
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
| |
| |
| |
| | |
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|