aboutsummaryrefslogtreecommitdiff
path: root/unittest
Commit message (Collapse)AuthorAge
* Merge branch 'master' into get_statusSzczepan Zalega2020-06-15
|\ | | | | | | Update to latest codebase
| * Merge branch 'read-config-struct'Szczepan Zalega2020-06-13
| |\ | | | | | | | | | | | | | | | Add NK_config struct and read/write functions Fixes #176
| | * Add NK_config struct and read/write functionsRobin Krahl2020-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Merge branch 'free'Szczepan Zalega2020-06-13
| |\ \ | | | | | | | | | | | | | | | | | | | | Add functions for freeing memory of some C API results Fixes #175
| | * | Add missing free functions to C APIRobin Krahl2020-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | Add test_memory test caseRobin Krahl2020-04-02
| | |/ | | | | | | | | | | | | | | | 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.
| * | Merge branch 'serial-number-u32'Szczepan Zalega2020-06-13
| |\ \ | | | | | | | | | | | | | | | | | | | | Return serial number as uint32_t Fixes #174
| | * | Return serial number as uint32_t from C APIRobin Krahl2020-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | NitrokeyManager: Also return serial number as u32Robin Krahl2020-04-02
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * / Make proper call to install pip packageSzczepan Zalega2020-06-13
| |/
| * Add missing skip for lower firmware versionSzczepan Zalega2020-02-26
| |
| * Data retention test. Refactoring. Helper functions.Szczepan Zalega2020-02-26
| |
| * Refactor. Allow device reconnection.Szczepan Zalega2020-02-26
| |
| * Refactor move 2Szczepan Zalega2020-02-26
| |
| * Refactor moveSzczepan Zalega2020-02-26
| |
| * Refactor renameSzczepan Zalega2020-02-26
| |
| * Bootloader data retention testSzczepan Zalega2020-02-26
| |
| * Skip bootloader activation unless specified by the switchSzczepan Zalega2020-02-26
| |
| * Rename the actual bootloader switching test to a distinct nameSzczepan Zalega2020-02-26
| |
| * Change too short password to default, but short of 1 letterSzczepan Zalega2020-02-26
| |
| * Correct result of successful execution for bootloader to DISCONNECTEDSzczepan Zalega2020-02-26
| |
| * Add tests for Pro`s bootloaderSzczepan Zalega2020-02-26
| |
* | test_pro: Extend test_get_status test caseRobin Krahl2020-01-06
|/ | | | | | | | | | This patch extends the test_get_status test case to check the content of the returned status struct. The firmware version, serial number and config should match the values returned by the NK_*_firmware_version, NK_device_serial_number and NK_read_config functions. This does not work for the Nitrokey Storage, which will be fixed in the next patch.
* Add numbers to generated OTP slot namesSzczepan Zalega2019-06-25
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Cleanup: replace magic numbers. Correct copyright dates.v3.5Szczepan Zalega2019-06-24
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add simple CLI tool to enable firmware update mode on NK StorageSzczepan Zalega2019-06-24
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Collect received OTP codes for all slots and print themSzczepan Zalega2019-06-22
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add another test for reading and writing OTP slotsSzczepan Zalega2019-06-22
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Test writing edge OTP slotsSzczepan Zalega2019-06-22
| | | | | | | 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>
* Add HOTP counter testsSzczepan Zalega2019-06-19
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Tests: correct the model gettingSzczepan Zalega2019-06-18
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Extend TOTP time test up to 64 bitsSzczepan Zalega2019-06-14
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Correct binary counter specifierSzczepan Zalega2019-06-14
| | | | | | | Makes the 64bit OTP tests passing on the Pro v0.8+ (instead of being skipped). Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add test for firmware password lengthSzczepan Zalega2019-06-13
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add exclusions to the Pro firmware testsSzczepan Zalega2019-06-13
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Comments: fixmeSzczepan Zalega2019-06-13
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add Python testsSzczepan Zalega2019-06-13
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Fix regex in unittest for pre-releases and git checkoutsDavid Seifert2019-04-26
|
* Unlock 64 bit tests for StorageSzczepan Zalega2019-03-19
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Storage v0.54: activate tests for OTP320 and binary counterSzczepan Zalega2019-03-19
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Replace NK_status with NK_get_status_as_string in unit testsRobin Krahl2019-01-29
|
* Add unit test for NK_get_statusRobin Krahl2019-01-29
|
* Correct the skip message for other OS than FedoraSzczepan Zalega2019-01-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Detect UV's block device on Fedora automaticallySzczepan Zalega2019-01-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Additional check and device/mount printSzczepan Zalega2019-01-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Small correction for macOS 10.13.6Szczepan Zalega2019-01-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Stress test for firmware export feature on macOSMartin Müller2019-01-26
|
* Add FIXME comments. Make the skip() method descriptive.Szczepan Zalega2019-01-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Stress test for firmware export featureSzczepan Zalega2019-01-26
| | | | | | | | 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>
* Merge branch 'pr_138' into contributionsSzczepan Zalega2019-01-15
|\ | | | | | | | | | | Improve support for multiple devices Fixes #138