aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--README.md5
-rw-r--r--TODO.md13
-rw-r--r--src/lib.rs2
-rw-r--r--src/tests/pro.rs3
5 files changed, 14 insertions, 11 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d7f536e..134bf09 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,5 +17,5 @@ test-pro = []
[dependencies]
libc = "0.2"
-nitrokey-sys = "0.1.0"
+nitrokey-sys = "3.3.0"
rand = "0.4"
diff --git a/README.md b/README.md
index 1cd8e24..ff4f3b9 100644
--- a/README.md
+++ b/README.md
@@ -11,9 +11,8 @@ nitrokey = "0.1.0"
## Compatibility
-In order to use this crate, a [`libnitrokey`][] installation is required
-(both development headers and library). The crate is developed using version
-3.2, but any newer version should work too.
+The required [`libnitrokey`][] version is built from source. The host system
+must provide `libhidapi-libusb0` in the default library search path.
As I only have access to a Nitrokey Pro, this crate only provides support for
the Nitrokey Pro methods. If you want to contribute for the Nitrokey Storage,
diff --git a/TODO.md b/TODO.md
index ca239c8..921dd8a 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,7 +1,8 @@
-- Fix segmentation faults when freeing string literals with old Nitrokey
- versions.
- Add support and tests for the Nitrokey Storage.
- Add support for the currently unsupported commands:
+ - `NK_login_enum`
+ - `NK_get_minor_firmware_version`
+ - `NK_set_unencrypted_volume_rorw_pin_type_user`
- `NK_lock_device`
- `NK_factory_reset`
- `NK_build_aes_key`
@@ -25,7 +26,12 @@
- `NK_lock_hidden_volume`
- `NK_create_hidden_volume`
- `NK_set_unencrypted_read_only`
+ - `NK_set_unencrypted_read_only_admin`
- `NK_set_unencrypted_read_write`
+ - `NK_set_unencrypted_read_write_admin`
+ - `NK_set_encrypted_read_only`
+ - `NK_set_encrypted_read_write`
+ - `NK_enable_firmware_update`
- `NK_export_firmware`
- `NK_clear_new_sd_card_warning`
- `NK_fill_SD_card_with_random_data`
@@ -33,8 +39,9 @@
- `NK_get_status_storage_as_string`
- `NK_get_SD_usage_data_as_string`
- `NK_get_progress_bar_value`
+ - `NK_list_devices_by_cpuID`
+ - `NK_connect_with_ID`
- Fix timing issues with the `totp` and `totp_pin` test cases.
-- Fix the inconsistent method `get_major_firmware_version`.
- Consider implementing `Drop` instead of the method `disconnect`.
- Find an example for `set_time`, also adapt `get_totp_code`.
- Improve log level documentation.
diff --git a/src/lib.rs b/src/lib.rs
index fdc7954..eb5ec5f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -489,8 +489,6 @@ pub trait Device {
}
/// Returns the major part of the firmware version (should be zero).
- /// Note that this method is buggy for libnitrokey older than v3.3. For
- /// these versions, this method returns the minor part.
///
/// # Example
///
diff --git a/src/tests/pro.rs b/src/tests/pro.rs
index 7fa8ec3..dee7dc6 100644
--- a/src/tests/pro.rs
+++ b/src/tests/pro.rs
@@ -196,8 +196,7 @@ fn totp_slot_name() {
#[cfg_attr(not(feature = "test-pro"), ignore)]
fn get_major_firmware_version() {
set_debug(false);
- // TODO fix for different libnitrokey versions
- assert_eq!(8, ::connect().unwrap().get_major_firmware_version());
+ assert_eq!(0, ::connect().unwrap().get_major_firmware_version());
}
fn admin_retry(device: UnauthenticatedDevice, suffix: &str, count: u8) -> UnauthenticatedDevice {