Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ optee-utee = { version = "0.10.0", path = "optee-utee" }
optee-utee-macros = { version = "0.10.0", path = "optee-utee-macros" }
optee-utee-sys = { version = "0.10.0", path = "optee-utee-sys" }

aligned-vec = { version = "0.6.4", default-features = false }
bitflags = "2.13.2"
num_enum = { version = "0.7.6", default-features = false }
uuid = { version = "1.29.0", default-features = false }
Expand Down
12 changes: 11 additions & 1 deletion crates/optee-utee-sys/src/tee_api_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,17 @@ pub struct TEE_OperationInfo {
}

#[repr(C)]
#[derive(Clone, Copy)]
pub struct TEE_OperationInfoKey {
pub keySize: u32,
pub requiredKeyUsage: u32,
}

/// Fixed header of a C flexible-array object.
///
/// This type is deliberately not `Copy` or `Clone`: a copy would duplicate
/// only this header, not the `numberOfKeys` key entries that follow it in
/// the same allocation.
#[repr(C)]
pub struct TEE_OperationInfoMultiple {
pub algorithm: u32,
Expand All @@ -175,7 +181,11 @@ pub struct TEE_OperationInfoMultiple {
pub handleState: u32,
pub operationState: u32,
pub numberOfKeys: u32,
pub keyInformation: *mut TEE_OperationInfoKey,
/// C flexible array member: the fixed part ends here and
/// `numberOfKeys` entries of [`TEE_OperationInfoKey`] follow the
/// struct in the same allocation. A zero-length array gives the
/// field the right offset without adding to `size_of`.
pub keyInformation: [TEE_OperationInfoKey; 0],
}

// Time & Date API
Expand Down
2 changes: 1 addition & 1 deletion crates/optee-utee-systest/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn generate_cfg(ta_include_path: PathBuf) -> ctest::TestGenerator {
let s = s.ident();
let field = field.ident();
(s == "ta_head" && field == "entry")
|| (s == "TEE_OperationInfoMultiple" && field == "keyInformation") // va_list
|| (s == "TEE_OperationInfoMultiple" && field == "keyInformation") // flexible array member
|| (s == "TEE_Attribute" && field == "content") // anonymous union fields
})
.skip_fn(|s| {
Expand Down
1 change: 1 addition & 0 deletions crates/optee-utee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ edition.workspace = true
[dependencies]
optee-utee-sys.workspace = true
optee-utee-macros.workspace = true
aligned-vec.workspace = true
bitflags.workspace = true
uuid.workspace = true
hex.workspace = true
Expand Down
Loading
Loading