Fix compilation

This commit is contained in:
Sosthène Guédon
2023-02-06 14:57:20 +01:00
parent 04da25ebfc
commit 255bddc7e1
6 changed files with 9 additions and 10 deletions
+3 -3
View File
@@ -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");
+2 -2
View File
@@ -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<reply::DeserializeKey, Error> {
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);
+1 -2
View File
@@ -1,5 +1,4 @@
use rsa_backend::SoftwareRsa;
use trussed_rsa_backend::SoftwareRsa;
pub struct Dispatcher;
pub enum BackendIds {
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;