| Commit message (Collapse) | Author | Age |
|\
| |
| |
| |
| |
| | |
Add functions for freeing memory of some C API results
Fixes #175
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds two missing free functions, NK_free_config and
NK_free_password_safe_slot_status, to enable memory-safe use of the C
API.
Fixes #173.
|
| |
| |
| |
| |
| |
| | |
This patch adds a test_memory test case that demonstrates new[]/free
mismatches with the NK_read_config and NK_get_password_safe_slot_status
functions if run with valgrind, see #173.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Return serial number as uint32_t
Fixes #174
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds the function NK_device_serial_number_as_u32 to the C
API. It is similar to NK_device_serial_number but returns the raw
unsigned integer instead of a formatted string. This patch also adds a
simple test case that ensures that the number is not zero.
Fixes #172.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds the get_serial_number_as_u32 method to NitrokeyManager.
It returns the serial number as a 32-bit unsigned integer. Previously,
we only returned it as a string generated from the integer value,
get_serial_number.
While get_serial_number returns an empty string if no device is
connected and "NA" if an unknown model is connected, the new method
throws a DeviceNotConnected exception in the first case and returns zero
in the second case as we cannot express the three states in one integer
return value.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This tests encountered bug in the Storage v0.54 RC.
Write either TOTP15 or HOTP1, and try to access the other.
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>
|
|
|
|
|
|
|
| |
Makes the 64bit OTP tests passing on the Pro v0.8+ (instead of being
skipped).
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>
|
| |
|
| |
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Export the firmware multiple times, and test its size.
Hardcoded device set to /dev/sde1
Related: https://github.com/Nitrokey/nitrokey-app/issues/399
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
|
|\
| |
| |
| |
| |
| | |
Improve support for multiple devices
Fixes #138
|
| |
| |
| |
| |
| | |
As we cannot test this function properly in Python (due to missing
struct definitions), we test it in the C++ test suite.
|
| |
| |
| |
| |
| | |
As we cannot read the output of NK_list_devices in the Python tests at
the moment, this test case uses NK_list_devices_by_cpuID instead.
|
| |
| |
| |
| |
| |
| |
| | |
Unfortunately, I cannot test more as the current ffi implementation does
not allow me to import struct definitions. Without the definition for
the NK_device_info struct, I cannot inspect the result of the
NK_list_devices function.
|
| |
| |
| |
| |
| |
| |
| | |
For easier handling, we should use a std::string instead of
std::wstring for the serial number in DeviceInfo. For the conversion, I
assume that the serial number is valid UTF-8. As it should be
alphanumeric and ASCII only, this should be true.
|