* Added option in keygen example to create and use keys under the EK
- Added PolicySecret to provide EK auth
* Fix wrong total auth area size when multiple auth sessions are used
* Workaround policy Session for EK auth
* Added flag in WOLFTPM2_HANDLE to specify when policyAuth is used
* Added three macros to check TPM2.0 Policy session type
* Added option to use keys under Endorsement Hierarchy in attestation examples
- MakeCredential modified to work without auth as TCG spec defines
- MakeCredential can now use EK pub to encrypt challenge
- AcivateCredential can now work with EK pub to decrypt challenge
* Added new wolfTPM2 wrapper for TPM2_CreateLoaded
- Added missing TPM2_CreateLoaded command in tpm2.c
- Create and load a key in single TPM 2.0 operation
* Added new wolfTPM2 wrappers to use PEM format in keygen
- wolfTPM2_RsaKey_TpmToPem
- wolfTPM2_RsaKey_PemToTpm
* Improved keygen, output in PEM format and saving EK's TPM2B_PUBLIC
- Added keygen option to output PEM files for TPM public keys
- Added saving of EK's TPM2B_PUBLIC for attestation purposes
* Modified keygen
- Uses new wolfTPM2_CreateLoaded wrapper to acquire correct AK name
- Stores AK name for attestation purposes
* Modified keyload to be able to load keys created under the EK/EH
- Uses new wrapper
- Can load keys created under EK/EH, non-AK and AK
* Added new wrapper for satisfying EK policy
* Applied fixes from peer review
Signed-off-by: Dimitar Tomov <dimi@wolfssl.com>
* Updated copyright
* Fixed minor cast warning.
* Fixed minor scan-build warnings.
* Cleanup print public and fix possible print of uninitialized field.
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>