mirror of https://github.com/wolfSSL/wolfTPM.git
cmake: Add to readme and fix native test
parent
81ae795a46
commit
fd1474c68b
17
README.md
17
README.md
|
@ -311,6 +311,23 @@ See `docs/SWTPM.md`
|
||||||
|
|
||||||
See `docs/WindowTBS.md`
|
See `docs/WindowTBS.md`
|
||||||
|
|
||||||
|
## Building using CMake
|
||||||
|
|
||||||
|
CMake supports compiling in many environments including Visual Studio
|
||||||
|
if CMake support is installed. The commands below can be run in
|
||||||
|
`Developer Command Prompt`.
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
# to use installed wolfSSL location (library and headers)
|
||||||
|
cmake .. -DWITH_WOLFSSL=/prefix/to/wolfssl/install/
|
||||||
|
# OR to use a wolfSSL source tree
|
||||||
|
cmake .. -DWITH_WOLFSSL_TREE=/path/to/wolfssl/
|
||||||
|
# build
|
||||||
|
cmake --build .
|
||||||
|
```
|
||||||
|
|
||||||
## Running Examples
|
## 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.
|
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.
|
||||||
|
|
|
@ -353,9 +353,7 @@ int TPM2_Native_TestArgs(void* userCtx, int argc, char *argv[])
|
||||||
i = MAX_RNG_REQ_SIZE;
|
i = MAX_RNG_REQ_SIZE;
|
||||||
cmdIn.getRand.bytesRequested = (UINT16)i;
|
cmdIn.getRand.bytesRequested = (UINT16)i;
|
||||||
rc = TPM2_GetRandom(&cmdIn.getRand, &cmdOut.getRand);
|
rc = TPM2_GetRandom(&cmdIn.getRand, &cmdOut.getRand);
|
||||||
#if defined(WOLFTPM_ST33) || defined(WOLFTPM_AUTODETECT)
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (rc != TPM_RC_SUCCESS) {
|
if (rc != TPM_RC_SUCCESS) {
|
||||||
printf("TPM2_GetRandom failed 0x%x: %s\n", rc,
|
printf("TPM2_GetRandom failed 0x%x: %s\n", rc,
|
||||||
TPM2_GetRCString(rc));
|
TPM2_GetRCString(rc));
|
||||||
|
|
Loading…
Reference in New Issue