aboutsummaryrefslogtreecommitdiff
path: root/NK_C_API.cc
Commit message (Collapse)AuthorAge
* Run compilation using Qt CreatorSzczepan Zalega2017-06-28
|
* Adjust code to make compilation under MSVC 2017Szczepan Zalega2017-06-28
|
* Fix includes in C_APISzczepan Zalega2017-04-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Security: exchange strdup with strndupSzczepan Zalega2017-04-14
| | | | | | Keep build directory (removed in earlier commit) 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>
* Fix compilation warningsSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Remove unnecessary extern keyword from C APISzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Rename strdup to _strdup under MSVCSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Compiles on MXE, but not working on WindowsSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Adjust for compilation on Visual Studio 2017Szczepan Zalega2017-03-11
| | | | Building works however tests are not. Possibly linking with original hidapi solution would work.
* Send current time when checking time synchronizationSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Name fix for firmware version getterSzczepan Zalega2017-03-11
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Helper functions for getting device stateSzczepan Zalega2017-01-11
| | | | | | | | | get status for Pro and Storage check is device connected use make_shared for keeping instance reference fixed accessing active volume flag Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Get major firmware versionSzczepan Zalega2016-12-06
|
* Rename methods in API to make string return more obviousSzczepan Zalega2016-11-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Document Storage methods in C APISzczepan Zalega2016-11-26
| | | | | | Use uint8_t instead of int where appropriate Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Tests: remake fill SD card test. Get progress bar value when busy.Szczepan Zalega2016-11-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Python bindings and tests for most of Storage functionalitySzczepan Zalega2016-11-26
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Fix bug for setting HOTP counters - send uint64 (was uint8)Szczepan Zalega2016-10-19
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Function for getting device's serial number in hex. Fixes #33Szczepan Zalega2016-09-08
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Merged library exceptions declarationv1.0Szczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return error on invalid slotSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return error for too long stringSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Return a vector to C API to duplicate thereSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Clear string result from get statusSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Use templates with functors to pack codeSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Rename variablesSzczepan Zalega2016-08-09
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Autodetect inserted stick and connect to itSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Catch runtime exceptions on C API login and show them on screenSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Update general config commands - bool -> uint8_tSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Support writing token id to OTP slots in APISzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Allow user to choose new user PIN when unlockingSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not return void functions resultsSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Clear last command status on each API function startSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle OTP slot config in C API during writingSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Support for command: is_aes_supportedSzczepan Zalega2016-08-05
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Do not authenticate on login with admin credentialsSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Choose device model during connectionSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Clear last command status code on success (non template functions)Szczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Clear last command status code on successSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Config options for OTP slots added to command structureSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Authorizing getting OTP codes - initial versionSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Test read/write configSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle write config commandSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Getting password safe data does not need admin tempSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle misc functions: factory reset, build aes key, unlock user password ↵Szczepan Zalega2016-08-01
| | | | | | (not yet tested) Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Erasing slot - initial version with some authorization issuesSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle password safe slots programmed statusSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Erase password safe slotSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
* Handle writing PW safe slotSzczepan Zalega2016-08-01
| | | | Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>