From 255bddc7e1150763efd7c536815045e736d2ed3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Mon, 6 Feb 2023 14:57:20 +0100 Subject: [PATCH] Fix compilation --- src/crypto_traits.rs | 6 +++--- src/lib.rs | 4 ++-- tests/client/mod.rs | 3 +-- tests/rsa2048.rs | 2 +- tests/rsa3072.rs | 2 +- tests/rsa4096.rs | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/crypto_traits.rs b/src/crypto_traits.rs index 0642048..e81cd07 100644 --- a/src/crypto_traits.rs +++ b/src/crypto_traits.rs @@ -46,7 +46,7 @@ pub trait Rsa2048Pkcs1v15: CryptoClient { /// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key /// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts): /// ``` - ///# use rsa_backend::*; + ///# use trussed_rsa_backend::*; ///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}}; ///# mod client { ///# include!("../tests/client/mod.rs"); @@ -165,7 +165,7 @@ pub trait Rsa3072Pkcs1v15: CryptoClient { /// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key /// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts): /// ``` - ///# use rsa_backend::*; + ///# use trussed_rsa_backend::*; ///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}}; ///# mod client { ///# include!("../tests/client/mod.rs"); @@ -284,7 +284,7 @@ pub trait Rsa4096Pkcs1v15: CryptoClient { /// The resulting [`serialized_key`](trussed::api::reply::SerializeKey::serialized_key) contains a buffer of the parts of the key /// as a postcard-serialized [`RsaPublicParts`](crate::RsaPublicParts): /// ``` - ///# use rsa_backend::*; + ///# use trussed_rsa_backend::*; ///# use trussed::{postcard_deserialize,syscall,types::Location::{Volatile,Internal}}; ///# mod client { ///# include!("../tests/client/mod.rs"); diff --git a/src/lib.rs b/src/lib.rs index accdf18..28a06d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -// #![no_std] +#![no_std] use heapless_bytes::Bytes; use num_bigint_dig::traits::ModInverse; @@ -112,7 +112,7 @@ fn deserialize_parts_key( ) -> Result { let parsed: RsaPublicParts = postcard_deserialize(&request.serialized_key).map_err(|_err| { error!("Failed to deserialize key parts"); - dbg!(Error::InvalidSerializedKey) + Error::InvalidSerializedKey })?; let n = BigUint::from_bytes_be(parsed.n); let e = BigUint::from_bytes_be(parsed.e); diff --git a/tests/client/mod.rs b/tests/client/mod.rs index 282cfc8..e8ef292 100644 --- a/tests/client/mod.rs +++ b/tests/client/mod.rs @@ -1,5 +1,4 @@ - -use rsa_backend::SoftwareRsa; +use trussed_rsa_backend::SoftwareRsa; pub struct Dispatcher; pub enum BackendIds { diff --git a/tests/rsa2048.rs b/tests/rsa2048.rs index f065f5f..1ad6562 100644 --- a/tests/rsa2048.rs +++ b/tests/rsa2048.rs @@ -10,7 +10,7 @@ use trussed::types::Mechanism; use trussed::types::StorageAttributes; use trussed::Bytes; -use rsa_backend::*; +use trussed_rsa_backend::*; use hex_literal::hex; use num_bigint_dig::BigUint; diff --git a/tests/rsa3072.rs b/tests/rsa3072.rs index 5ee19ed..d611cd8 100644 --- a/tests/rsa3072.rs +++ b/tests/rsa3072.rs @@ -10,7 +10,7 @@ use trussed::types::Mechanism; use trussed::types::StorageAttributes; use trussed::Bytes; -use rsa_backend::*; +use trussed_rsa_backend::*; use hex_literal::hex; use num_bigint_dig::BigUint; diff --git a/tests/rsa4096.rs b/tests/rsa4096.rs index 48f41f9..bdb7c41 100644 --- a/tests/rsa4096.rs +++ b/tests/rsa4096.rs @@ -10,7 +10,7 @@ use trussed::types::Mechanism; use trussed::types::StorageAttributes; use trussed::Bytes; -use rsa_backend::*; +use trussed_rsa_backend::*; use hex_literal::hex; use num_bigint_dig::BigUint;