Fix imports in ctap, embedded_flash and lang-items.
This commit is contained in:
@@ -16,11 +16,11 @@ use super::hid::ChannelID;
|
||||
use super::key_material::{ATTESTATION_CERTIFICATE, ATTESTATION_PRIVATE_KEY};
|
||||
use super::status_code::Ctap2StatusCode;
|
||||
use super::CtapState;
|
||||
use crate::timer::ClockValue;
|
||||
use alloc::vec::Vec;
|
||||
use core::convert::Into;
|
||||
use core::convert::TryFrom;
|
||||
use crypto::rng256::Rng256;
|
||||
use libtock_drivers::timer::ClockValue;
|
||||
|
||||
// The specification referenced in this file is at:
|
||||
// https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.pdf
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
mod receive;
|
||||
mod send;
|
||||
pub mod receive;
|
||||
pub mod send;
|
||||
|
||||
use self::receive::MessageAssembler;
|
||||
use self::send::HidPacketIterator;
|
||||
@@ -22,13 +22,13 @@ use super::ctap1;
|
||||
use super::status_code::Ctap2StatusCode;
|
||||
use super::timed_permission::TimedPermission;
|
||||
use super::CtapState;
|
||||
use crate::timer::{ClockValue, Duration, Timestamp};
|
||||
use alloc::vec::Vec;
|
||||
#[cfg(feature = "debug_ctap")]
|
||||
use core::fmt::Write;
|
||||
use crypto::rng256::Rng256;
|
||||
#[cfg(feature = "debug_ctap")]
|
||||
use libtock_drivers::console::Console;
|
||||
use libtock_drivers::timer::{ClockValue, Duration, Timestamp};
|
||||
|
||||
// CTAP specification (version 20190130) section 8.1
|
||||
// TODO: Channel allocation, section 8.1.3?
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
use super::{ChannelID, CtapHid, HidPacket, Message, ProcessedPacket};
|
||||
use crate::timer::Timestamp;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem::swap;
|
||||
use libtock_drivers::timer::Timestamp;
|
||||
|
||||
// A structure to assemble CTAPHID commands from a series of incoming USB HID packets.
|
||||
pub struct MessageAssembler {
|
||||
@@ -195,7 +195,7 @@ impl MessageAssembler {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::timer::Duration;
|
||||
use libtock_drivers::timer::Duration;
|
||||
|
||||
// Except for tests that exercise timeouts, all packets are synchronized at the same dummy
|
||||
// timestamp.
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::crypto::rng256::Rng256;
|
||||
#[cfg(feature = "with_ctap2_1")]
|
||||
use crate::ctap::data_formats::{extract_array, extract_text_string};
|
||||
use crate::ctap::data_formats::{CredentialProtectionPolicy, PublicKeyCredentialSource};
|
||||
use crate::ctap::pin_protocol_v1::PIN_AUTH_LENGTH;
|
||||
use crate::ctap::status_code::Ctap2StatusCode;
|
||||
use crate::ctap::{key_material, USE_BATCH_ATTESTATION};
|
||||
use crate::embedded_flash::{self, StoreConfig, StoreEntry, StoreError};
|
||||
use alloc::string::String;
|
||||
use alloc::vec::Vec;
|
||||
use core::convert::TryInto;
|
||||
use ctap2::embedded_flash::{self, StoreConfig, StoreEntry, StoreError};
|
||||
use crypto::rng256::Rng256;
|
||||
|
||||
#[cfg(any(test, feature = "ram_storage"))]
|
||||
type Storage = embedded_flash::BufferStorage;
|
||||
@@ -660,9 +660,9 @@ fn _serialize_min_pin_length_rp_ids(rp_ids: Vec<String>) -> Result<Vec<u8>, Ctap
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::crypto;
|
||||
use crate::crypto::rng256::{Rng256, ThreadRng256};
|
||||
use crate::ctap::data_formats::{PublicKeyCredentialSource, PublicKeyCredentialType};
|
||||
use crypto;
|
||||
use crypto::rng256::{Rng256, ThreadRng256};
|
||||
|
||||
fn create_credential_source(
|
||||
rng: &mut ThreadRng256,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::timer::{ClockValue, Duration};
|
||||
use libtock_drivers::timer::{ClockValue, Duration};
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum TimedPermission {
|
||||
|
||||
Reference in New Issue
Block a user