diff --git a/Cargo.toml b/Cargo.toml index 936cc5b0..7b2b4dad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "authenticator" -version = "0.4.1" +version = "0.5.0" authors = [ "Dana Keeler ", "J.C. Jones ", "John Schanck ", "Kyle Machulis ", "Martin Sirringhaus " ] keywords = ["ctap2", "u2f", "fido", "webauthn"] categories = ["cryptography", "hardware-support", "os"] @@ -81,3 +81,6 @@ env_logger = "^0.6" getopts = "^0.2" assert_matches = "1.2" rpassword = "5.0" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } diff --git a/src/crypto/mod.rs b/src/crypto/mod.rs index 44d90f34..8b600ebf 100644 --- a/src/crypto/mod.rs +++ b/src/crypto/mod.rs @@ -88,7 +88,6 @@ impl Clone for PinUvAuthProtocol { /// CTAP 2.1, Section 6.5.4. PIN/UV Auth Protocol Abstract Definition trait PinProtocolImpl: ClonablePinProtocolImpl { fn protocol_id(&self) -> u64; - fn initialize(&self); fn encrypt(&self, key: &[u8], plaintext: &[u8]) -> Result, CryptoError>; fn decrypt(&self, key: &[u8], ciphertext: &[u8]) -> Result, CryptoError>; fn authenticate(&self, key: &[u8], message: &[u8]) -> Result, CryptoError>; @@ -189,8 +188,6 @@ impl PinProtocolImpl for PinUvAuth1 { 1 } - fn initialize(&self) {} - fn encrypt(&self, key: &[u8], plaintext: &[u8]) -> Result, CryptoError> { // [CTAP 2.1] // encrypt(key, demPlaintext) → ciphertext @@ -234,8 +231,6 @@ impl PinProtocolImpl for PinUvAuth2 { 2 } - fn initialize(&self) {} - fn encrypt(&self, key: &[u8], plaintext: &[u8]) -> Result, CryptoError> { // [CTAP 2.1] // encrypt(key, demPlaintext) → ciphertext diff --git a/src/transport/device_selector.rs b/src/transport/device_selector.rs index f745b456..fc8c1f1b 100644 --- a/src/transport/device_selector.rs +++ b/src/transport/device_selector.rs @@ -10,8 +10,6 @@ use std::time::Duration; pub type DeviceID = ::Id; pub type DeviceBuildParameters = ::BuildParameters; -trait DeviceSelectorEventMarker {} - #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum BlinkResult { DeviceSelected, diff --git a/src/transport/hidproto.rs b/src/transport/hidproto.rs index 5a0a9d26..754a3d8e 100644 --- a/src/transport/hidproto.rs +++ b/src/transport/hidproto.rs @@ -4,10 +4,7 @@ // Shared code for platforms that use raw HID access (Linux, FreeBSD, etc.) -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::cast_lossless, clippy::needless_lifetimes) -)] +#![allow(clippy::cast_lossless, clippy::needless_lifetimes)] #[cfg(target_os = "linux")] use std::io; diff --git a/src/transport/linux/hidraw.rs b/src/transport/linux/hidraw.rs index 16d687f3..451e3d97 100644 --- a/src/transport/linux/hidraw.rs +++ b/src/transport/linux/hidraw.rs @@ -1,7 +1,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#![cfg_attr(feature = "cargo-clippy", allow(clippy::cast_lossless))] +#![allow(clippy::cast_lossless)] extern crate libc;