commit | 89ea0a7195db1d2ebd4f9222aaf0b1b98c6f375c | [log] [tgz] |
---|---|---|
author | A. Cody Schuffelen <schuffelen@google.com> | Fri Mar 20 14:37:23 2020 -0700 |
committer | A. Cody Schuffelen <schuffelen@google.com> | Mon Mar 23 13:38:42 2020 -0700 |
tree | 5e0555901cd23be959b0d033e0af64fa1a491e60 | |
parent | b55bf6cec0206fc7e83f6fac096b421d53bee681 [diff] |
ANDROID: Changes to build with BoringSSL instead of OpenSSL Original author is joerichey@google.com. Original patch comments: ``` Use the BoringSSL bignum_st structure The BoringSSl structure has "width" instead of "top". I belive this is roughly equiavlent, but we should verify this somehow. ``` ``` Don't use EC_POINTs_mul BoringSSL does not support this method. It has been proposed for deprecation. See: https://github.com/openssl/openssl/issues/8332 Normal code paths will never hit this anyway. The S point is optional and rarely specificed. ``` Test: Use with Cuttlefish Bug: 150630872 Change-Id: I5a40150c5c8635a9cc288d7257b3e02044738a4a
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 (libeay32.lib
or libcrypto.lib
) there. This may be either complete static library, or import library accompanying the corresponding DLL. In the latter case you'll need to copy the OpenSSL DLL into 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).
If you use libcrypto.lib
, you'll need to either update Linker|Input|Additional Dependencies
property of the Tpm project in the simulator solution or, alternatively, rename libcrypto.lib
to libeay32.lib
.
Recommended version of OpenSSL is 1.0.2d or higher.
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
. Their absence is not automatically detected. The build also requires libssl-dev
package to be installed.