commit | db6e5b251d1f8fa263459de450622138ac22b2ed | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Tue Jun 02 17:51:48 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jun 02 17:51:48 2020 +0000 |
tree | 712422354c9ac655a0193844816311f3ab329a49 | |
parent | e6127e4ce5e5a3f1e681aa60250be215628001cb [diff] | |
parent | 56a6197af42f31d5cb798a2c5990aedd20f2553a [diff] |
Merge "Build the TPM simulator as a library and an executable." am: 56a6197af4 Original change: undetermined Change-Id: I6f99f508982abfe704a033f1056390b0c12e61ce
This is the official TCG reference implementation of the TPM 2.0 Specification. The project contains complete source code of the reference implementation with a Microsoft Visual Studio solution and Linux autotools build scripts.
See the definition of the SPEC_VERSION
, SPEC_YEAR
and SPEC_DAY_OF_YEAR
values in the TpmTypes.h header for the exact revision/date of the TPM 2.0 specification, which the given source tree snapshot corresponds to.
Before building the Visual Studio solution:
Create TPMCmd/lib
folder and place a static OpenSSL library (libcrypto.lib
) built for the x86
architecture there. For the x64
architecture use the TPMCmd/lib/x64
folder.
The static libs can be either static libraries proper, or import libraries accompanying the corresponding DLLs. In the latter case you'll need to ensure that ther is a matching copy of the OpenSSL DLL in the standard Windows search path, so that it is available when you run the simulator executable (e.g. copy it into the same folder where simulator.exe
is located).
Recommended version of OpenSSL is 1.1.1d
.
Create TPMCmd/OsslInclude/openssl
folder and copy there the contents of the openssl/include/openssl
folder of the OpenSSL source tree used to build the static library used on the step 2).
Build the solution with either Debug or Release as the active configuration.
WolfSSL is included as a submodule. Initialize and update the submodule to fetch the project and checkout the appropriate commit.
> git submodule init > git submodule update
The current commit will point the minimum recommended version of wolfSSL. Moving to a more recent tag or commit should also be supported but might not be tested.
Build the solution with either WolfDebug or WolfRelease as the active configuration, either from inside the Visual Studio or with the following command line:
> msbuild TPMCmd\simulator.sln /p:Configuration=WolfDebug
Follows the common ./bootstrap && ./configure && make
convention.
Note that autotools scripts require the following prerequisite packages: autoconf-archive
, pkg-config
, and sometimes build-essential
and automake
. Their absence is not automatically detected. The build also needs gcc
and libssl-dev
packages.