Skip to content

Commit

Permalink
Merge pull request #523 from Nitrokey/update-fido-authenticator
Browse files Browse the repository at this point in the history
Update fido-authenticator and ctap-types
  • Loading branch information
sosthene-nitrokey authored Aug 2, 2024
2 parents be90303 + 2d90943 commit 30cc5fc
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 11 deletions.
31 changes: 25 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ memory-regions = { path = "components/memory-regions" }

# forked
admin-app = { git = "https://github.com/Nitrokey/admin-app.git", tag = "v0.1.0-nitrokey.13" }
cbor-smol = { git = "https://github.com/Nitrokey/cbor-smol.git", tag = "v0.4.0-nitrokey.3"}
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.16" }
cbor-smol = { git = "https://github.com/Nitrokey/cbor-smol.git", tag = "v0.4.0-nitrokey.4"}
fido-authenticator = { git = "https://github.com/Nitrokey/fido-authenticator.git", tag = "v0.1.1-nitrokey.19" }
lpc55-hal = { git = "https://github.com/Nitrokey/lpc55-hal", tag = "v0.3.0-nitrokey.2" }
trussed = { git = "https://github.com/nitrokey/trussed.git", tag = "v0.1.0-nitrokey.21" }

Expand All @@ -31,16 +31,18 @@ littlefs2-sys = { git = "https://github.com/trussed-dev/littlefs2-sys.git", rev
usbd-ctaphid = { git = "https://github.com/trussed-dev/usbd-ctaphid.git", rev = "dcff9009c3cd1ef9e5b09f8f307aca998fc9a8c8" }
usbd-ccid = { git = "https://github.com/Nitrokey/usbd-ccid", tag = "v0.2.0-nitrokey.1" }
p256-cortex-m4 = { git = "https://github.com/ycrypto/p256-cortex-m4.git", rev = "cdb31e12594b4dc1f045b860a885fdc94d96aee2" }
ctap-types = { git = "https://github.com/trussed-dev/ctap-types.git", rev = "72eb68b61e3f14957c5ab89bd22f776ac860eb62" }

# unreleased crates
secrets-app = { git = "https://github.com/Nitrokey/trussed-secrets-app", tag = "v0.13.0" }
webcrypt = { git = "https://github.com/nitrokey/nitrokey-websmartcard-rust", tag = "v0.8.0-rc8" }
webcrypt = { git = "https://github.com/nitrokey/nitrokey-websmartcard-rust", tag = "v0.8.0-rc9" }
opcard = { git = "https://github.com/Nitrokey/opcard-rs", tag = "v1.5.0" }
piv-authenticator = { git = "https://github.com/Nitrokey/piv-authenticator.git", tag = "v0.3.7" }
trussed-fs-info = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "fs-info-v0.1.0" }
trussed-chunked = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "chunked-v0.1.0" }
trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "manage-v0.1.0" }
trussed-wrap-key-to-file = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "wrap-key-to-file-v0.1.0" }
trussed-staging = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "v0.3.0" }
trussed-staging = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "v0.3.1" }
trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth", rev = "947ffe6cff426ccbbbb2d0f689437f427665919e" }
trussed-hkdf = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "hkdf-v0.2.0" }
trussed-rsa-alloc = { git = "https://github.com/trussed-dev/trussed-rsa-backend.git", tag = "v0.2.1" }
Expand Down
3 changes: 2 additions & 1 deletion components/apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ littlefs2 = "0.4"
trussed-auth = { version = "0.3.0", optional = true }
trussed-rsa-alloc = { version = "0.2.0", optional = true }
trussed-se050-backend = { version = "0.3.0", optional = true }
trussed-staging = { version = "0.3.0", features = ["wrap-key-to-file", "chunked", "hkdf", "manage"] }
trussed-staging = { version = "0.3.0", features = ["wrap-key-to-file", "chunked", "hkdf", "manage", "fs-info"] }

# Extensions
trussed-chunked = "0.1.0"
trussed-hkdf = "0.2.0"
trussed-manage = "0.1.0"
trussed-se050-manage = { version = "0.1.0", optional = true }
trussed-wrap-key-to-file = "0.1.0"
trussed-fs-info = "0.1.0"

# apps
admin-app = "0.1.0"
Expand Down
19 changes: 19 additions & 0 deletions components/apps/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use trussed_auth::{AuthBackend, AuthContext, AuthExtension, MAX_HW_KEY_LEN};
use trussed_rsa_alloc::SoftwareRsa;

use trussed_chunked::ChunkedExtension;
use trussed_fs_info::FsInfoExtension;
use trussed_hkdf::HkdfExtension;
use trussed_manage::ManageExtension;
use trussed_staging::{StagingBackend, StagingContext};
Expand Down Expand Up @@ -306,6 +307,15 @@ impl<T: Twi, D: Delay> ExtensionDispatch for Dispatch<T, D> {
request,
resources,
),
Extension::FsInfo => {
ExtensionImpl::<FsInfoExtension>::extension_request_serialized(
&mut self.staging,
&mut ctx.core,
&mut ctx.backends.staging,
request,
resources,
)
}
#[allow(unreachable_patterns)]
_ => Err(TrussedError::RequestNotAvailable),
},
Expand Down Expand Up @@ -395,6 +405,7 @@ pub enum Extension {
Chunked,
WrapKeyToFile,
Manage,
FsInfo,
#[cfg(feature = "webcrypt")]
HmacSha256P256,
#[cfg(feature = "se050")]
Expand All @@ -414,6 +425,7 @@ impl From<Extension> for u8 {
#[cfg(feature = "se050")]
Extension::Se050Manage => 5,
Extension::Hkdf => 6,
Extension::FsInfo => 7,
}
}
}
Expand All @@ -433,6 +445,7 @@ impl TryFrom<u8> for Extension {
#[cfg(feature = "se050")]
5 => Ok(Extension::Se050Manage),
6 => Ok(Extension::Hkdf),
7 => Ok(Extension::FsInfo),
_ => Err(TrussedError::InternalError),
}
}
Expand Down Expand Up @@ -483,6 +496,12 @@ impl<T: Twi, D: Delay> ExtensionId<Se050ManageExtension> for Dispatch<T, D> {
const ID: Self::Id = Self::Id::Se050Manage;
}

impl<T: Twi, D: Delay> ExtensionId<FsInfoExtension> for Dispatch<T, D> {
type Id = Extension;

const ID: Self::Id = Self::Id::FsInfo;
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 30cc5fc

Please sign in to comment.