Commit Graph

78 Commits (65e03e15e622ae2edb78686ebcb803e5d2ba7731)

Author SHA1 Message Date
David Garske 18531274da Fix TLS bidirectional shutdown socket issue. Just use 11111 for all TLS tests, to avoid real random port collision with SWTPM sockets. Resolves TLS issue with "ERROR: failed to bind! errno 98". 2023-11-29 12:34:06 -08:00
David Garske 4b433f24fb Troubleshooting issues with socket `tcp bind failed: Address already in use`. 2023-11-20 15:42:26 -08:00
David Garske 9cad7f4e24 Fix some of the example TODO's. Fixes for seal/unseal example. Fixes for TLS with param enc. Fix signed_timestamp with ECC. 2023-10-30 12:00:37 -07:00
David Garske 97d8845c6f Added CI tests for all examples and additional build tests. 2023-08-30 15:11:24 -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 1ea4a591a8 HAL refactor and documentation improvements. Move example HAL implementations into new `hal` directory. Include the example HAL in the library when building. Updated HAL IO documentation. 2023-01-18 12:38:04 -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 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 9d2483d327 New CSR wrappers to assist with TPM based CSR/Self-Signed-Cert generation including CSharp wrappers. This includes support for subject, key usage, custom request extensions and output as PEM or DER. New structure `WOLFTPM2_CSR`. New API's `wolfTPM2_CSR_*`. New CSharp class `Csr`. 2022-07-12 13:53:04 -07:00
David Garske 9cb60b14ad Improve the inline code comments for loading the public key using the `wolfSSL_CTX_use_PrivateKey_buffer` API. 2022-06-27 10:29:38 -07:00
David Garske c7b28c1445 TPM support for using the public key with TLS. 2022-06-24 16:21:47 -07:00
David Garske d035cd239c Fix for a few spelling errors. Whitespace cleanup. 2021-12-07 11:10:50 -08:00
Elms ede184c735 configure: keep example directory strcuture during install 2021-11-18 12:04:41 -08:00
David Garske d05e503784 Fix for possible leak of ephemeral key in TLS server example. 2021-07-13 12:57:39 -07:00
David Garske ed1ec8c52d Support for QNX with wolfTPM:
* Fix for `wolfTPM2_NVCreateAuth` to return `TPM_RC_NV_DEFINED` if already exists (it used to do this, but broke with GPIO changes).
* Fixes for building wolfTPM with wolfCrypt only (no TLS).
* Fix for building without RSA and ECC.
* Fix for `--enable-smallstack` with parameter encryption,
* Fix for nvram/store unused variable.
2021-06-01 10:34:28 -07: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 c0fa6423d5 Cleanup of the examples to use the key templates. The PKCS7 example was failing because of a key mismatch between the TPM private key and the public key used in the certificate setup using the CSR and ./certs/certreq/sh`. 2021-01-14 16:41:12 -08:00
David Garske 845b3d1da2 Release fixes and cleanups. Fixes for init of `WOLFTPM2_HASH` in `wolfTPM2_HashStart`. Fix for for various build configurations (--disable-wrapper). Fix for Microchip "sign" bit on symmetric keys. Fix for scan-build warnings. Cleanup whitespace. 2020-12-07 11:01:02 -08:00
David Garske 523a9f905c Fixes for properly setting auth (needs to include name for HMAC cpHash/rpHash calculation). Fix for sessionAttributes when command / response doesn't support it. Fixes for the TLS client / server examples. Added back the useful param enc / hmac debugging enabled with `--enable-debug=verbose`. 2020-12-02 16:47:46 -08:00
David Garske 8087afaf27 Fixes from peer review. Resolve issue with make check. Removed the TPM Simulator for make check (does not build out of the box on all platforms). Make dist was not including the new tpm2_socket.h. 2020-12-01 07:45:04 -08:00
David Garske 4b0b70861c Added parameter encryption support to more examples. Fix to not set "encrypt" or "decrypt" if command doesn't allow it. Updated documentation. 2020-11-30 12:00:54 -08:00
David Garske 4c2e8d3f43 Added response HMAC validation. Fixes for nonce and auth count. Fix for AES CFB decrypt set key (requires `AES_ENCRYPTION` on SetKey). Cleanup verbose debugging. PR ready for review. 2020-11-25 16:04:04 -08:00
Dimitar Tomov 4b98d6d637 Fixed minor errors about missing header, variables not used and whitespaces
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2020-11-25 12:33:51 +02:00
David Garske 409fd96502 Fixes for response decryption. Nonce from TPM captured correctly now. Added support for args to all examples. 2020-11-24 16:44:20 -08:00
David Garske dbd8e41b47 Refactor of the session authentication. Added "-e" option to some examples to enable parameter encryption and removed the _paramenc.c files. Fixup for the `getPrimaryStoragekey` to allow persisting if not `WOLFTPM_WINAPI`. Improve command line options. Added calculation of command hash and HMAC for sessions. 2020-11-20 16:47:14 -08:00
David Garske b48f53f5e7 Improvements to the example tls_server to accept "RSA" or "ECC". Improvement to TLS examples to old load keys/certs that are needed (reduces max handle load count). Added missing `scripts/tls_setup.sh` to automake. 2020-11-13 16:33:14 -08:00
David Garske 675f7deb22 Fixes for a couple minor build errors and warnings. Found using scan-build, CC=g++ and `NO_FILESYSTEM`. 2020-11-13 15:57:03 -08:00
Elms 0bff836fa2 examples: Cleanup TLS examples using keyblob 2020-11-13 11:31:01 -08:00
Elms 6bfebf7cb9 examples: tls_client ECC/RSA as command line option 2020-11-12 14:08:16 -08:00
Elms 3ce0a6871c Rebase and leverage new API with KEYBLOB 2020-11-12 14:08:13 -08:00
Elms 045800ccf5 examples: factor out common key setup steps 2020-11-12 14:04:00 -08:00
Elms 1fcae21585 Refactor socket code to support win32 2020-11-12 14:04:00 -08:00
David Garske 45a1dd27ce Add comment for how to force ECC mode with the TLS tests. 2020-09-24 14:08:03 -07:00
David Garske 3b253a3e5f Improve the TLS client mutual authentication example to clarify use of dummy key. ZD 10895. 2020-09-15 16:50:08 -07:00
Eric Blankenhorn 72464dc621 Release v1.9 preparation 2020-08-24 12:12:11 -05:00
David Garske b78e93f9ca Documentation and code cleanups. Enhanced pcr/quote example to use the existing SRK. Added "-?" help usage on PCR examples. Switched to atoi. Fixed .am issue in TLS example cause make dist to break. Added include of new files for make dist. 2020-07-23 09:46:06 -07:00
Dimitar Tomov 0ad05b9554 Fix whitespaces and tabs in include.am files
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-07-17 18:09:52 +03:00
David Garske 80c5e5a2b6 Build fixes when using `WOLFTPM2_USE_SW_ECDHE`. 2020-04-16 07:09:04 -07:00
Chris Conlon 91ef0b0e6e update copyright to 2020 2020-01-03 15:31:27 -08:00
David Garske 7887130287 wolfTPM v1.7 Release 2019-12-27 14:43:30 -08:00
David Garske 4b0ac61ef5 Added FIPS mode and Use Symmetric options. 2019-07-15 14:34:40 -07:00
David Garske 4de58e6d60 Remove execute bit on .c/.h files. 2019-05-14 13:58:06 -07:00
David Garske 5f0c7ba6c1 Fix printf type warnings. Added missing stdio.h for printf in examples. Added new API's `TPM2_SetActiveCtx`, `TPM2_ChipStartup`, `TPM2_SetHalIoCb` and `TPM2_Init_ex`. Fix to make sure TPM2_CTX is cleaned up after `wolfTPM2_Test`. Allowed way to indicate `BOOL` type already defined. 2019-05-07 14:35:23 -07:00
David Garske 3e9d70c159 Fix to better handle chip detection. Added stdio printf include for TPM benchmark. Added C++ support. 2019-05-07 10:39:17 -07:00
David Garske d8effc7c05 Fixes for various scan-build and G++ warnings. Updates to ChangeLog.md and README.md. Fix for `./certs/certreq.sh clean` to not remove wolf certs. 2019-02-20 15:13:01 -08:00
David Garske 8a8c79ec8e Fixes for building wolfTPM with `TLS_BENCH_MODE`. 2019-02-13 10:58:09 -08:00
David Garske 4e7ccfe3b2 Update comment for TLS client (no TPM) example. 2019-02-12 15:50:22 -08:00
David Garske 4ee625e68e Additional cleanups and fixes for TLS server/client examples. 2019-02-12 15:41:17 -08:00