aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-11 20:05:39 +0100
committerRobin Krahl <robin.krahl@ireas.org>2020-01-11 20:25:56 +0100
commitdbee55efa41496c8a683bfab96163facc93d6639 (patch)
tree93aa1d17acd18b6884b8421c593dab6e7cbf6011 /src/lib.rs
parent1532f92de1d63613602acb0b68486361571f3e50 (diff)
downloadnitrokey-rs-dbee55efa41496c8a683bfab96163facc93d6639.tar.gz
nitrokey-rs-dbee55efa41496c8a683bfab96163facc93d6639.tar.bz2
Add support for the GET_STATUS command
This patch adds support for the GET_STATUS command that returns the status information common to all Nitrokey devices. It can be accessed using the Device::get_status function and is stored in a Status struct. Due to a bug in the Storage firmware [0], the GET_STATUS command returns wrong firmware versions and serial numbers. Until this is fixed in libnitrokey [1], we have to manually execute the GET_DEVICE_STATUS command to fix these values for the Nitrokey Storage. Also, this leads to a name clash with the existing Storage::get_status function, which will be renamed in an upcoming patch. [0] https://github.com/Nitrokey/nitrokey-storage-firmware/issues/96 [1] https://github.com/Nitrokey/libnitrokey/issues/166
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7e8b3ef..41c99c5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -126,8 +126,8 @@ use nitrokey_sys;
pub use crate::auth::{Admin, Authenticate, User};
pub use crate::config::Config;
pub use crate::device::{
- Device, DeviceInfo, DeviceWrapper, Model, Pro, SdCardData, Storage, StorageProductionInfo,
- StorageStatus, VolumeMode, VolumeStatus,
+ Device, DeviceInfo, DeviceWrapper, Model, Pro, SdCardData, Status, Storage,
+ StorageProductionInfo, StorageStatus, VolumeMode, VolumeStatus,
};
pub use crate::error::{CommandError, CommunicationError, Error, LibraryError};
pub use crate::otp::{ConfigureOtp, GenerateOtp, OtpMode, OtpSlotData};