| Commit message (Collapse) | Author | Age |
| |
|
|\
| |
| |
| |
| |
| | |
Add NK_config struct and read/write functions
Fixes #176
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds the NK_config struct to the C API that stores the
general configuration of a Nitrokey device. It also adds the
NK_read_config_struct and NK_write_config_struct functions to make the
API easier to use. While NK_write_config_struct is only a convenience
method, NK_read_config_struct makes the API more safe as the user no
longer has to read the data from a pointer to an array.
This patch also extends the test_read_write_config test case with the
two new functions.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
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.
|