[PATCH] fix(message): correct wrong field type in StartAuthSession
Jarkko Sakkinen <[email protected]> Mon, 1 Sep 2025 00:49:15 +0300
| Newsgroups | dev.linux.lists.tpm-protocol,dev.linux.lists.tpm2 |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Jarkko Sakkinen <[email protected]> --- Will be immediately applied. src/macro/mod.rs | 1 + src/message/session.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/macro/mod.rs b/src/macro/mod.rs index 782d3f7..2070b62 100644 --- a/src/macro/mod.rs +++ b/src/macro/mod.rs @@ -172,6 +172,7 @@ macro_rules! tpm_dispatch { } /// A TPM command + #[allow(clippy::large_enum_variant)] #[derive(Debug, PartialEq, Eq, Clone)] pub enum TpmCommandBody { $( $variant($cmd), )* diff --git a/src/message/session.rs b/src/message/session.rs index 24c883a..c2e29a6 100644 --- a/src/message/session.rs +++ b/src/message/session.rs @@ -5,7 +5,7 @@ //! 11.2 `TPM2_PolicyRestart` use crate::{ - data::{Tpm2b, Tpm2bNonce, TpmAlgId, TpmCc, TpmSe, TpmtSymDefObject}, + data::{Tpm2bEncryptedSecret, Tpm2bNonce, TpmAlgId, TpmCc, TpmSe, TpmtSymDefObject}, tpm_struct, TpmSession, }; use core::fmt::Debug; @@ -23,7 +23,7 @@ tpm_struct! { }, parameters: { pub nonce_caller: Tpm2bNonce, - pub encrypted_salt: Tpm2b, + pub encrypted_salt: Tpm2bEncryptedSecret, pub session_type: TpmSe, pub symmetric: TpmtSymDefObject, pub auth_hash: TpmAlgId, -- 2.39.5