Fixed dependency and linking errors

This commit is contained in:
mingxguo27
2020-09-15 11:11:47 +00:00
parent 69a440fddb
commit 6edf67ee2c
4 changed files with 9 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ edition = "2018"
[dependencies]
libtock_core = { path = "third_party/libtock-rs/core" }
libtock_drivers = { path = "third_party/libtock-drivers" }
#lang_items = { path = "third_party/lang-items" }
lang_items = { path = "third_party/lang-items" }
cbor = { path = "libraries/cbor" }
crypto = { path = "libraries/crypto" }
byteorder = { version = "1", default-features = false }
@@ -20,11 +20,10 @@ arrayref = "0.3.6"
subtle = { version = "2.2", default-features = false, features = ["nightly"] }
[features]
#debug_allocations = ["lang_items/debug_allocations"]
debug_allocations = ["lang_items/debug_allocations"]
debug_ctap = ["crypto/derive_debug", "libtock_drivers/debug_ctap"]
#panic_console = ["lang_items/panic_console"]
std = ["cbor/std", "crypto/std", "crypto/derive_debug"]
#, "lang_items/std"]
panic_console = ["lang_items/panic_console"]
std = ["cbor/std", "crypto/std", "crypto/derive_debug", "lang_items/std"]
ram_storage = []
verbose = ["debug_ctap", "libtock_drivers/verbose_usb"]
with_ctap1 = ["crypto/with_ctap1"]

View File

@@ -163,6 +163,7 @@ impl CtapHid {
Ok(Some(message)) => {
#[cfg(feature = "debug_ctap")]
writeln!(&mut Console::new(), "Received message: {:02x?}", message).unwrap();
let cid = message.cid;
if !self.has_valid_channel(&message) {
#[cfg(feature = "debug_ctap")]

View File

@@ -17,11 +17,14 @@ use crate::ctap::data_formats::{CredentialProtectionPolicy, PublicKeyCredentialS
use crate::ctap::pin_protocol_v1::PIN_AUTH_LENGTH;
use crate::ctap::status_code::Ctap2StatusCode;
use crate::ctap::{key_material, USE_BATCH_ATTESTATION};
#[cfg(feature = "fuzzing")]
use crate::embedded_flash::{self, StoreConfig, StoreEntry, StoreError};
use alloc::string::String;
use alloc::vec::Vec;
use core::convert::TryInto;
use crypto::rng256::Rng256;
#[cfg(not(feature = "fuzzing"))]
use ctap2::embedded_flash::{self, StoreConfig, StoreEntry, StoreError};
#[cfg(any(test, feature = "ram_storage"))]
type Storage = embedded_flash::BufferStorage;

View File

@@ -9,7 +9,7 @@ license = "MIT/Apache-2.0"
edition = "2018"
[dependencies]
libtock_core = { path = "../../third_party/libtock-rs/core", default-features = false, features = ["alloc_init", "custom_panic_handler", "custom_alloc_error_handler"] }
libtock_core = { path = "../../third_party/libtock-rs/core", default-features = false, features = ["custom_panic_handler", "custom_alloc_error_handler"] }
libtock_drivers = { path = "../libtock-drivers" }
linked_list_allocator = { version = "0.8.1", default-features = false }