diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-05-21 00:53:34 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2018-05-21 01:02:11 +0200 |
commit | 98eaf71502afeb4f14eb4f7bc365e3211b5709fb (patch) | |
tree | 9c3916298879769dd1adee622f007caae975eb11 | |
parent | 96b2f4bd20f81fdc1e57c004cd66d90221be6f87 (diff) | |
download | nitrokey-rs-98eaf71502afeb4f14eb4f7bc365e3211b5709fb.tar.gz nitrokey-rs-98eaf71502afeb4f14eb4f7bc365e3211b5709fb.tar.bz2 |
Update nitrokey-sys dependency to v3.3.0
Now libnitrokey v3.3 is compiled from source, fixing the problems with
older libnitrokey versions (freeing strings, firmware version getter).
Also, bindgen is no longer a build dependency. This makes the build
process a lot faster.
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | TODO.md | 13 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/tests/pro.rs | 3 |
5 files changed, 14 insertions, 11 deletions
@@ -17,5 +17,5 @@ test-pro = [] [dependencies] libc = "0.2" -nitrokey-sys = "0.1.0" +nitrokey-sys = "3.3.0" rand = "0.4" @@ -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, @@ -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. @@ -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 { |