Commit Graph

24 Commits (d5872221ba1fb55796812a65707859ccf673c9f6)

Author SHA1 Message Date
David Garske d5872221ba Fix `TPM2_ParsePublic` size argument. 2025-06-02 16:33:18 -07:00
David Garske 6fbb49a94f wolfTPM Release v3.9.0. Updated copyright and version. 2025-05-14 15:31:07 -07:00
David Garske 580b3a779e Fix issue with session binding. Add example for NV extend based on the TCG "bus protection guidance". 2024-12-16 11:53:52 -08:00
David Garske a6d7ed8695 Added example for `TPM2_Certify`:
* Added new build option for TPM provisioning (`--enable-provisioning` on by default).
* Added new `wolfTPM2_CreatePrimaryKey_ex` and `WOLFTPM2_PKEY` that supports returning creation ticket/hash.
* Added key templates for initial device (IDevID) and attestation keys (IAK).
* Extended `create_primary` example to support creation or IDevID and IAK.
* Added new policy hash helper API `wolfTPM2_PolicyHash`
* Switch handle/nvIndex string parsing to use `strtoul`.

ZD 18347
2024-08-22 10:38:01 -07:00
David Garske 57f12df97b Support for getting TPM EK Certificates. Added `wolfTPM2_GetKeyTemplate_EK` and `wolfTPM2_GetKeyTemplate_EK` API's for getting EK public templates for generating the EK primary key. Fix TLS example build issues with wolfSSL not having crypto callback or PK callback enabled. 2024-07-26 13:02:57 -07:00
David Garske c98ee9a71e Update copyright date. 2024-04-24 10:42:27 -07:00
David Garske b395b65287 Fix for config.h, which should only be included from .c files, not headers. ZD 17473 2024-02-07 14:28:33 -08:00
David Garske 96cd17af1d Improvements/fixes to NV auth and session auth set/unset:
* Fix bug with NV name after first write (only appears when using HMAC session).
* Add new API `wolfTPM2_UnsetAuthSession` to unset auth index for a session and save off the nonce from the TPM. This allows auth to be unset/set again with the same session.
* Cleanup in the NV API's for unsetting of the auth to be handled by caller, not in API.
2023-09-15 14:03:11 -07:00
David Garske 31cd20e645 Added new policy_nv example. 2023-09-11 14:37:12 -07:00
David Garske 027ae8a4e9 Make sure PCR extend has the session auth cleared. Added -nvhandle argument to nvram examples. Cleanups for examples. 2023-09-08 08:14:39 -07:00
David Garske 0ceeebeaf7 Fix for building with no PEM to DER. Fix for building with static library and no debug, due to missing stdio in examples. Fix for TLS examples missing WOLFCRYPT_ONLY check. Fix for building with WC_NO_RNG. Fix for RSA salt with RNG using crypto cb. 2023-05-02 16:18:21 -07:00
David Garske c05bf659c2 Fix broken paths with HAL refactor. Update TLS examples to use latest TLS version (allowing downgrade). 2023-01-20 08:29:53 -08:00
David Garske 41e5750ff2 Peer review fixes. Cleanups for return code checking, stdlib functions, unknown args and coding standards. 2022-10-04 13:19:51 -07:00
David Garske fac51233c3 Added example for NV counter increment. Fixes for NV auth handling. 2022-10-04 13:09:05 -07:00
David Garske d491437e08 Use `strcmp` since `argv` is guaranteed to be NULL terminated. Fix keygen example whitespace alignment. 2022-10-04 11:44:16 -07:00
David Garske 3f84b2efbc wolfTPM v2.5.0 release prep 2022-07-22 09:32:57 -07:00
David Garske d035cd239c Fix for a few spelling errors. Whitespace cleanup. 2021-12-07 11:10:50 -08:00
David Garske 2b8cfb8692 wolfTPM Release v2.1.0 preparation.
* Updated copyright
* Fixed minor cast warning.
* Fixed minor scan-build warnings.
* Cleanup print public and fix possible print of uninitialized field.
2021-03-17 10:13:50 -07:00
David Garske 197754b109 Minor cleanups. 2021-03-12 15:10:58 -08:00
Dimitar Tomov f0540d688e Make NVRAM and Keygen examples store the encoded public key part to save space
Before examples were always storing the maximum public key part size,
using sizeof(TPM2B_PUBLIC), with many empty fields. This meant, always
storing 616 bytes of public part, even if the public key part was less.

* writekeyBlob/readKeyBlob use the actual size of public key part
* NVRAM store/read use the actual size of the public key part
* Minor fixes from peer review
* Added comment to nvram/store about Host Endianness, per peer review
* Added public API for appending/parsing TPM2B_PUBLIC to byte streams

Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-03-12 15:10:58 -08:00
Dimitar Tomov 56db5fe67c Make examples/nvram capable of using only the private/public key part
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-03-12 15:10:58 -08:00
Dimitar Tomov db64d9fc29 examples/read: Load the key after it was extracted from NVRAM
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-03-12 15:10:58 -08:00
Dimitar Tomov e1d9c661bd Minor fixes for NVRAM examples
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-03-01 10:52:02 +02:00
Dimitar Tomov df13479ac7 Added new examples for storing TPM keys in NVRAM, with parameter encryption
* Added examples/nvram/store for storing TPM key in NVRAM
* Added examples/nvram/read for extracting keys from the TPM's NVRAM

Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-02-26 11:15:54 +02:00