tpm2_protocol/message/
miscellaneous_management.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2// Copyright (c) 2025 Opinsys Oy
3
4//! 26.2 `TPM2_PP_Commands`
5//! 26.3 `TPM2_SetAlgorithmSet`
6
7use crate::{
8    data::{TpmCc, TpmlCc},
9    tpm_struct,
10};
11use core::fmt::Debug;
12
13tpm_struct! {
14    #[derive(Debug, PartialEq, Eq, Clone)]
15    kind: Command,
16    name: TpmPpCommandsCommand,
17    cc: TpmCc::PpCommands,
18    no_sessions: false,
19    with_sessions: true,
20    handles: {
21        pub auth: crate::data::TpmiRhHierarchy,
22    },
23    parameters: {
24        pub set_list: TpmlCc,
25        pub clear_list: TpmlCc,
26    }
27}
28
29tpm_struct! {
30    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
31    kind: Response,
32    name: TpmPpCommandsResponse,
33    cc: TpmCc::PpCommands,
34    no_sessions: false,
35    with_sessions: true,
36    handles: {},
37    parameters: {}
38}
39
40tpm_struct! {
41    #[derive(Debug, PartialEq, Eq, Clone, Copy)]
42    kind: Command,
43    name: TpmSetAlgorithmSetCommand,
44    cc: TpmCc::SetAlgorithmSet,
45    no_sessions: false,
46    with_sessions: true,
47    handles: {
48        pub auth_handle: crate::data::TpmiRhHierarchy,
49    },
50    parameters: {
51        pub algorithm_set: u32,
52    }
53}
54
55tpm_struct! {
56    #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
57    kind: Response,
58    name: TpmSetAlgorithmSetResponse,
59    cc: TpmCc::SetAlgorithmSet,
60    no_sessions: false,
61    with_sessions: true,
62    handles: {},
63    parameters: {}
64}