summaryrefslogtreecommitdiff
path: root/src/tests/no_device.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-05-21 21:59:25 +0000
committerRobin Krahl <robin.krahl@ireas.org>2018-05-22 00:01:54 +0200
commit9428ce3221209828b8cff0e34957ebb9b10b2d99 (patch)
tree94fb08204694966d6db1a487add706c7fedc85a9 /src/tests/no_device.rs
parent3472841949caacadeec92dbf80eca13fd2171f5c (diff)
downloadnitrokey-rs-9428ce3221209828b8cff0e34957ebb9b10b2d99.tar.gz
nitrokey-rs-9428ce3221209828b8cff0e34957ebb9b10b2d99.tar.bz2
Correct invalid slot handling
While the Nitrokey device would generate a WrongSlot error, libnitrokey catches these errors and raises an InvalidSlotException with error code 201. This patch matches this error code to CommandError::InvalidSlot, corrects the documentation and adds test cases. To be able to test a failing OTP generation command, we have to adapt get_string_result to free the string only if successful. This is due to the segfault issue in libnitrokey v3.3 (see todo list).
Diffstat (limited to 'src/tests/no_device.rs')
0 files changed, 0 insertions, 0 deletions