Skip to main content

tss_esapi/structures/
result.rs

1// Copyright 2020 Contributors to the Parsec project.
2// SPDX-License-Identifier: Apache-2.0
3
4use crate::{
5    handles::KeyHandle,
6    interface_types::YesNo,
7    structures::{CreationData, CreationTicket, Digest, Private, Public},
8};
9
10#[allow(missing_debug_implementations)]
11pub struct CreateKeyResult {
12    pub out_private: Private,
13    pub out_public: Public,
14    pub creation_data: CreationData,
15    pub creation_hash: Digest,
16    pub creation_ticket: CreationTicket,
17}
18
19#[allow(missing_debug_implementations)]
20pub struct CreatePrimaryKeyResult {
21    pub key_handle: KeyHandle,
22    pub out_public: Public,
23    pub creation_data: CreationData,
24    pub creation_hash: Digest,
25    pub creation_ticket: CreationTicket,
26}
27
28#[derive(Debug, Clone, Copy, PartialEq, Eq)]
29pub struct PcrAllocateResult {
30    /// YES if the allocation succeeded.
31    pub allocation_success: YesNo,
32    /// Maximum number of PCR that may be in a bank.
33    pub max_pcr: u32,
34    /// Number of octets required to satisfy the request.
35    pub size_needed: u32,
36    /// Number of octets available. Computed before the allocation.
37    pub size_available: u32,
38}