From 3c8092cd937d6f449b1959eab9e7e15549970d85 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 16 Jan 2019 02:52:58 +0000 Subject: Fix result_from_string for empty return values An empty string returned from a libnitrokey function can either indicate an error or be a valid return value. Previously, we assumed that it indicates an error. But instead, we should check the last command status and use it to decide whether to return the empty string or an error code. This breaks the unit tests that assume that empty strings cause errors. These will be fixed in the next patches. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 7d7ff1a..28bd3b8 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,6 @@ - Find a nicer syntax for the `write_config` test. - Prevent construction of internal types. - More specific error checking in the tests. -- Differentiate empty strings and errors (see `result_from_string`). - Check integer conversions. - Consider implementing `Into` for `(Device, CommandError)` - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware -- cgit v1.2.1