aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_pro.py
Commit message (Collapse)AuthorAge
* 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.
* Data retention test. Refactoring. Helper functions.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
|
* Correct result of successful execution for bootloader to DISCONNECTEDSzczepan Zalega2020-02-26
|
* Add tests for Pro`s bootloaderSzczepan Zalega2020-02-26
|
* 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>
* 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>
* Extend TOTP time test up to 64 bitsSzczepan Zalega2019-06-14
| | | | 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>
* 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>
* Add unit test for NK_get_statusRobin Krahl2019-01-29
|
* Handle UNKNOWN_ERROR return codeSzczepan Zalega2018-11-22
| | | | | | | | 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>
* Merge branch 'pr_116'v3.4Szczepan Zalega2018-07-07
|\ | | | | | | | | | | Allow to connect to device with model specified by enum. Fixes #116
| * Replace *out function parameter with return valueSzczepan Zalega2018-06-20
| | | | | | | | | | | | | | 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>
* | Skip test for devices with firmware lower than v0.9Szczepan Zalega2018-05-24
| | | | | | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* | Add authorization testsSzczepan Zalega2018-05-21
|/ | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Correct firmware version getting in Pro testsSzczepan Zalega2018-03-02
| | | | | | Done for Pro devices Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add license / copyright info to Python files with proper commentSzczepan Zalega2018-01-16
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not set debug level in testsSzczepan Zalega2017-10-10
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Organize tests into categoriesSzczepan Zalega2017-10-04
| | | | | | ... by adding pytest marks. Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merge branch 'windows_MSVC2017' into OSX_merge_cleanedSzczepan Zalega2017-09-20
|\
| * Skip factory reset tests for nowSzczepan Zalega2017-07-03
| | | | | | | | | | | | Not working due to CRC error bug Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
| * Move to Python 3Szczepan Zalega2017-07-03
| | | | | | | | Tested under Windows 8.1 and MSVC 2017 RC
* | Tests: do additional authentication for Pro 0.7Szczepan Zalega2017-09-20
|/ | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return OTP codes as strings to make sure they are zero-filled properlySzczepan Zalega2017-04-03
| | | | | | | | | Adjust Python tests for new OTP codes return value Also remove manual 0-filling Fixes #57 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Correct comments and fix firmware version requirementsSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Authenticate before factory reset so the command will not timeoutSzczepan Zalega2017-03-11
| | | | | | To investigate later Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add some complex unit tests to find out corruption causeSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Tests: skip edit OTP slot test for NK Storage 0.44Szczepan Zalega2016-12-12
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Tests: clear new SD card warning on factory resetSzczepan Zalega2016-12-12
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add a note regarding Password Safe testsSzczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Test null started OTP secrets also for 320bit caseSzczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Remove old skipping code. Feature comment.Szczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Enable factory reset test for Nitrokey Storage. Comments.Szczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add NK Storage specific reply on running not initialized Password SafeSzczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Apply firmware versions limits to testsSzczepan Zalega2016-12-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Add missing newlines to make code format consistentSzczepan Zalega2016-12-03
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>