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
Dimitar Tomov
529dcfe268
Fix typo on WOLFTPM_USER_SETTINGS ifdef
...
POSIX options.h is used when USER_SETTINGS are not available
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
2021-01-22 19:08:58 +02: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
0e4c6672fd
TPM Parameter Encryption with AES CFB or XOR is fully working. Tested keygen, keyload, keyimport and PCR quote with parameter encryption using both ciphers. This commit includes a refactor of the auth command structure to adhere to TPM spec. Includes optimization for AES CFB and XOR to do done inline. For for the decryption nonce to use the newer for U in KDFa.
2020-11-25 13:00:42 -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
6b61e85496
Improved the key blob storage. Added ECC support to keygen example.
2020-10-27 10:16:33 -07:00
Elms
3a1ef5a0a4
Add winapi for Windows TBS support (with minGW build)
...
TESTED:
`./configure --host=i686 CC=i686-w64-mingw32-gcc CFLAGS="-DWIN32 \
-DMINGW -D_WIN32_WINNT=0x0600" LIBS="-lws2_32 -ltbs" \
--enable-winapi`
2020-10-07 13:22:19 -07:00
Elms
9617dab37e
swtpm: Rename SOCKET option to SWTPM
2020-09-24 08:37:06 -07:00
Elms
63736417b2
Add socket connection option for using with TPM2 simulator
...
This is largely based on and tested against http://ibmswtpm.sourceforge.net/
2020-09-23 10:39:38 -07:00
David Garske
8eb67b5bcf
Improvements to the signed timestamp example. Cleanup of the key template API's.
2020-07-21 15:24:10 -07:00
David Garske
6d46b26bde
Added dynamic module detection at run-time when using internal TIS.
2020-07-13 09:55:36 -07:00
David Garske
30f2e644aa
Added NPCT75x Nuvoton support.
2020-07-13 09:54:00 -07:00
Dimitar Tomov
e2aacfe377
Prepare the wolfTPM core for the new Linux TPM driver interface
...
Signed-off-by: Dimitar Tomov <dimi@designfirst.ee>
2020-04-28 15:43:49 -07:00
Daniele Lacamera
60067ad634
Merge pull request #87 from dgarske/nohashfree
...
Fix for building wolfTPM with older wolfSSL versions
2020-04-17 16:59:17 +02:00
David Garske
948af90f99
Use better backwards compatibility macro.
2020-04-17 07:30:51 -07:00
David Garske
45a6838fa5
Fix for building wolfTPM with older wolfSSL versions not supporting `wc_HashFree`.
...
Fixes Error:
```
src/tpm2_wrap.c:738:9: error: implicit declaration of function 'wc_HashFree' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
wc_HashFree(&hash, hashType);
^
src/tpm2_wrap.c:738:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
src/tpm2_wrap.c:2555:9: error: implicit declaration of function 'wc_HashFree' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
wc_HashFree(&hash, hashType);
^
3 errors generated.
```
2020-04-16 14:42:22 -07:00
David Garske
0101d89f74
Moved the chip specific settings to `tpm2_types.h`.
2020-04-13 07:10:19 -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
4de58e6d60
Remove execute bit on .c/.h files.
2019-05-14 13:58:06 -07:00
David Garske
c9a2f6ec47
Added support for XPRINTF. Moved the TPM hardware type detection until after the user_settings.h include.
2019-05-14 09:39:38 -07:00
David Garske
74e561f825
TPM improvements and fixes for testing hardware. Optimization to init mutex and rng on use only.
2019-05-08 11:41:09 -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
cf4acfeb1b
Added way to include generated `wolftpm/options.h` (or customized one) using `WOLFTPM_USER_SETTINGS`.
2019-02-21 14:01:11 -08: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
d21ba091b4
Cleanup to combine benchmark time code and allow override using `WOLFSSL_USER_CURRTIME`. Benchmark modes can be disabled using `NO_TPM_BENCH`. Fix a few minor warnings.
2019-02-12 10:29:22 -08:00
David Garske
19bfc49d4e
Fix for polling timeout issue on RSA key gen. Improved performance for SLB9670 by adding 10us delay between polling. Tuned max SPI clock and performance for supported TPM 2.0 chips. Cleanups for the configure automake output. Updated benchmarks and console output for examples in README.md. Added self test wrapper and call to it in wrapper init to resolve ATTPM20 issue (can also be enabled using `WOLFTPM_PERFORM_SELFTEST`).
2019-02-08 17:29:34 -08:00
David Garske
b380020475
Fix spelling error. Extend the TLS benchmark time support.
2019-02-07 15:46:53 -08:00
David Garske
5ca41bf46d
Added hash update cache support for "will copy" flag. Added HMAC key to CryptoCb. Added macro `WOLFTPM_CUSTOM_TYPES` to allow override of the stdlib calls.
2019-02-04 13:20:11 -08:00
David Garske
a5d286c737
Fixes for various compiler warnings. Fixes for supporting new CryptoCb. Added way to implement own socket functions for TLS examples. Added TLS error codes.
2019-02-01 13:27:52 -08:00
David Garske
e057bc0a35
Cleanup to ensure `TpmCryptoDevCtx tpmCtx` is memset. Added support for handling new cryptocb update.
2019-02-01 13:27:52 -08:00
David Garske
3433f0a045
Adds TIS locking protection when `WOLFTPM_TIS_LOCK` is defined. Uses a named semaphore to protect concurrent access to TPM device from multiple processes. This allows the wolfTPM example TLS client/server to be used against each other.
2019-02-01 13:26:55 -08:00
David Garske
66e845c209
Added new `wolfTPM2_GetCapabilities` wrapper API for getting chip info.
2018-11-20 06:27:23 -08:00
David Garske
f36cd4e349
Fixes for TLS server and client using RSA and ECC. Fixes for ECC sign cryptodev callback. Added an optional crypto dev callback for checking the key to determine if "fake" key is used. Added ability to use ECC permenant key for TLS examples using `USE_TLS_ECC`.
2018-11-14 09:51:06 -08:00
David Garske
6ce63ee671
Support for loading an external private key using new API's `wolfTPM2_LoadPrivateKey`, `wolfTPM2_LoadRsaPrivateKey`, and `wolfTPM2_LoadEccPrivateKey`. Cleanup of the packet code to handle determining of size (mark/place). Added support for computing object name `wolfTPM2_ComputeName`. Added support for converting sensitve to private `wolfTPM2_SensitiveToPrivate`. Tested on SLB9670 and ST33.
2018-11-12 11:12:52 -08:00
David Garske
2ea3811e96
Refactor to eliminate the packed TPM2_HEADER. Adds better portability for source code.
2018-11-06 09:04:39 -08:00
David Garske
6ffbe6c5bc
Fix to detect improper packing for TPM2_HEADER. Fix for compiler warning about XSTRLEN type conversion warning in wrapper hash test. Made the pack macros overridable.
2018-10-17 08:27:11 -07:00
David Garske
95a978c37b
Added new RNG wrapper API `wolfTPM2_GetRandom`. Added macro for hardware RNG max request as `MAX_RNG_REQ_SIZE`. Trailing whitespace cleanup.
2018-09-20 12:15:03 -07:00
David Garske
0cfe8dd789
Decoupled the fixed algorithms sizes and build options from wolfCrypt. Now wolfCrypt can be built with algos like SHA256 and AES disabled, but they can still be supported in wolfTPM. Updated the README.md with a few additional build details.
2018-09-13 18:41:03 -07:00
David Garske
6fe075911a
* Added advanced IO callback support (enabled using `--enable-advio` or `#define WOLFTPM_ADV_IO`).
...
* Added ST33 TPM 2.0 support (`--enable-st33` or `#define WOLFTPM_ST33`). Only SPI version is tested and verified.
* Experimental TIS I2C support (`--enable-i2c` or `#define WOLFTPM_I2C`).
* Cleanup of the IO callback examples.
* Added support for Atmel ASF SPI.
2018-08-22 16:40:33 -07:00
David Garske
5ce7e00d05
Fix for packing `TPM2_HEADER` structure in IAR EWARM.
2018-08-21 19:58:19 -07:00
David Garske
e5929bae0a
TIS cleanup to improve return code and timeout handling. Added overridable define `WOLFTPM_LOCALITY_DEFAULT` for the locality used. Added `XTPM_WAIT()` macro to enable custom wait between polling. Increased the default `TPM_TIMEOUT_TRIES` to give enough time on Pi to do a key gen. Removed unused SET, CLEAR, TRUE, FALSE macros.
2018-08-16 15:54:12 -07:00
David Garske
c5a4c06dd1
Fixes for building with different wolfCrypt options. Fix for byte swap build error.
2018-08-15 11:53:14 -07:00
David Garske
d8174d4ef7
Added build option to disable wolfCrypt dependency using `./configure --disable-wolfcrypt` or `#define WOLFTPM2_NO_WOLFCRYPT`. Moved types and configuration/port specific items into new `tpm2_types.h`. Removed execute bit on serveral files.
2018-08-12 15:25:35 -07:00