winapi: Add readme

pull/127/head
Elms 2020-10-13 11:42:44 -07:00
parent efa2464496
commit 6bb14c20b6
3 changed files with 67 additions and 0 deletions

View File

@ -41,6 +41,7 @@ include tests/include.am
EXTRA_DIST+= README.md
EXTRA_DIST+= docs/SWTPM.md
EXTRA_DIST+= docs/WindowTBS.md
EXTRA_DIST+= ChangeLog.md
EXTRA_DIST+= LICENSE
EXTRA_DIST+= autogen.sh

View File

@ -140,6 +140,7 @@ autogen.sh requires: automake and libtool: `sudo apt-get install automake libtoo
--enable-devtpm Enable using Linux kernel driver for /dev/tpmX (default: disabled) - WOLFTPM_LINUX_DEV
--enable-swtpm Enable using SWTPM TCP protocol. For use with simulator. (default: disabled) - WOLFTPM_SWTPM
--enable-winapi Use Windows TBS API. (default: disabled) - WOLFTPM_WINAPI
WOLFTPM_USE_SYMMETRIC Enables symmetric AES/Hashing/HMAC support for TLS examples.
WOLFTPM2_USE_SW_ECDHE Disables use of TPM for ECC ephemeral key generation and shared secret for TLS examples.
@ -216,6 +217,10 @@ sudo adduser yourusername tss
See `docs/SWTPM.md`
### Building for Windows TBS API
See `docs/WindowTBS.md`
## Running Examples
These examples demonstrate features of a TPM 2.0 module. The examples create RSA and ECC keys in NV for testing using handles defined in `./examples/tpm_io.h`. The PKCS #7 and TLS examples require generating CSR's and signing them using a test script. See `examples/README.md` for details on using the examples. To run the TLS sever and client on same machine you must build with `WOLFTPM_TIS_LOCK` to enable concurrent access protection.

61
docs/WindowTBS.md 100644
View File

@ -0,0 +1,61 @@
# Using wolfTPM with Windows TBS
wolfTPM can be built to use Windows native TBS (TPM Base Services)
## Building in MSYS2
Tested using MSYS2
```
export PREFIX=$PWD/tmp_install
cd wolfssl
./autogen.sh
./configure --prefix=$PREFIX
make
make install
cd wolftpm/
./autogen.sh
./configure --prefix=$PREFIX --enable-winapi
make
./examples
```
## Building on linux
Tested using mingw-w32-bin_x86_64-linux_20131221.tar.bz2
[source](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Automated%20Builds/)
Extract the tools and add them to the `PATH`
```
mkdir mingw_tools
cd mingw_tools
tar xjvf ../mingw-w32-bin_x86_64-linux_20131221.tar.bz2
export PATH=$PWD/bin/:$PWD/i686-w64-mingw32/bin:$PATH
cd ..
```
Build
```
export PREFIX=$PWD/tmp_install
cd wolfssl
./autogen.sh
./configure --host=i686 CC=i686-w64-mingw32-gcc CFLAGS="-DWIN32 -DMINGW -D_WIN32_WINNT=0x0600" LIBS="-lws2_32" --prefix=$PREFIX
make
make install
cd ../wolftpm/
./autogen.sh
./configure --host=i686 CC=i686-w64-mingw32-gcc CFLAGS="-DWIN32 -DMINGW -D_WIN32_WINNT=0x0600" LIBS="-lws2_32" --prefix=$PREFIX --enable-winapi
make
```
## Running on Windows
To confirm presence and status of TPM on the machine run `tpm.msc`
See [examples/README.md](examples/README.md)