Skip to content

Commit

Permalink
Merge pull request #19 from Nitrokey/fixes
Browse files Browse the repository at this point in the history
Fix compilation of tests, repository url and clippy warnings
  • Loading branch information
sosthene-nitrokey authored Apr 11, 2024
2 parents 23d3511 + 8d5d948 commit b5f57d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["extensions/se050-manage"]
[workspace.package]
authors = ["Nitrokey GmbH <[email protected]>"]
edition = "2021"
repository = "https://github.com/trussed-dev/trussed-staging"
repository = "https://github.com/Nitrokey/trussed-se050-backend"
license = "Apache-2.0 OR MIT"

[package]
Expand Down Expand Up @@ -48,6 +48,9 @@ salty = "0.3.0"
p256-cortex-m4 = { version = "0.1.0-alpha.6", features = ["prehash", "sec1-signatures"] }
admin-app = "0.1.0"

[dev-dependencies]
admin-app = { version = "0.1.0", features = ["migration-tests"] }

[patch.crates-io]
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "960e57d9fc0d209308c8e15dc26252bbe1ff6ba8" }
apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "915fc237103fcecc29d0f0b73391f19abf6576de" }
Expand Down
9 changes: 4 additions & 5 deletions src/core_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ fn handle_rsa_import_format(data: &[u8], size: u16) -> Option<RsaImportElements>
CtOption::new(d, success.into())
});

let Some((d, n)) = d_opt
let maybe_d_n: Option<_> = d_opt
.and_then(|d| {
let n: CtOption<_> = n_opt.into();
n.and_then(|n| {
Expand All @@ -154,10 +154,9 @@ fn handle_rsa_import_format(data: &[u8], size: u16) -> Option<RsaImportElements>
CtOption::new(value, choice)
})
})
.into()
else {
return None;
};
.into();

let (d, n) = maybe_d_n?;

Some(RsaImportElements { e: parsed.e, d, n })
}
Expand Down
2 changes: 1 addition & 1 deletion src/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ pub fn migrate_remove_all_dat(fs: &dyn DynFilesystem, apps: &[&Path]) -> Result<
#[allow(clippy::unwrap_used)]
#[cfg(test)]
mod tests {
use admin_app::migrations::test_utils::{test_migration_one, FsValues};
use littlefs2::path;
use trussed_staging::manage::test_utils::{test_migration_one, FsValues};

use crate::trussed_auth_impl::AUTH_DIR;

Expand Down

0 comments on commit b5f57d7

Please sign in to comment.