tss-esapi-sys-0.5.0/.cargo_vcs_info.json 0000644 00000000153 00000000001 0013561 0 ustar {
"git": {
"sha1": "e7eef64fdf1ac1945a6d382e23fdfcf14aed5436"
},
"path_in_vcs": "tss-esapi-sys"
} tss-esapi-sys-0.5.0/Cargo.toml 0000644 00000002243 00000000001 0011561 0 ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "tss-esapi-sys"
version = "0.5.0"
authors = ["Parsec Project Contributors"]
links = "tss2-esys"
description = "FFI wrapper around TSS 2.0 Enhanced System API"
documentation = "https://docs.rs/crate/tss-esapi-sys"
readme = "README.md"
keywords = [
"tpm",
"tss",
"esys",
"esapi",
]
categories = [
"api-bindings",
"external-ffi-bindings",
"cryptography",
]
license = "Apache-2.0"
repository = "https://github.com/parallaxsecond/rust-tss-esapi"
[build-dependencies.bindgen]
version = "0.66.1"
optional = true
[build-dependencies.pkg-config]
version = "0.3.18"
[build-dependencies.target-lexicon]
version = "0.12.0"
[features]
generate-bindings = ["bindgen"]
tss-esapi-sys-0.5.0/Cargo.toml.orig 0000644 0000000 0000000 00000001171 10461020230 0015241 0 ustar 0000000 0000000 [package]
name = "tss-esapi-sys"
version = "0.5.0"
authors = ["Parsec Project Contributors"]
edition = "2018"
description = "FFI wrapper around TSS 2.0 Enhanced System API"
readme = "README.md"
keywords = ["tpm", "tss", "esys", "esapi"]
categories = ["api-bindings", "external-ffi-bindings", "cryptography"]
license = "Apache-2.0"
repository = "https://github.com/parallaxsecond/rust-tss-esapi"
documentation = "https://docs.rs/crate/tss-esapi-sys"
links = "tss2-esys"
[build-dependencies]
bindgen = { version = "0.66.1", optional = true }
pkg-config = "0.3.18"
target-lexicon = "0.12.0"
[features]
generate-bindings = ["bindgen"]
tss-esapi-sys-0.5.0/LICENSE 0000644 0000000 0000000 00000026136 10461020230 0013367 0 ustar 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
tss-esapi-sys-0.5.0/README.md 0000644 0000000 0000000 00000006401 10461020230 0013632 0 ustar 0000000 0000000 # TPM2 Software Stack Rust Wrapper
This is the lower-level wrapper that exposes a minimal, low-level C
interface to Rust to [TSS](https://github.com/tpm2-software/tpm2-tss).
## Dependencies
This crate exposes an interface for the TSS Enhanced System API and thus
links to libraries that expose this interface. In order to allow proper use
of the ESAPI, this FFI layer includes bindings to TCTI and MU headers, and
must therefore link to all of them at build time.
The paths to the libraries are discovered using `pkg-config` - make sure they
are discoverable in this way on your system. Our build script looks for
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `2.3.3` is
required for all of them.
Having installed the open-source implementation libraries at `/usr/local/lib` (by default), it
might happen that `pkg-config` can not find them. Run the following command if that is the
case:
```bash
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
```
The FFI bindings presented by this crate can be either those commited in the
crate under `src/bindings` or generated on the fly from the library headers
found on the system, at build time. For generating the bindings at build time
please enable the `generate-bindings` feature, as it is not enabled by default.
The build script will then identify the header files using `pkg-config` and
generate fresh bindings from them.
NOTE: Only a limited set of bindings are committed and their target triplet
is included in the name of the file - if the triplet you require is not
available, feel free to raise a Pull Request to add it or to use build-time
generation of bindings. All the committed bindings **MUST** be generated from
the library version found under the `vendor` submodule.
## Cross compiling
Cross-compilation can be done as long as you have on your build system the TSS
libraries compiled for your target system of choice. We rely on `pkg-config` to
identify the libraries which we link against. Installing `tpm2-tss` does yield
`.pc` files which can be used for this purpose, but depending on the exact build
environment setup, the configuration and compilation of `tpm2-tss` could require
some special tailoring.
We include cross-compilation builds as a nightly check in Github Actions - you
can find them
[here](https://github.com/parallaxsecond/rust-tss-esapi/blob/main/tss-esapi/tests/cross-compile.sh)
as an example of the steps needed. You can find more information on using
`pkg-config` when cross-compiling
[here](https://github.com/parallaxsecond/rust-tss-esapi/issues/204). Our
wrapper script around `pkg-config` can be seen
[here](https://github.com/parallaxsecond/rust-tss-esapi/blob/main/tss-esapi/tests/pkg-config).
Be advised that in some cases the linker used might need to be set manually in
`.cargo/config`.
*Copyright 2021 Contributors to the Parsec project.*
tss-esapi-sys-0.5.0/build.rs 0000644 0000000 0000000 00000010556 10461020230 0014026 0 ustar 0000000 0000000 // Copyright 2021 Contributors to the Parsec project.
// SPDX-License-Identifier: Apache-2.0
#[cfg(feature = "generate-bindings")]
use std::path::PathBuf;
const MINIMUM_VERSION: &str = "2.4.6";
fn main() {
if std::env::var("DOCS_RS").is_ok() {
// Nothing to be done for docs.rs builds.
return;
}
#[cfg(feature = "generate-bindings")]
{
let out_path = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
let esys_path = out_path.join("tss_esapi_bindings.rs");
generate_from_system(esys_path);
}
#[cfg(not(feature = "generate-bindings"))]
{
use std::str::FromStr;
use target_lexicon::{Architecture, OperatingSystem, Triple};
let target = Triple::from_str(&std::env::var("TARGET").unwrap())
.expect("Failed to parse target triple");
match (target.architecture, target.operating_system) {
(Architecture::Arm(_), OperatingSystem::Linux) => {}
(Architecture::Aarch64(_), OperatingSystem::Linux) => {}
(Architecture::X86_64, OperatingSystem::Darwin) => {}
(Architecture::X86_64, OperatingSystem::Linux) => {}
(arch, os) => {
panic!("Compilation target (architecture, OS) tuple ({}, {}) is not part of the supported tuples. Please compile with the \"generate-bindings\" feature or add support for your platform :)", arch, os);
}
}
pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-sys")
.expect("Failed to find tss2-sys library.");
let tss2_esys = pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-esys")
.expect("Failed to find tss2-esys library.");
pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-tctildr")
.expect("Failed to find tss2-tctildr library.");
pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-mu")
.expect("Failed to find tss2-mu library.");
println!("cargo:version={}", tss2_esys.version);
}
}
#[cfg(feature = "generate-bindings")]
pub fn generate_from_system(esapi_out: PathBuf) {
pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-sys")
.expect("Failed to find tss2-sys library.");
let tss2_esys = pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-esys")
.expect("Failed to find tss2-esys");
let tss2_tctildr = pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-tctildr")
.expect("Failed to find tss2-tctildr");
let tss2_mu = pkg_config::Config::new()
.atleast_version(MINIMUM_VERSION)
.probe("tss2-mu")
.expect("Failed to find tss2-mu");
println!("cargo:version={}", tss2_esys.version);
// These three pkg-config files should contain only one include/lib path.
let tss2_esys_include_path = tss2_esys.include_paths[0]
.clone()
.into_os_string()
.into_string()
.expect("Error converting OsString to String.");
let tss2_tctildr_include_path = tss2_tctildr.include_paths[0]
.clone()
.into_os_string()
.into_string()
.expect("Error converting OsString to String.");
let tss2_mu_include_path = tss2_mu.include_paths[0]
.clone()
.into_os_string()
.into_string()
.expect("Error converting OsString to String.");
bindgen::Builder::default()
.size_t_is_usize(false)
.clang_arg(format!("-I{}/tss2/", tss2_esys_include_path))
.clang_arg(format!("-I{}/tss2/", tss2_tctildr_include_path))
.clang_arg(format!("-I{}/tss2/", tss2_mu_include_path))
.header(format!("{}/tss2/tss2_esys.h", tss2_esys_include_path))
.header(format!("{}/tss2/tss2_tctildr.h", tss2_tctildr_include_path))
.header(format!("{}/tss2/tss2_mu.h", tss2_mu_include_path))
// See this issue: https://github.com/parallaxsecond/rust-cryptoki/issues/12
.blocklist_type("max_align_t")
.generate_comments(false)
.derive_default(true)
.generate()
.expect("Unable to generate bindings to TSS2 ESYS APIs.")
.write_to_file(esapi_out)
.expect("Couldn't write ESYS bindings!");
}
tss-esapi-sys-0.5.0/regenerate-bindings.sh 0000755 0000000 0000000 00000006161 10461020230 0016631 0 ustar 0000000 0000000 #!/usr/bin/env bash
# Copyright 2021 Contributors to the Parsec project.
# SPDX-License-Identifier: Apache-2.0
# Cross compile the `tss-esapi` crate (and its dependencies) for Armv7 and Aarch64
# In order to cross-compile the TSS library we need to also cross-compile OpenSSL
set -euf -o pipefail
OPENSSL_GIT="https://github.com/openssl/openssl.git"
OPENSSL_VERSION="OpenSSL_1_1_1j"
TPM2_TSS_GIT="https://github.com/tpm2-software/tpm2-tss.git"
TPM2_TSS_VERSION="2.4.6"
export SYSROOT="/tmp/sysroot"
git_checkout() {
if [ ! -d "/tmp/$(basename "$1" ".git")" ]; then
pushd /tmp
git clone "$1" --branch "$2"
popd
fi
}
prepare_sysroot() {
# Prepare the SYSROOT
[ -d "$SYSROOT" ] && rm -fr "$SYSROOT"
mkdir -p "$SYSROOT"
# Allow the `pkg-config` crate to cross-compile
export PKG_CONFIG_ALLOW_CROSS=1
export PKG_CONFIG_PATH="$SYSROOT"/lib/pkgconfig:"$SYSROOT"/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
}
cross-compile-openssl() {
pushd /tmp/openssl
# Compile and copy files over
./Configure $2 shared --prefix="$SYSROOT" --openssldir="$SYSROOT"/openssl --cross-compile-prefix=$1-
make clean
make depend
make -j$(nproc)
make install_sw
popd
}
cross-compile-tpm2-tss() {
pushd /tmp/tpm2-tss
[ ! -f configure ] && ./bootstrap
./configure --enable-fapi=no --prefix=/ --build=x86_64-pc-linux-gnu --host=$1 --target=$1 CC=$1-gcc
make clean
make -j$(nproc)
make DESTDIR="$SYSROOT" install
popd
}
# Download cross-compilers
sudo apt update
sudo apt install -y gcc-multilib
sudo apt install -y gcc-arm-linux-gnueabi
sudo apt install -y gcc-aarch64-linux-gnu
# Download development version for tpm2-tss
sudo apt install -y libtss2-dev
# Download other dependencies
sudo apt install -y autoconf
sudo apt install -y autoconf-archive
sudo apt install -y cmake
sudo apt install -y libclang-dev
sudo apt install -y libtool
sudo apt install -y pkgconf
# Download OpenSSL, tpm2-tss and dependencies source code
git_checkout "$OPENSSL_GIT" "$OPENSSL_VERSION"
git_checkout "$TPM2_TSS_GIT" "$TPM2_TSS_VERSION"
# Regenerate bindings for x86_64-unknown-linux-gnu
cargo clean
cargo build --features generate-bindings
find ../target -name tss_esapi_bindings.rs -exec cp {} ./src/bindings/x86_64-unknown-linux-gnu.rs \;
# Clean and prepare SYSROOT
prepare_sysroot
# Regenerate bindings for aarch64-unknown-linux-gnu
cross-compile-openssl aarch64-linux-gnu linux-generic64
cross-compile-tpm2-tss aarch64-linux-gnu
rustup target add aarch64-unknown-linux-gnu
cargo clean
cargo build --features generate-bindings --target aarch64-unknown-linux-gnu
find ../target -name tss_esapi_bindings.rs -exec cp {} ./src/bindings/aarch64-unknown-linux-gnu.rs \;
# Clean and prepare SYSROOT
prepare_sysroot
# Regenerate bindings for armv7-unknown-linux-gnueabi
cross-compile-openssl arm-linux-gnueabi linux-generic32
cross-compile-tpm2-tss arm-linux-gnueabi
rustup target add armv7-unknown-linux-gnueabi
cargo clean
cargo build --features generate-bindings --target armv7-unknown-linux-gnueabi
find ../target -name tss_esapi_bindings.rs -exec cp {} ./src/bindings/arm-unknown-linux-gnueabi.rs \;
tss-esapi-sys-0.5.0/src/bindings/aarch64-unknown-linux-gnu.rs 0000644 0000000 0000000 00002001372 10461020230 0022162 0 ustar 0000000 0000000 /* automatically generated by rust-bindgen 0.66.1 */
pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 32;
pub const __WORDSIZE32_SIZE_ULONG: u32 = 0;
pub const __WORDSIZE32_PTRDIFF_LONG: u32 = 0;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 32;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 0;
pub const __STATFS_MATCHES_STATFS64: u32 = 0;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i32 = -2147483648;
pub const INT_FAST32_MIN: i32 = -2147483648;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u32 = 2147483647;
pub const INT_FAST32_MAX: u32 = 2147483647;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: u32 = 4294967295;
pub const UINT_FAST32_MAX: u32 = 4294967295;
pub const INTPTR_MIN: i32 = -2147483648;
pub const INTPTR_MAX: u32 = 2147483647;
pub const UINTPTR_MAX: u32 = 4294967295;
pub const PTRDIFF_MIN: i32 = -2147483648;
pub const PTRDIFF_MAX: u32 = 2147483647;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: u32 = 4294967295;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const TSS2_RC_LAYER_SHIFT: u32 = 16;
pub const TSS2_BASE_RC_GENERAL_FAILURE: u32 = 1;
pub const TSS2_BASE_RC_NOT_IMPLEMENTED: u32 = 2;
pub const TSS2_BASE_RC_BAD_CONTEXT: u32 = 3;
pub const TSS2_BASE_RC_ABI_MISMATCH: u32 = 4;
pub const TSS2_BASE_RC_BAD_REFERENCE: u32 = 5;
pub const TSS2_BASE_RC_INSUFFICIENT_BUFFER: u32 = 6;
pub const TSS2_BASE_RC_BAD_SEQUENCE: u32 = 7;
pub const TSS2_BASE_RC_NO_CONNECTION: u32 = 8;
pub const TSS2_BASE_RC_TRY_AGAIN: u32 = 9;
pub const TSS2_BASE_RC_IO_ERROR: u32 = 10;
pub const TSS2_BASE_RC_BAD_VALUE: u32 = 11;
pub const TSS2_BASE_RC_NOT_PERMITTED: u32 = 12;
pub const TSS2_BASE_RC_INVALID_SESSIONS: u32 = 13;
pub const TSS2_BASE_RC_NO_DECRYPT_PARAM: u32 = 14;
pub const TSS2_BASE_RC_NO_ENCRYPT_PARAM: u32 = 15;
pub const TSS2_BASE_RC_BAD_SIZE: u32 = 16;
pub const TSS2_BASE_RC_MALFORMED_RESPONSE: u32 = 17;
pub const TSS2_BASE_RC_INSUFFICIENT_CONTEXT: u32 = 18;
pub const TSS2_BASE_RC_INSUFFICIENT_RESPONSE: u32 = 19;
pub const TSS2_BASE_RC_INCOMPATIBLE_TCTI: u32 = 20;
pub const TSS2_BASE_RC_NOT_SUPPORTED: u32 = 21;
pub const TSS2_BASE_RC_BAD_TCTI_STRUCTURE: u32 = 22;
pub const TSS2_BASE_RC_MEMORY: u32 = 23;
pub const TSS2_BASE_RC_BAD_TR: u32 = 24;
pub const TSS2_BASE_RC_MULTIPLE_DECRYPT_SESSIONS: u32 = 25;
pub const TSS2_BASE_RC_MULTIPLE_ENCRYPT_SESSIONS: u32 = 26;
pub const TSS2_BASE_RC_RSP_AUTH_FAILED: u32 = 27;
pub const TSS2_BASE_RC_NO_CONFIG: u32 = 28;
pub const TSS2_BASE_RC_BAD_PATH: u32 = 29;
pub const TSS2_BASE_RC_NOT_DELETABLE: u32 = 30;
pub const TSS2_BASE_RC_PATH_ALREADY_EXISTS: u32 = 31;
pub const TSS2_BASE_RC_KEY_NOT_FOUND: u32 = 32;
pub const TSS2_BASE_RC_SIGNATURE_VERIFICATION_FAILED: u32 = 33;
pub const TSS2_BASE_RC_HASH_MISMATCH: u32 = 34;
pub const TSS2_BASE_RC_KEY_NOT_DUPLICABLE: u32 = 35;
pub const TSS2_BASE_RC_PATH_NOT_FOUND: u32 = 36;
pub const TSS2_BASE_RC_NO_CERT: u32 = 37;
pub const TSS2_BASE_RC_NO_PCR: u32 = 38;
pub const TSS2_BASE_RC_PCR_NOT_RESETTABLE: u32 = 39;
pub const TSS2_BASE_RC_BAD_TEMPLATE: u32 = 40;
pub const TSS2_BASE_RC_AUTHORIZATION_FAILED: u32 = 41;
pub const TSS2_BASE_RC_AUTHORIZATION_UNKNOWN: u32 = 42;
pub const TSS2_BASE_RC_NV_NOT_READABLE: u32 = 43;
pub const TSS2_BASE_RC_NV_TOO_SMALL: u32 = 44;
pub const TSS2_BASE_RC_NV_NOT_WRITEABLE: u32 = 45;
pub const TSS2_BASE_RC_POLICY_UNKNOWN: u32 = 46;
pub const TSS2_BASE_RC_NV_WRONG_TYPE: u32 = 47;
pub const TSS2_BASE_RC_NAME_ALREADY_EXISTS: u32 = 48;
pub const TSS2_BASE_RC_NO_TPM: u32 = 49;
pub const TSS2_BASE_RC_BAD_KEY: u32 = 50;
pub const TSS2_BASE_RC_NO_HANDLE: u32 = 51;
pub const TSS2_LAYER_IMPLEMENTATION_SPECIFIC_OFFSET: u32 = 63488;
pub const TSS2_LEVEL_IMPLEMENTATION_SPECIFIC_SHIFT: u32 = 11;
pub const TPM2_MAX_COMMAND_SIZE: u32 = 4096;
pub const TPM2_MAX_RESPONSE_SIZE: u32 = 4096;
pub const TPM2_NUM_PCR_BANKS: u32 = 16;
pub const TPM2_MAX_DIGEST_BUFFER: u32 = 1024;
pub const TPM2_MAX_NV_BUFFER_SIZE: u32 = 2048;
pub const TPM2_MAX_PCRS: u32 = 32;
pub const TPM2_MAX_ALG_LIST_SIZE: u32 = 128;
pub const TPM2_MAX_CAP_CC: u32 = 256;
pub const TPM2_MAX_CAP_BUFFER: u32 = 1024;
pub const TPM2_MAX_CONTEXT_SIZE: u32 = 5120;
pub const TPM2_SHA_DIGEST_SIZE: u32 = 20;
pub const TPM2_SHA1_DIGEST_SIZE: u32 = 20;
pub const TPM2_SHA256_DIGEST_SIZE: u32 = 32;
pub const TPM2_SHA384_DIGEST_SIZE: u32 = 48;
pub const TPM2_SHA512_DIGEST_SIZE: u32 = 64;
pub const TPM2_SM3_256_DIGEST_SIZE: u32 = 32;
pub const TPM2_MAX_SYM_BLOCK_SIZE: u32 = 16;
pub const TPM2_MAX_SYM_DATA: u32 = 256;
pub const TPM2_MAX_ECC_KEY_BYTES: u32 = 128;
pub const TPM2_MAX_SYM_KEY_BYTES: u32 = 32;
pub const TPM2_MAX_RSA_KEY_BYTES: u32 = 512;
pub const TPM2_LABEL_MAX_BUFFER: u32 = 32;
pub const TPM2_PCR_SELECT_MAX: u32 = 4;
pub const TPM2_PRIVATE_VENDOR_SPECIFIC_BYTES: u32 = 1280;
pub const TPMA_LOCALITY_EXTENDED_SHIFT: u32 = 5;
pub const TPMA_CC_COMMANDINDEX_SHIFT: u32 = 0;
pub const TPMA_CC_CHANDLES_SHIFT: u32 = 25;
pub const TPMA_CC_RES_SHIFT: u32 = 30;
pub const TPM2_NO: u32 = 0;
pub const TPM2_YES: u32 = 1;
pub const TPM2_NV_INDEX_INDEX_SHIFT: u32 = 0;
pub const TPM2_NV_INDEX_RH_NV_SHIFT: u32 = 24;
pub const TPMA_NV_TPM2_NT_SHIFT: u32 = 4;
pub const _SYS_POLL_H: u32 = 1;
pub const POLLIN: u32 = 1;
pub const POLLPRI: u32 = 2;
pub const POLLOUT: u32 = 4;
pub const POLLRDNORM: u32 = 64;
pub const POLLRDBAND: u32 = 128;
pub const POLLWRNORM: u32 = 256;
pub const POLLWRBAND: u32 = 512;
pub const POLLERR: u32 = 8;
pub const POLLHUP: u32 = 16;
pub const POLLNVAL: u32 = 32;
pub const TSS2_TCTI_TIMEOUT_BLOCK: i32 = -1;
pub const TSS2_TCTI_TIMEOUT_NONE: u32 = 0;
pub const TSS2_TCTI_INFO_SYMBOL: &[u8; 15] = b"Tss2_Tcti_Info\0";
pub const TSS2_SYS_MAX_SESSIONS: u32 = 3;
pub const ESYS_TR_NONE: u32 = 4095;
pub const ESYS_TR_PASSWORD: u32 = 255;
pub const ESYS_TR_PCR0: u32 = 0;
pub const ESYS_TR_PCR1: u32 = 1;
pub const ESYS_TR_PCR2: u32 = 2;
pub const ESYS_TR_PCR3: u32 = 3;
pub const ESYS_TR_PCR4: u32 = 4;
pub const ESYS_TR_PCR5: u32 = 5;
pub const ESYS_TR_PCR6: u32 = 6;
pub const ESYS_TR_PCR7: u32 = 7;
pub const ESYS_TR_PCR8: u32 = 8;
pub const ESYS_TR_PCR9: u32 = 9;
pub const ESYS_TR_PCR10: u32 = 10;
pub const ESYS_TR_PCR11: u32 = 11;
pub const ESYS_TR_PCR12: u32 = 12;
pub const ESYS_TR_PCR13: u32 = 13;
pub const ESYS_TR_PCR14: u32 = 14;
pub const ESYS_TR_PCR15: u32 = 15;
pub const ESYS_TR_PCR16: u32 = 16;
pub const ESYS_TR_PCR17: u32 = 17;
pub const ESYS_TR_PCR18: u32 = 18;
pub const ESYS_TR_PCR19: u32 = 19;
pub const ESYS_TR_PCR20: u32 = 20;
pub const ESYS_TR_PCR21: u32 = 21;
pub const ESYS_TR_PCR22: u32 = 22;
pub const ESYS_TR_PCR23: u32 = 23;
pub const ESYS_TR_PCR24: u32 = 24;
pub const ESYS_TR_PCR25: u32 = 25;
pub const ESYS_TR_PCR26: u32 = 26;
pub const ESYS_TR_PCR27: u32 = 27;
pub const ESYS_TR_PCR28: u32 = 28;
pub const ESYS_TR_PCR29: u32 = 29;
pub const ESYS_TR_PCR30: u32 = 30;
pub const ESYS_TR_PCR31: u32 = 31;
pub const ESYS_TR_RH_OWNER: u32 = 257;
pub const ESYS_TR_RH_NULL: u32 = 263;
pub const ESYS_TR_RH_LOCKOUT: u32 = 266;
pub const ESYS_TR_RH_ENDORSEMENT: u32 = 267;
pub const ESYS_TR_RH_PLATFORM: u32 = 268;
pub const ESYS_TR_RH_PLATFORM_NV: u32 = 269;
pub const ESYS_TR_RH_AUTH_FIRST: u32 = 272;
pub const ESYS_TR_MIN_OBJECT: u32 = 4096;
pub const _INTTYPES_H: u32 = 1;
pub const ____gwchar_t_defined: u32 = 1;
pub const __PRI64_PREFIX: &[u8; 3] = b"ll\0";
pub const PRId8: &[u8; 2] = b"d\0";
pub const PRId16: &[u8; 2] = b"d\0";
pub const PRId32: &[u8; 2] = b"d\0";
pub const PRId64: &[u8; 4] = b"lld\0";
pub const PRIdLEAST8: &[u8; 2] = b"d\0";
pub const PRIdLEAST16: &[u8; 2] = b"d\0";
pub const PRIdLEAST32: &[u8; 2] = b"d\0";
pub const PRIdLEAST64: &[u8; 4] = b"lld\0";
pub const PRIdFAST8: &[u8; 2] = b"d\0";
pub const PRIdFAST64: &[u8; 4] = b"lld\0";
pub const PRIi8: &[u8; 2] = b"i\0";
pub const PRIi16: &[u8; 2] = b"i\0";
pub const PRIi32: &[u8; 2] = b"i\0";
pub const PRIi64: &[u8; 4] = b"lli\0";
pub const PRIiLEAST8: &[u8; 2] = b"i\0";
pub const PRIiLEAST16: &[u8; 2] = b"i\0";
pub const PRIiLEAST32: &[u8; 2] = b"i\0";
pub const PRIiLEAST64: &[u8; 4] = b"lli\0";
pub const PRIiFAST8: &[u8; 2] = b"i\0";
pub const PRIiFAST64: &[u8; 4] = b"lli\0";
pub const PRIo8: &[u8; 2] = b"o\0";
pub const PRIo16: &[u8; 2] = b"o\0";
pub const PRIo32: &[u8; 2] = b"o\0";
pub const PRIo64: &[u8; 4] = b"llo\0";
pub const PRIoLEAST8: &[u8; 2] = b"o\0";
pub const PRIoLEAST16: &[u8; 2] = b"o\0";
pub const PRIoLEAST32: &[u8; 2] = b"o\0";
pub const PRIoLEAST64: &[u8; 4] = b"llo\0";
pub const PRIoFAST8: &[u8; 2] = b"o\0";
pub const PRIoFAST64: &[u8; 4] = b"llo\0";
pub const PRIu8: &[u8; 2] = b"u\0";
pub const PRIu16: &[u8; 2] = b"u\0";
pub const PRIu32: &[u8; 2] = b"u\0";
pub const PRIu64: &[u8; 4] = b"llu\0";
pub const PRIuLEAST8: &[u8; 2] = b"u\0";
pub const PRIuLEAST16: &[u8; 2] = b"u\0";
pub const PRIuLEAST32: &[u8; 2] = b"u\0";
pub const PRIuLEAST64: &[u8; 4] = b"llu\0";
pub const PRIuFAST8: &[u8; 2] = b"u\0";
pub const PRIuFAST64: &[u8; 4] = b"llu\0";
pub const PRIx8: &[u8; 2] = b"x\0";
pub const PRIx16: &[u8; 2] = b"x\0";
pub const PRIx32: &[u8; 2] = b"x\0";
pub const PRIx64: &[u8; 4] = b"llx\0";
pub const PRIxLEAST8: &[u8; 2] = b"x\0";
pub const PRIxLEAST16: &[u8; 2] = b"x\0";
pub const PRIxLEAST32: &[u8; 2] = b"x\0";
pub const PRIxLEAST64: &[u8; 4] = b"llx\0";
pub const PRIxFAST8: &[u8; 2] = b"x\0";
pub const PRIxFAST64: &[u8; 4] = b"llx\0";
pub const PRIX8: &[u8; 2] = b"X\0";
pub const PRIX16: &[u8; 2] = b"X\0";
pub const PRIX32: &[u8; 2] = b"X\0";
pub const PRIX64: &[u8; 4] = b"llX\0";
pub const PRIXLEAST8: &[u8; 2] = b"X\0";
pub const PRIXLEAST16: &[u8; 2] = b"X\0";
pub const PRIXLEAST32: &[u8; 2] = b"X\0";
pub const PRIXLEAST64: &[u8; 4] = b"llX\0";
pub const PRIXFAST8: &[u8; 2] = b"X\0";
pub const PRIXFAST64: &[u8; 4] = b"llX\0";
pub const PRIdMAX: &[u8; 4] = b"lld\0";
pub const PRIiMAX: &[u8; 4] = b"lli\0";
pub const PRIoMAX: &[u8; 4] = b"llo\0";
pub const PRIuMAX: &[u8; 4] = b"llu\0";
pub const PRIxMAX: &[u8; 4] = b"llx\0";
pub const PRIXMAX: &[u8; 4] = b"llX\0";
pub const SCNd8: &[u8; 4] = b"hhd\0";
pub const SCNd16: &[u8; 3] = b"hd\0";
pub const SCNd32: &[u8; 2] = b"d\0";
pub const SCNd64: &[u8; 4] = b"lld\0";
pub const SCNdLEAST8: &[u8; 4] = b"hhd\0";
pub const SCNdLEAST16: &[u8; 3] = b"hd\0";
pub const SCNdLEAST32: &[u8; 2] = b"d\0";
pub const SCNdLEAST64: &[u8; 4] = b"lld\0";
pub const SCNdFAST8: &[u8; 4] = b"hhd\0";
pub const SCNdFAST64: &[u8; 4] = b"lld\0";
pub const SCNi8: &[u8; 4] = b"hhi\0";
pub const SCNi16: &[u8; 3] = b"hi\0";
pub const SCNi32: &[u8; 2] = b"i\0";
pub const SCNi64: &[u8; 4] = b"lli\0";
pub const SCNiLEAST8: &[u8; 4] = b"hhi\0";
pub const SCNiLEAST16: &[u8; 3] = b"hi\0";
pub const SCNiLEAST32: &[u8; 2] = b"i\0";
pub const SCNiLEAST64: &[u8; 4] = b"lli\0";
pub const SCNiFAST8: &[u8; 4] = b"hhi\0";
pub const SCNiFAST64: &[u8; 4] = b"lli\0";
pub const SCNu8: &[u8; 4] = b"hhu\0";
pub const SCNu16: &[u8; 3] = b"hu\0";
pub const SCNu32: &[u8; 2] = b"u\0";
pub const SCNu64: &[u8; 4] = b"llu\0";
pub const SCNuLEAST8: &[u8; 4] = b"hhu\0";
pub const SCNuLEAST16: &[u8; 3] = b"hu\0";
pub const SCNuLEAST32: &[u8; 2] = b"u\0";
pub const SCNuLEAST64: &[u8; 4] = b"llu\0";
pub const SCNuFAST8: &[u8; 4] = b"hhu\0";
pub const SCNuFAST64: &[u8; 4] = b"llu\0";
pub const SCNo8: &[u8; 4] = b"hho\0";
pub const SCNo16: &[u8; 3] = b"ho\0";
pub const SCNo32: &[u8; 2] = b"o\0";
pub const SCNo64: &[u8; 4] = b"llo\0";
pub const SCNoLEAST8: &[u8; 4] = b"hho\0";
pub const SCNoLEAST16: &[u8; 3] = b"ho\0";
pub const SCNoLEAST32: &[u8; 2] = b"o\0";
pub const SCNoLEAST64: &[u8; 4] = b"llo\0";
pub const SCNoFAST8: &[u8; 4] = b"hho\0";
pub const SCNoFAST64: &[u8; 4] = b"llo\0";
pub const SCNx8: &[u8; 4] = b"hhx\0";
pub const SCNx16: &[u8; 3] = b"hx\0";
pub const SCNx32: &[u8; 2] = b"x\0";
pub const SCNx64: &[u8; 4] = b"llx\0";
pub const SCNxLEAST8: &[u8; 4] = b"hhx\0";
pub const SCNxLEAST16: &[u8; 3] = b"hx\0";
pub const SCNxLEAST32: &[u8; 2] = b"x\0";
pub const SCNxLEAST64: &[u8; 4] = b"llx\0";
pub const SCNxFAST8: &[u8; 4] = b"hhx\0";
pub const SCNxFAST64: &[u8; 4] = b"llx\0";
pub const SCNdMAX: &[u8; 4] = b"lld\0";
pub const SCNiMAX: &[u8; 4] = b"lli\0";
pub const SCNoMAX: &[u8; 4] = b"llo\0";
pub const SCNuMAX: &[u8; 4] = b"llu\0";
pub const SCNxMAX: &[u8; 4] = b"llx\0";
pub const _STDLIB_H: u32 = 1;
pub const WNOHANG: u32 = 1;
pub const WUNTRACED: u32 = 2;
pub const WSTOPPED: u32 = 2;
pub const WEXITED: u32 = 4;
pub const WCONTINUED: u32 = 8;
pub const WNOWAIT: u32 = 16777216;
pub const __WNOTHREAD: u32 = 536870912;
pub const __WALL: u32 = 1073741824;
pub const __WCLONE: u32 = 2147483648;
pub const __ENUM_IDTYPE_T: u32 = 1;
pub const __W_CONTINUED: u32 = 65535;
pub const __WCOREFLAG: u32 = 128;
pub const __HAVE_FLOAT128: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
pub const __HAVE_FLOAT64X: u32 = 1;
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
pub const __HAVE_FLOAT16: u32 = 0;
pub const __HAVE_FLOAT32: u32 = 1;
pub const __HAVE_FLOAT64: u32 = 1;
pub const __HAVE_FLOAT32X: u32 = 1;
pub const __HAVE_FLOAT128X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
pub const __ldiv_t_defined: u32 = 1;
pub const __lldiv_t_defined: u32 = 1;
pub const RAND_MAX: u32 = 2147483647;
pub const EXIT_FAILURE: u32 = 1;
pub const EXIT_SUCCESS: u32 = 0;
pub const _SYS_TYPES_H: u32 = 1;
pub const __clock_t_defined: u32 = 1;
pub const __clockid_t_defined: u32 = 1;
pub const __time_t_defined: u32 = 1;
pub const __timer_t_defined: u32 = 1;
pub const __BIT_TYPES_DEFINED__: u32 = 1;
pub const _ENDIAN_H: u32 = 1;
pub const _BITS_ENDIAN_H: u32 = 1;
pub const __LITTLE_ENDIAN: u32 = 1234;
pub const __BIG_ENDIAN: u32 = 4321;
pub const __PDP_ENDIAN: u32 = 3412;
pub const _BITS_ENDIANNESS_H: u32 = 1;
pub const __BYTE_ORDER: u32 = 1234;
pub const __FLOAT_WORD_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const _BITS_BYTESWAP_H: u32 = 1;
pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
pub const _SYS_SELECT_H: u32 = 1;
pub const __FD_ZERO_STOS: &[u8; 6] = b"stosl\0";
pub const __sigset_t_defined: u32 = 1;
pub const __timeval_defined: u32 = 1;
pub const _STRUCT_TIMESPEC: u32 = 1;
pub const FD_SETSIZE: u32 = 1024;
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 24;
pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 36;
pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 32;
pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 20;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 0;
pub const __have_pthread_attr_t: u32 = 1;
pub const _ALLOCA_H: u32 = 1;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_longlong;
pub type __uint64_t = ::std::os::raw::c_ulonglong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_longlong;
pub type __u_quad_t = ::std::os::raw::c_ulonglong;
pub type __intmax_t = ::std::os::raw::c_longlong;
pub type __uintmax_t = ::std::os::raw::c_ulonglong;
pub type __dev_t = __uint64_t;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = __uint64_t;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_uint;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = __int64_t;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__fsid_t))
);
assert_eq!(
::std::mem::align_of::<__fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__fsid_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__fsid_t),
"::",
stringify!(__val)
)
);
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = __uint64_t;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = __int64_t;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = __uint64_t;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = __uint64_t;
pub type __fsword_t = ::std::os::raw::c_int;
pub type __ssize_t = ::std::os::raw::c_int;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_int;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type __time64_t = __int64_t;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_int;
pub type int_fast32_t = ::std::os::raw::c_int;
pub type int_fast64_t = ::std::os::raw::c_longlong;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_uint;
pub type uint_fast32_t = ::std::os::raw::c_uint;
pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type size_t = ::std::os::raw::c_ulong;
pub type wchar_t = ::std::os::raw::c_uint;
pub type UINT8 = u8;
pub type BYTE = u8;
pub type INT8 = i8;
pub type BOOL = ::std::os::raw::c_int;
pub type UINT16 = u16;
pub type INT16 = i16;
pub type UINT32 = u32;
pub type INT32 = i32;
pub type UINT64 = u64;
pub type INT64 = i64;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TSS2_ABI_VERSION {
pub tssCreator: u32,
pub tssFamily: u32,
pub tssLevel: u32,
pub tssVersion: u32,
}
#[test]
fn bindgen_test_layout_TSS2_ABI_VERSION() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
16usize,
concat!("Size of: ", stringify!(TSS2_ABI_VERSION))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TSS2_ABI_VERSION))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tssCreator) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TSS2_ABI_VERSION),
"::",
stringify!(tssCreator)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tssFamily) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TSS2_ABI_VERSION),
"::",
stringify!(tssFamily)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tssLevel) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TSS2_ABI_VERSION),
"::",
stringify!(tssLevel)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tssVersion) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(TSS2_ABI_VERSION),
"::",
stringify!(tssVersion)
)
);
}
pub type TSS2_RC = u32;
pub type TPM2_ALG_ID = UINT16;
pub type TPM2_ECC_CURVE = UINT16;
pub type TPM2_CC = UINT32;
pub type TPM2_ALGORITHM_ID = UINT32;
pub type TPM2_MODIFIER_INDICATOR = UINT32;
pub type TPM2_AUTHORIZATION_SIZE = UINT32;
pub type TPM2_PARAMETER_SIZE = UINT32;
pub type TPM2_KEY_SIZE = UINT16;
pub type TPM2_KEY_BITS = UINT16;
pub type TPM2_SPEC = UINT32;
pub type TPM2_GENERATED = UINT32;
pub type TPM2_RC = UINT32;
pub type TPM2_CLOCK_ADJUST = INT8;
pub type TPM2_EO = UINT16;
pub type TPM2_ST = UINT16;
pub type TPM2_SU = UINT16;
pub type TPM2_SE = UINT8;
pub type TPM2_CAP = UINT32;
pub type TPM2_PT = UINT32;
pub type TPM2_PT_PCR = UINT32;
pub type TPM2_PS = UINT32;
pub type TPM2_HANDLE = UINT32;
pub type TPM2_HT = UINT8;
pub type TPM2_RH = TPM2_HANDLE;
pub type TPM2_HC = TPM2_HANDLE;
pub type TPMA_ALGORITHM = u32;
pub type TPMA_OBJECT = u32;
pub type TPMA_SESSION = UINT8;
pub type TPMA_LOCALITY = UINT8;
pub type TPMA_PERMANENT = u32;
pub type TPMA_STARTUP_CLEAR = u32;
pub type TPMA_MEMORY = u32;
pub type TPMA_CC = u32;
pub type TPMA_MODES = u32;
pub type TPMI_YES_NO = BYTE;
pub type TPMI_DH_OBJECT = TPM2_HANDLE;
pub type TPMI_DH_PERSISTENT = TPM2_HANDLE;
pub type TPMI_DH_ENTITY = TPM2_HANDLE;
pub type TPMI_DH_PCR = TPM2_HANDLE;
pub type TPMI_SH_AUTH_SESSION = TPM2_HANDLE;
pub type TPMI_SH_HMAC = TPM2_HANDLE;
pub type TPMI_SH_POLICY = TPM2_HANDLE;
pub type TPMI_DH_CONTEXT = TPM2_HANDLE;
pub type TPMI_RH_HIERARCHY = TPM2_HANDLE;
pub type TPMI_RH_ENABLES = TPM2_HANDLE;
pub type TPMI_RH_HIERARCHY_AUTH = TPM2_HANDLE;
pub type TPMI_RH_PLATFORM = TPM2_HANDLE;
pub type TPMI_RH_OWNER = TPM2_HANDLE;
pub type TPMI_RH_ENDORSEMENT = TPM2_HANDLE;
pub type TPMI_RH_PROVISION = TPM2_HANDLE;
pub type TPMI_RH_CLEAR = TPM2_HANDLE;
pub type TPMI_RH_NV_AUTH = TPM2_HANDLE;
pub type TPMI_RH_LOCKOUT = TPM2_HANDLE;
pub type TPMI_RH_NV_INDEX = TPM2_HANDLE;
pub type TPMI_ALG_HASH = TPM2_ALG_ID;
pub type TPMI_ALG_ASYM = TPM2_ALG_ID;
pub type TPMI_ALG_SYM = TPM2_ALG_ID;
pub type TPMI_ALG_SYM_OBJECT = TPM2_ALG_ID;
pub type TPMI_ALG_SYM_MODE = TPM2_ALG_ID;
pub type TPMI_ALG_KDF = TPM2_ALG_ID;
pub type TPMI_ALG_SIG_SCHEME = TPM2_ALG_ID;
pub type TPMI_ECC_KEY_EXCHANGE = TPM2_ALG_ID;
pub type TPMI_ST_COMMAND_TAG = TPM2_ST;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_EMPTY {
pub empty: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_TPMS_EMPTY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1usize,
concat!("Size of: ", stringify!(TPMS_EMPTY))
);
assert_eq!(
::std::mem::align_of::(),
1usize,
concat!("Alignment of ", stringify!(TPMS_EMPTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).empty) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_EMPTY),
"::",
stringify!(empty)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_ALGORITHM_DESCRIPTION {
pub alg: TPM2_ALG_ID,
pub attributes: TPMA_ALGORITHM,
}
#[test]
fn bindgen_test_layout_TPMS_ALGORITHM_DESCRIPTION() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
8usize,
concat!("Size of: ", stringify!(TPMS_ALGORITHM_DESCRIPTION))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_ALGORITHM_DESCRIPTION))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ALGORITHM_DESCRIPTION),
"::",
stringify!(alg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ALGORITHM_DESCRIPTION),
"::",
stringify!(attributes)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_HA {
pub sha1: [BYTE; 20usize],
pub sha256: [BYTE; 32usize],
pub sha384: [BYTE; 48usize],
pub sha512: [BYTE; 64usize],
pub sm3_256: [BYTE; 32usize],
}
#[test]
fn bindgen_test_layout_TPMU_HA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
64usize,
concat!("Size of: ", stringify!(TPMU_HA))
);
assert_eq!(
::std::mem::align_of::(),
1usize,
concat!("Alignment of ", stringify!(TPMU_HA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sha1) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_HA),
"::",
stringify!(sha1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sha256) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_HA),
"::",
stringify!(sha256)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sha384) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_HA),
"::",
stringify!(sha384)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sha512) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_HA),
"::",
stringify!(sha512)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sm3_256) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_HA),
"::",
stringify!(sm3_256)
)
);
}
impl Default for TPMU_HA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMT_HA {
pub hashAlg: TPMI_ALG_HASH,
pub digest: TPMU_HA,
}
#[test]
fn bindgen_test_layout_TPMT_HA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
66usize,
concat!("Size of: ", stringify!(TPMT_HA))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMT_HA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_HA),
"::",
stringify!(hashAlg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMT_HA),
"::",
stringify!(digest)
)
);
}
impl Default for TPMT_HA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_DIGEST {
pub size: UINT16,
pub buffer: [BYTE; 64usize],
}
#[test]
fn bindgen_test_layout_TPM2B_DIGEST() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
66usize,
concat!("Size of: ", stringify!(TPM2B_DIGEST))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_DIGEST))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_DIGEST),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_DIGEST),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_DIGEST {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_DATA {
pub size: UINT16,
pub buffer: [BYTE; 64usize],
}
#[test]
fn bindgen_test_layout_TPM2B_DATA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
66usize,
concat!("Size of: ", stringify!(TPM2B_DATA))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_DATA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_DATA),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_DATA),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_DATA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPM2B_NONCE = TPM2B_DIGEST;
pub type TPM2B_AUTH = TPM2B_DIGEST;
pub type TPM2B_OPERAND = TPM2B_DIGEST;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_EVENT {
pub size: UINT16,
pub buffer: [BYTE; 1024usize],
}
#[test]
fn bindgen_test_layout_TPM2B_EVENT() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1026usize,
concat!("Size of: ", stringify!(TPM2B_EVENT))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_EVENT))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_EVENT),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_EVENT),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_EVENT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_MAX_BUFFER {
pub size: UINT16,
pub buffer: [BYTE; 1024usize],
}
#[test]
fn bindgen_test_layout_TPM2B_MAX_BUFFER() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1026usize,
concat!("Size of: ", stringify!(TPM2B_MAX_BUFFER))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_MAX_BUFFER))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_MAX_BUFFER),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_MAX_BUFFER),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_MAX_BUFFER {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_MAX_NV_BUFFER {
pub size: UINT16,
pub buffer: [BYTE; 2048usize],
}
#[test]
fn bindgen_test_layout_TPM2B_MAX_NV_BUFFER() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2050usize,
concat!("Size of: ", stringify!(TPM2B_MAX_NV_BUFFER))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_MAX_NV_BUFFER))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_MAX_NV_BUFFER),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_MAX_NV_BUFFER),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_MAX_NV_BUFFER {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPM2B_TIMEOUT = TPM2B_DIGEST;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPM2B_IV {
pub size: UINT16,
pub buffer: [BYTE; 16usize],
}
#[test]
fn bindgen_test_layout_TPM2B_IV() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
18usize,
concat!("Size of: ", stringify!(TPM2B_IV))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_IV))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_IV),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_IV),
"::",
stringify!(buffer)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_NAME {
pub digest: TPMT_HA,
pub handle: TPM2_HANDLE,
}
#[test]
fn bindgen_test_layout_TPMU_NAME() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
68usize,
concat!("Size of: ", stringify!(TPMU_NAME))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMU_NAME))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_NAME),
"::",
stringify!(digest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_NAME),
"::",
stringify!(handle)
)
);
}
impl Default for TPMU_NAME {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_NAME {
pub size: UINT16,
pub name: [BYTE; 68usize],
}
#[test]
fn bindgen_test_layout_TPM2B_NAME() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
70usize,
concat!("Size of: ", stringify!(TPM2B_NAME))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_NAME))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_NAME),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_NAME),
"::",
stringify!(name)
)
);
}
impl Default for TPM2B_NAME {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_PCR_SELECT {
pub sizeofSelect: UINT8,
pub pcrSelect: [BYTE; 4usize],
}
#[test]
fn bindgen_test_layout_TPMS_PCR_SELECT() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
5usize,
concat!("Size of: ", stringify!(TPMS_PCR_SELECT))
);
assert_eq!(
::std::mem::align_of::(),
1usize,
concat!("Alignment of ", stringify!(TPMS_PCR_SELECT))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_PCR_SELECT),
"::",
stringify!(sizeofSelect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(TPMS_PCR_SELECT),
"::",
stringify!(pcrSelect)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_PCR_SELECTION {
pub hash: TPMI_ALG_HASH,
pub sizeofSelect: UINT8,
pub pcrSelect: [BYTE; 4usize],
}
#[test]
fn bindgen_test_layout_TPMS_PCR_SELECTION() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
8usize,
concat!("Size of: ", stringify!(TPMS_PCR_SELECTION))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_PCR_SELECTION))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_PCR_SELECTION),
"::",
stringify!(hash)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMS_PCR_SELECTION),
"::",
stringify!(sizeofSelect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(TPMS_PCR_SELECTION),
"::",
stringify!(pcrSelect)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMT_TK_CREATION {
pub tag: TPM2_ST,
pub hierarchy: TPMI_RH_HIERARCHY,
pub digest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMT_TK_CREATION() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
76usize,
concat!("Size of: ", stringify!(TPMT_TK_CREATION))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMT_TK_CREATION))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_CREATION),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_CREATION),
"::",
stringify!(hierarchy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_CREATION),
"::",
stringify!(digest)
)
);
}
impl Default for TPMT_TK_CREATION {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMT_TK_VERIFIED {
pub tag: TPM2_ST,
pub hierarchy: TPMI_RH_HIERARCHY,
pub digest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMT_TK_VERIFIED() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
76usize,
concat!("Size of: ", stringify!(TPMT_TK_VERIFIED))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMT_TK_VERIFIED))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_VERIFIED),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_VERIFIED),
"::",
stringify!(hierarchy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_VERIFIED),
"::",
stringify!(digest)
)
);
}
impl Default for TPMT_TK_VERIFIED {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMT_TK_AUTH {
pub tag: TPM2_ST,
pub hierarchy: TPMI_RH_HIERARCHY,
pub digest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMT_TK_AUTH() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
76usize,
concat!("Size of: ", stringify!(TPMT_TK_AUTH))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMT_TK_AUTH))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_AUTH),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_AUTH),
"::",
stringify!(hierarchy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_AUTH),
"::",
stringify!(digest)
)
);
}
impl Default for TPMT_TK_AUTH {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMT_TK_HASHCHECK {
pub tag: TPM2_ST,
pub hierarchy: TPMI_RH_HIERARCHY,
pub digest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMT_TK_HASHCHECK() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
76usize,
concat!("Size of: ", stringify!(TPMT_TK_HASHCHECK))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMT_TK_HASHCHECK))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_HASHCHECK),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hierarchy) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_HASHCHECK),
"::",
stringify!(hierarchy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMT_TK_HASHCHECK),
"::",
stringify!(digest)
)
);
}
impl Default for TPMT_TK_HASHCHECK {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_ALG_PROPERTY {
pub alg: TPM2_ALG_ID,
pub algProperties: TPMA_ALGORITHM,
}
#[test]
fn bindgen_test_layout_TPMS_ALG_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
8usize,
concat!("Size of: ", stringify!(TPMS_ALG_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_ALG_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ALG_PROPERTY),
"::",
stringify!(alg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ALG_PROPERTY),
"::",
stringify!(algProperties)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_TAGGED_PROPERTY {
pub property: TPM2_PT,
pub value: UINT32,
}
#[test]
fn bindgen_test_layout_TPMS_TAGGED_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
8usize,
concat!("Size of: ", stringify!(TPMS_TAGGED_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_TAGGED_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_PROPERTY),
"::",
stringify!(property)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_PROPERTY),
"::",
stringify!(value)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_TAGGED_PCR_SELECT {
pub tag: TPM2_PT_PCR,
pub sizeofSelect: UINT8,
pub pcrSelect: [BYTE; 4usize],
}
#[test]
fn bindgen_test_layout_TPMS_TAGGED_PCR_SELECT() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
12usize,
concat!("Size of: ", stringify!(TPMS_TAGGED_PCR_SELECT))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_TAGGED_PCR_SELECT))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_PCR_SELECT),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sizeofSelect) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_PCR_SELECT),
"::",
stringify!(sizeofSelect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_PCR_SELECT),
"::",
stringify!(pcrSelect)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMS_TAGGED_POLICY {
pub handle: TPM2_HANDLE,
pub policyHash: TPMT_HA,
}
#[test]
fn bindgen_test_layout_TPMS_TAGGED_POLICY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
72usize,
concat!("Size of: ", stringify!(TPMS_TAGGED_POLICY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_TAGGED_POLICY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_POLICY),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).policyHash) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TAGGED_POLICY),
"::",
stringify!(policyHash)
)
);
}
impl Default for TPMS_TAGGED_POLICY {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_CC {
pub count: UINT32,
pub commandCodes: [TPM2_CC; 256usize],
}
#[test]
fn bindgen_test_layout_TPML_CC() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1028usize,
concat!("Size of: ", stringify!(TPML_CC))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_CC))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_CC),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).commandCodes) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_CC),
"::",
stringify!(commandCodes)
)
);
}
impl Default for TPML_CC {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_CCA {
pub count: UINT32,
pub commandAttributes: [TPMA_CC; 256usize],
}
#[test]
fn bindgen_test_layout_TPML_CCA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1028usize,
concat!("Size of: ", stringify!(TPML_CCA))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_CCA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_CCA),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).commandAttributes) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_CCA),
"::",
stringify!(commandAttributes)
)
);
}
impl Default for TPML_CCA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_ALG {
pub count: UINT32,
pub algorithms: [TPM2_ALG_ID; 128usize],
}
#[test]
fn bindgen_test_layout_TPML_ALG() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
260usize,
concat!("Size of: ", stringify!(TPML_ALG))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_ALG))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_ALG),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_ALG),
"::",
stringify!(algorithms)
)
);
}
impl Default for TPML_ALG {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_HANDLE {
pub count: UINT32,
pub handle: [TPM2_HANDLE; 254usize],
}
#[test]
fn bindgen_test_layout_TPML_HANDLE() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1020usize,
concat!("Size of: ", stringify!(TPML_HANDLE))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_HANDLE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_HANDLE),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_HANDLE),
"::",
stringify!(handle)
)
);
}
impl Default for TPML_HANDLE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_DIGEST {
pub count: UINT32,
pub digests: [TPM2B_DIGEST; 8usize],
}
#[test]
fn bindgen_test_layout_TPML_DIGEST() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
532usize,
concat!("Size of: ", stringify!(TPML_DIGEST))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_DIGEST))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_DIGEST),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_DIGEST),
"::",
stringify!(digests)
)
);
}
impl Default for TPML_DIGEST {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPML_DIGEST_VALUES {
pub count: UINT32,
pub digests: [TPMT_HA; 16usize],
}
#[test]
fn bindgen_test_layout_TPML_DIGEST_VALUES() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1060usize,
concat!("Size of: ", stringify!(TPML_DIGEST_VALUES))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_DIGEST_VALUES))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_DIGEST_VALUES),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digests) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_DIGEST_VALUES),
"::",
stringify!(digests)
)
);
}
impl Default for TPML_DIGEST_VALUES {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPML_PCR_SELECTION {
pub count: UINT32,
pub pcrSelections: [TPMS_PCR_SELECTION; 16usize],
}
#[test]
fn bindgen_test_layout_TPML_PCR_SELECTION() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
132usize,
concat!("Size of: ", stringify!(TPML_PCR_SELECTION))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_PCR_SELECTION))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_PCR_SELECTION),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrSelections) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_PCR_SELECTION),
"::",
stringify!(pcrSelections)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_ALG_PROPERTY {
pub count: UINT32,
pub algProperties: [TPMS_ALG_PROPERTY; 127usize],
}
#[test]
fn bindgen_test_layout_TPML_ALG_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1020usize,
concat!("Size of: ", stringify!(TPML_ALG_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_ALG_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_ALG_PROPERTY),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algProperties) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_ALG_PROPERTY),
"::",
stringify!(algProperties)
)
);
}
impl Default for TPML_ALG_PROPERTY {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_TAGGED_TPM_PROPERTY {
pub count: UINT32,
pub tpmProperty: [TPMS_TAGGED_PROPERTY; 127usize],
}
#[test]
fn bindgen_test_layout_TPML_TAGGED_TPM_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1020usize,
concat!("Size of: ", stringify!(TPML_TAGGED_TPM_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_TAGGED_TPM_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_TAGGED_TPM_PROPERTY),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tpmProperty) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_TAGGED_TPM_PROPERTY),
"::",
stringify!(tpmProperty)
)
);
}
impl Default for TPML_TAGGED_TPM_PROPERTY {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_TAGGED_PCR_PROPERTY {
pub count: UINT32,
pub pcrProperty: [TPMS_TAGGED_PCR_SELECT; 84usize],
}
#[test]
fn bindgen_test_layout_TPML_TAGGED_PCR_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1012usize,
concat!("Size of: ", stringify!(TPML_TAGGED_PCR_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_TAGGED_PCR_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_TAGGED_PCR_PROPERTY),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrProperty) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_TAGGED_PCR_PROPERTY),
"::",
stringify!(pcrProperty)
)
);
}
impl Default for TPML_TAGGED_PCR_PROPERTY {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_ECC_CURVE {
pub count: UINT32,
pub eccCurves: [TPM2_ECC_CURVE; 508usize],
}
#[test]
fn bindgen_test_layout_TPML_ECC_CURVE() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1020usize,
concat!("Size of: ", stringify!(TPML_ECC_CURVE))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_ECC_CURVE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_ECC_CURVE),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_ECC_CURVE),
"::",
stringify!(eccCurves)
)
);
}
impl Default for TPML_ECC_CURVE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPML_INTEL_PTT_PROPERTY {
pub count: UINT32,
pub property: [UINT32; 256usize],
}
#[test]
fn bindgen_test_layout_TPML_INTEL_PTT_PROPERTY() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1028usize,
concat!("Size of: ", stringify!(TPML_INTEL_PTT_PROPERTY))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPML_INTEL_PTT_PROPERTY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPML_INTEL_PTT_PROPERTY),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).property) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPML_INTEL_PTT_PROPERTY),
"::",
stringify!(property)
)
);
}
impl Default for TPML_INTEL_PTT_PROPERTY {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_CAPABILITIES {
pub algorithms: TPML_ALG_PROPERTY,
pub handles: TPML_HANDLE,
pub command: TPML_CCA,
pub ppCommands: TPML_CC,
pub auditCommands: TPML_CC,
pub assignedPCR: TPML_PCR_SELECTION,
pub tpmProperties: TPML_TAGGED_TPM_PROPERTY,
pub pcrProperties: TPML_TAGGED_PCR_PROPERTY,
pub eccCurves: TPML_ECC_CURVE,
pub intelPttProperty: TPML_INTEL_PTT_PROPERTY,
}
#[test]
fn bindgen_test_layout_TPMU_CAPABILITIES() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1028usize,
concat!("Size of: ", stringify!(TPMU_CAPABILITIES))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMU_CAPABILITIES))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algorithms) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(algorithms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handles) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(handles)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).command) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(command)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ppCommands) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(ppCommands)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).auditCommands) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(auditCommands)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).assignedPCR) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(assignedPCR)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tpmProperties) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(tpmProperties)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrProperties) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(pcrProperties)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eccCurves) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(eccCurves)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).intelPttProperty) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_CAPABILITIES),
"::",
stringify!(intelPttProperty)
)
);
}
impl Default for TPMU_CAPABILITIES {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMS_CAPABILITY_DATA {
pub capability: TPM2_CAP,
pub data: TPMU_CAPABILITIES,
}
#[test]
fn bindgen_test_layout_TPMS_CAPABILITY_DATA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
1032usize,
concat!("Size of: ", stringify!(TPMS_CAPABILITY_DATA))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_CAPABILITY_DATA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CAPABILITY_DATA),
"::",
stringify!(capability)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CAPABILITY_DATA),
"::",
stringify!(data)
)
);
}
impl Default for TPMS_CAPABILITY_DATA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_CLOCK_INFO {
pub clock: UINT64,
pub resetCount: UINT32,
pub restartCount: UINT32,
pub safe: TPMI_YES_NO,
}
#[test]
fn bindgen_test_layout_TPMS_CLOCK_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
24usize,
concat!("Size of: ", stringify!(TPMS_CLOCK_INFO))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMS_CLOCK_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CLOCK_INFO),
"::",
stringify!(clock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resetCount) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CLOCK_INFO),
"::",
stringify!(resetCount)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).restartCount) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CLOCK_INFO),
"::",
stringify!(restartCount)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).safe) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CLOCK_INFO),
"::",
stringify!(safe)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_TIME_INFO {
pub time: UINT64,
pub clockInfo: TPMS_CLOCK_INFO,
}
#[test]
fn bindgen_test_layout_TPMS_TIME_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
32usize,
concat!("Size of: ", stringify!(TPMS_TIME_INFO))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMS_TIME_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TIME_INFO),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TIME_INFO),
"::",
stringify!(clockInfo)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_TIME_ATTEST_INFO {
pub time: TPMS_TIME_INFO,
pub firmwareVersion: UINT64,
}
#[test]
fn bindgen_test_layout_TPMS_TIME_ATTEST_INFO() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
40usize,
concat!("Size of: ", stringify!(TPMS_TIME_ATTEST_INFO))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMS_TIME_ATTEST_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TIME_ATTEST_INFO),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(TPMS_TIME_ATTEST_INFO),
"::",
stringify!(firmwareVersion)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_CERTIFY_INFO {
pub name: TPM2B_NAME,
pub qualifiedName: TPM2B_NAME,
}
#[test]
fn bindgen_test_layout_TPMS_CERTIFY_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
140usize,
concat!("Size of: ", stringify!(TPMS_CERTIFY_INFO))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_CERTIFY_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CERTIFY_INFO),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).qualifiedName) as usize - ptr as usize },
70usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CERTIFY_INFO),
"::",
stringify!(qualifiedName)
)
);
}
impl Default for TPMS_CERTIFY_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_QUOTE_INFO {
pub pcrSelect: TPML_PCR_SELECTION,
pub pcrDigest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMS_QUOTE_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
200usize,
concat!("Size of: ", stringify!(TPMS_QUOTE_INFO))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_QUOTE_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrSelect) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_QUOTE_INFO),
"::",
stringify!(pcrSelect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pcrDigest) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(TPMS_QUOTE_INFO),
"::",
stringify!(pcrDigest)
)
);
}
impl Default for TPMS_QUOTE_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_COMMAND_AUDIT_INFO {
pub auditCounter: UINT64,
pub digestAlg: TPM2_ALG_ID,
pub auditDigest: TPM2B_DIGEST,
pub commandDigest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMS_COMMAND_AUDIT_INFO() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
144usize,
concat!("Size of: ", stringify!(TPMS_COMMAND_AUDIT_INFO))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMS_COMMAND_AUDIT_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).auditCounter) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_COMMAND_AUDIT_INFO),
"::",
stringify!(auditCounter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digestAlg) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(TPMS_COMMAND_AUDIT_INFO),
"::",
stringify!(digestAlg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).auditDigest) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(TPMS_COMMAND_AUDIT_INFO),
"::",
stringify!(auditDigest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).commandDigest) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(TPMS_COMMAND_AUDIT_INFO),
"::",
stringify!(commandDigest)
)
);
}
impl Default for TPMS_COMMAND_AUDIT_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_SESSION_AUDIT_INFO {
pub exclusiveSession: TPMI_YES_NO,
pub sessionDigest: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMS_SESSION_AUDIT_INFO() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
68usize,
concat!("Size of: ", stringify!(TPMS_SESSION_AUDIT_INFO))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SESSION_AUDIT_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exclusiveSession) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SESSION_AUDIT_INFO),
"::",
stringify!(exclusiveSession)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sessionDigest) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SESSION_AUDIT_INFO),
"::",
stringify!(sessionDigest)
)
);
}
impl Default for TPMS_SESSION_AUDIT_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_CREATION_INFO {
pub objectName: TPM2B_NAME,
pub creationHash: TPM2B_DIGEST,
}
#[test]
fn bindgen_test_layout_TPMS_CREATION_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
136usize,
concat!("Size of: ", stringify!(TPMS_CREATION_INFO))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_CREATION_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).objectName) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CREATION_INFO),
"::",
stringify!(objectName)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).creationHash) as usize - ptr as usize },
70usize,
concat!(
"Offset of field: ",
stringify!(TPMS_CREATION_INFO),
"::",
stringify!(creationHash)
)
);
}
impl Default for TPMS_CREATION_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_NV_CERTIFY_INFO {
pub indexName: TPM2B_NAME,
pub offset: UINT16,
pub nvContents: TPM2B_MAX_NV_BUFFER,
}
#[test]
fn bindgen_test_layout_TPMS_NV_CERTIFY_INFO() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2122usize,
concat!("Size of: ", stringify!(TPMS_NV_CERTIFY_INFO))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_NV_CERTIFY_INFO))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).indexName) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_NV_CERTIFY_INFO),
"::",
stringify!(indexName)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
70usize,
concat!(
"Offset of field: ",
stringify!(TPMS_NV_CERTIFY_INFO),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nvContents) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(TPMS_NV_CERTIFY_INFO),
"::",
stringify!(nvContents)
)
);
}
impl Default for TPMS_NV_CERTIFY_INFO {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPMI_ST_ATTEST = TPM2_ST;
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_ATTEST {
pub certify: TPMS_CERTIFY_INFO,
pub creation: TPMS_CREATION_INFO,
pub quote: TPMS_QUOTE_INFO,
pub commandAudit: TPMS_COMMAND_AUDIT_INFO,
pub sessionAudit: TPMS_SESSION_AUDIT_INFO,
pub time: TPMS_TIME_ATTEST_INFO,
pub nv: TPMS_NV_CERTIFY_INFO,
}
#[test]
fn bindgen_test_layout_TPMU_ATTEST() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2128usize,
concat!("Size of: ", stringify!(TPMU_ATTEST))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMU_ATTEST))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).certify) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(certify)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(creation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quote) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(quote)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).commandAudit) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(commandAudit)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sessionAudit) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(sessionAudit)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nv) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_ATTEST),
"::",
stringify!(nv)
)
);
}
impl Default for TPMU_ATTEST {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMS_ATTEST {
pub magic: TPM2_GENERATED,
pub type_: TPMI_ST_ATTEST,
pub qualifiedSigner: TPM2B_NAME,
pub extraData: TPM2B_DATA,
pub clockInfo: TPMS_CLOCK_INFO,
pub firmwareVersion: UINT64,
pub attested: TPMU_ATTEST,
}
#[test]
fn bindgen_test_layout_TPMS_ATTEST() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2304usize,
concat!("Size of: ", stringify!(TPMS_ATTEST))
);
assert_eq!(
::std::mem::align_of::(),
8usize,
concat!("Alignment of ", stringify!(TPMS_ATTEST))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(magic)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).qualifiedSigner) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(qualifiedSigner)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).extraData) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(extraData)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clockInfo) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(clockInfo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(firmwareVersion)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attested) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(TPMS_ATTEST),
"::",
stringify!(attested)
)
);
}
impl Default for TPMS_ATTEST {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_ATTEST {
pub size: UINT16,
pub attestationData: [BYTE; 2304usize],
}
#[test]
fn bindgen_test_layout_TPM2B_ATTEST() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2306usize,
concat!("Size of: ", stringify!(TPM2B_ATTEST))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_ATTEST))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_ATTEST),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attestationData) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_ATTEST),
"::",
stringify!(attestationData)
)
);
}
impl Default for TPM2B_ATTEST {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_AUTH_COMMAND {
pub sessionHandle: TPMI_SH_AUTH_SESSION,
pub nonce: TPM2B_NONCE,
pub sessionAttributes: TPMA_SESSION,
pub hmac: TPM2B_AUTH,
}
#[test]
fn bindgen_test_layout_TPMS_AUTH_COMMAND() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
140usize,
concat!("Size of: ", stringify!(TPMS_AUTH_COMMAND))
);
assert_eq!(
::std::mem::align_of::(),
4usize,
concat!("Alignment of ", stringify!(TPMS_AUTH_COMMAND))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sessionHandle) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_COMMAND),
"::",
stringify!(sessionHandle)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_COMMAND),
"::",
stringify!(nonce)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize },
70usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_COMMAND),
"::",
stringify!(sessionAttributes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_COMMAND),
"::",
stringify!(hmac)
)
);
}
impl Default for TPMS_AUTH_COMMAND {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_AUTH_RESPONSE {
pub nonce: TPM2B_NONCE,
pub sessionAttributes: TPMA_SESSION,
pub hmac: TPM2B_AUTH,
}
#[test]
fn bindgen_test_layout_TPMS_AUTH_RESPONSE() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
134usize,
concat!("Size of: ", stringify!(TPMS_AUTH_RESPONSE))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_AUTH_RESPONSE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nonce) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_RESPONSE),
"::",
stringify!(nonce)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sessionAttributes) as usize - ptr as usize },
66usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_RESPONSE),
"::",
stringify!(sessionAttributes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(TPMS_AUTH_RESPONSE),
"::",
stringify!(hmac)
)
);
}
impl Default for TPMS_AUTH_RESPONSE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPMI_AES_KEY_BITS = TPM2_KEY_BITS;
pub type TPMI_SM4_KEY_BITS = TPM2_KEY_BITS;
pub type TPMI_TPM2_CAMELLIA_KEY_BITS = TPM2_KEY_BITS;
pub type TPMI_CAMELLIA_KEY_BITS = TPM2_KEY_BITS;
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_SYM_KEY_BITS {
pub aes: TPMI_AES_KEY_BITS,
pub sm4: TPMI_SM4_KEY_BITS,
pub camellia: TPMI_TPM2_CAMELLIA_KEY_BITS,
pub sym: TPM2_KEY_BITS,
pub exclusiveOr: TPMI_ALG_HASH,
}
#[test]
fn bindgen_test_layout_TPMU_SYM_KEY_BITS() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2usize,
concat!("Size of: ", stringify!(TPMU_SYM_KEY_BITS))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMU_SYM_KEY_BITS))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_KEY_BITS),
"::",
stringify!(aes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_KEY_BITS),
"::",
stringify!(sm4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_KEY_BITS),
"::",
stringify!(camellia)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_KEY_BITS),
"::",
stringify!(sym)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_KEY_BITS),
"::",
stringify!(exclusiveOr)
)
);
}
impl Default for TPMU_SYM_KEY_BITS {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_SYM_MODE {
pub aes: TPMI_ALG_SYM_MODE,
pub sm4: TPMI_ALG_SYM_MODE,
pub camellia: TPMI_ALG_SYM_MODE,
pub sym: TPMI_ALG_SYM_MODE,
}
#[test]
fn bindgen_test_layout_TPMU_SYM_MODE() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2usize,
concat!("Size of: ", stringify!(TPMU_SYM_MODE))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMU_SYM_MODE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_MODE),
"::",
stringify!(aes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sm4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_MODE),
"::",
stringify!(sm4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).camellia) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_MODE),
"::",
stringify!(camellia)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SYM_MODE),
"::",
stringify!(sym)
)
);
}
impl Default for TPMU_SYM_MODE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMT_SYM_DEF {
pub algorithm: TPMI_ALG_SYM,
pub keyBits: TPMU_SYM_KEY_BITS,
pub mode: TPMU_SYM_MODE,
}
#[test]
fn bindgen_test_layout_TPMT_SYM_DEF() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
6usize,
concat!("Size of: ", stringify!(TPMT_SYM_DEF))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMT_SYM_DEF))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF),
"::",
stringify!(algorithm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF),
"::",
stringify!(keyBits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF),
"::",
stringify!(mode)
)
);
}
impl Default for TPMT_SYM_DEF {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMT_SYM_DEF_OBJECT {
pub algorithm: TPMI_ALG_SYM_OBJECT,
pub keyBits: TPMU_SYM_KEY_BITS,
pub mode: TPMU_SYM_MODE,
}
#[test]
fn bindgen_test_layout_TPMT_SYM_DEF_OBJECT() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
6usize,
concat!("Size of: ", stringify!(TPMT_SYM_DEF_OBJECT))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMT_SYM_DEF_OBJECT))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).algorithm) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF_OBJECT),
"::",
stringify!(algorithm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).keyBits) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF_OBJECT),
"::",
stringify!(keyBits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SYM_DEF_OBJECT),
"::",
stringify!(mode)
)
);
}
impl Default for TPMT_SYM_DEF_OBJECT {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPM2B_SYM_KEY {
pub size: UINT16,
pub buffer: [BYTE; 32usize],
}
#[test]
fn bindgen_test_layout_TPM2B_SYM_KEY() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
34usize,
concat!("Size of: ", stringify!(TPM2B_SYM_KEY))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_SYM_KEY))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SYM_KEY),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SYM_KEY),
"::",
stringify!(buffer)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMS_SYMCIPHER_PARMS {
pub sym: TPMT_SYM_DEF_OBJECT,
}
#[test]
fn bindgen_test_layout_TPMS_SYMCIPHER_PARMS() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
6usize,
concat!("Size of: ", stringify!(TPMS_SYMCIPHER_PARMS))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SYMCIPHER_PARMS))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sym) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SYMCIPHER_PARMS),
"::",
stringify!(sym)
)
);
}
impl Default for TPMS_SYMCIPHER_PARMS {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_SENSITIVE_DATA {
pub size: UINT16,
pub buffer: [BYTE; 256usize],
}
#[test]
fn bindgen_test_layout_TPM2B_SENSITIVE_DATA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
258usize,
concat!("Size of: ", stringify!(TPM2B_SENSITIVE_DATA))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_DATA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SENSITIVE_DATA),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SENSITIVE_DATA),
"::",
stringify!(buffer)
)
);
}
impl Default for TPM2B_SENSITIVE_DATA {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPMS_SENSITIVE_CREATE {
pub userAuth: TPM2B_AUTH,
pub data: TPM2B_SENSITIVE_DATA,
}
#[test]
fn bindgen_test_layout_TPMS_SENSITIVE_CREATE() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
324usize,
concat!("Size of: ", stringify!(TPMS_SENSITIVE_CREATE))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SENSITIVE_CREATE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).userAuth) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SENSITIVE_CREATE),
"::",
stringify!(userAuth)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
66usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SENSITIVE_CREATE),
"::",
stringify!(data)
)
);
}
impl Default for TPMS_SENSITIVE_CREATE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TPM2B_SENSITIVE_CREATE {
pub size: UINT16,
pub sensitive: TPMS_SENSITIVE_CREATE,
}
#[test]
fn bindgen_test_layout_TPM2B_SENSITIVE_CREATE() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
326usize,
concat!("Size of: ", stringify!(TPM2B_SENSITIVE_CREATE))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPM2B_SENSITIVE_CREATE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SENSITIVE_CREATE),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sensitive) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPM2B_SENSITIVE_CREATE),
"::",
stringify!(sensitive)
)
);
}
impl Default for TPM2B_SENSITIVE_CREATE {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_SCHEME_HASH {
pub hashAlg: TPMI_ALG_HASH,
}
#[test]
fn bindgen_test_layout_TPMS_SCHEME_HASH() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2usize,
concat!("Size of: ", stringify!(TPMS_SCHEME_HASH))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SCHEME_HASH))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SCHEME_HASH),
"::",
stringify!(hashAlg)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_SCHEME_ECDAA {
pub hashAlg: TPMI_ALG_HASH,
pub count: UINT16,
}
#[test]
fn bindgen_test_layout_TPMS_SCHEME_ECDAA() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
4usize,
concat!("Size of: ", stringify!(TPMS_SCHEME_ECDAA))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SCHEME_ECDAA))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SCHEME_ECDAA),
"::",
stringify!(hashAlg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SCHEME_ECDAA),
"::",
stringify!(count)
)
);
}
pub type TPMI_ALG_KEYEDHASH_SCHEME = TPM2_ALG_ID;
pub type TPMS_SCHEME_HMAC = TPMS_SCHEME_HASH;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TPMS_SCHEME_XOR {
pub hashAlg: TPMI_ALG_HASH,
pub kdf: TPMI_ALG_KDF,
}
#[test]
fn bindgen_test_layout_TPMS_SCHEME_XOR() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
4usize,
concat!("Size of: ", stringify!(TPMS_SCHEME_XOR))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMS_SCHEME_XOR))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SCHEME_XOR),
"::",
stringify!(hashAlg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMS_SCHEME_XOR),
"::",
stringify!(kdf)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_SCHEME_KEYEDHASH {
pub hmac: TPMS_SCHEME_HMAC,
pub exclusiveOr: TPMS_SCHEME_XOR,
}
#[test]
fn bindgen_test_layout_TPMU_SCHEME_KEYEDHASH() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
4usize,
concat!("Size of: ", stringify!(TPMU_SCHEME_KEYEDHASH))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMU_SCHEME_KEYEDHASH))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SCHEME_KEYEDHASH),
"::",
stringify!(hmac)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exclusiveOr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SCHEME_KEYEDHASH),
"::",
stringify!(exclusiveOr)
)
);
}
impl Default for TPMU_SCHEME_KEYEDHASH {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMT_KEYEDHASH_SCHEME {
pub scheme: TPMI_ALG_KEYEDHASH_SCHEME,
pub details: TPMU_SCHEME_KEYEDHASH,
}
#[test]
fn bindgen_test_layout_TPMT_KEYEDHASH_SCHEME() {
const UNINIT: ::std::mem::MaybeUninit =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
6usize,
concat!("Size of: ", stringify!(TPMT_KEYEDHASH_SCHEME))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMT_KEYEDHASH_SCHEME))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_KEYEDHASH_SCHEME),
"::",
stringify!(scheme)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMT_KEYEDHASH_SCHEME),
"::",
stringify!(details)
)
);
}
impl Default for TPMT_KEYEDHASH_SCHEME {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPMS_SIG_SCHEME_RSASSA = TPMS_SCHEME_HASH;
pub type TPMS_SIG_SCHEME_RSAPSS = TPMS_SCHEME_HASH;
pub type TPMS_SIG_SCHEME_ECDSA = TPMS_SCHEME_HASH;
pub type TPMS_SIG_SCHEME_SM2 = TPMS_SCHEME_HASH;
pub type TPMS_SIG_SCHEME_ECSCHNORR = TPMS_SCHEME_HASH;
pub type TPMS_SIG_SCHEME_ECDAA = TPMS_SCHEME_ECDAA;
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_SIG_SCHEME {
pub rsassa: TPMS_SIG_SCHEME_RSASSA,
pub rsapss: TPMS_SIG_SCHEME_RSAPSS,
pub ecdsa: TPMS_SIG_SCHEME_ECDSA,
pub ecdaa: TPMS_SIG_SCHEME_ECDAA,
pub sm2: TPMS_SIG_SCHEME_SM2,
pub ecschnorr: TPMS_SIG_SCHEME_ECSCHNORR,
pub hmac: TPMS_SCHEME_HMAC,
pub any: TPMS_SCHEME_HASH,
}
#[test]
fn bindgen_test_layout_TPMU_SIG_SCHEME() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
4usize,
concat!("Size of: ", stringify!(TPMU_SIG_SCHEME))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMU_SIG_SCHEME))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsassa) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(rsassa)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsapss) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(rsapss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecdsa) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(ecdsa)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecdaa) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(ecdaa)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sm2) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(sm2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecschnorr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(ecschnorr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmac) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(hmac)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMU_SIG_SCHEME),
"::",
stringify!(any)
)
);
}
impl Default for TPMU_SIG_SCHEME {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TPMT_SIG_SCHEME {
pub scheme: TPMI_ALG_SIG_SCHEME,
pub details: TPMU_SIG_SCHEME,
}
#[test]
fn bindgen_test_layout_TPMT_SIG_SCHEME() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
6usize,
concat!("Size of: ", stringify!(TPMT_SIG_SCHEME))
);
assert_eq!(
::std::mem::align_of::(),
2usize,
concat!("Alignment of ", stringify!(TPMT_SIG_SCHEME))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scheme) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SIG_SCHEME),
"::",
stringify!(scheme)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).details) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(TPMT_SIG_SCHEME),
"::",
stringify!(details)
)
);
}
impl Default for TPMT_SIG_SCHEME {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub type TPMS_ENC_SCHEME_OAEP = TPMS_SCHEME_HASH;
pub type TPMS_ENC_SCHEME_RSAES = TPMS_EMPTY;
pub type TPMS_KEY_SCHEME_ECDH = TPMS_SCHEME_HASH;
pub type TPMS_KEY_SCHEME_ECMQV = TPMS_SCHEME_HASH;
pub type TPMS_SCHEME_MGF1 = TPMS_SCHEME_HASH;
pub type TPMS_SCHEME_KDF1_SP800_56A = TPMS_SCHEME_HASH;
pub type TPMS_SCHEME_KDF2 = TPMS_SCHEME_HASH;
pub type TPMS_SCHEME_KDF1_SP800_108 = TPMS_SCHEME_HASH;
#[repr(C)]
#[derive(Copy, Clone)]
pub union TPMU_KDF_SCHEME {
pub mgf1: TPMS_SCHEME_MGF1,
pub kdf1_sp800_56a: TPMS_SCHEME_KDF1_SP800_56A,
pub kdf2: TPMS_SCHEME_KDF2,
pub kdf1_sp800_108: TPMS_SCHEME_KDF1_SP800_108,
}
#[test]
fn bindgen_test_layout_TPMU_KDF_SCHEME() {
const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::(),
2usize,
concat!("Size of: ", stringify!(TPMU_KDF_SCHEME))
);
assert_eq!(
::std::mem::align_of::