Merge pull request #115 from embhorn/release_v1.9

Release v1.9 preparation
pull/116/head
David Garske 2020-08-24 12:33:07 -07:00 committed by GitHub
commit 00fa701874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 80 additions and 19 deletions

View File

@ -1,5 +1,30 @@
## Release Notes ## Release Notes
### wolfTPM Release 1.9 (02/21/2020)
**Summary**
Added NPCT75x Nuvoton support, dynamic module detection, and attestation key wrappers.
**Detail**
* Fix when building wolfSSL with old names `NO_OLD_WC_NAMES`. (PR #113)
* Fix for TPM2 commands with more than one auth session. (PR #95)
* Bugfixes for TPM2_Packet_AppendSymmetric and TPM2_Packet_ParseSymmetric. (PR #111)
* TPM attestation fixes. (PR #103)
* If creating an NV and it already exists, set auth and handle anyways. (PR #99)
* Cleanups, removed unused code from the PCR examples. (PR #112)
* Improvements to the signed timestamp example. (PR #108)
* Add example of a TPM2.0 Quote using wolfTPM. (PR #107)
* Added NPCT75x Nuvoton support and dynamic module detection support. (PR #102)
* Added RSA sign/verify support and expanded RSA key loading API's. (PR #101)
* Attestation key wrappers. (PR #100)
* Add missing xor overload to TPMU_SYM_KEY_BITS. (PR #97)
* Signed timestamp example (AIK and Attestation). (PR #96)
* Adding more testing. (PR #93)
* Add TPM benchmarking results for Nuvoton NPCT650 TPM2.0 module. (PR #92)
### wolfTPM Release 1.8 (04/28/2020) ### wolfTPM Release 1.8 (04/28/2020)
**Summary** **Summary**

View File

@ -3,7 +3,7 @@
# All right reserved. # All right reserved.
AC_COPYRIGHT([Copyright (C) 2014-2020 wolfSSL Inc.]) AC_COPYRIGHT([Copyright (C) 2014-2020 wolfSSL Inc.])
AC_INIT([wolftpm],[1.8.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com]) AC_INIT([wolftpm],[1.9.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])
AC_PREREQ([2.63]) AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
@ -23,7 +23,7 @@ AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_HEADERS([src/config.h])
WOLFTPM_LIBRARY_VERSION=8:0:0 WOLFTPM_LIBRARY_VERSION=9:0:0
# | | | # | | |
# +------+ | +---+ # +------+ | +---+
# | | | # | | |

View File

@ -23,6 +23,8 @@
#include <wolftpm/tpm2_wrap.h> #include <wolftpm/tpm2_wrap.h>
#ifndef WOLFTPM2_NO_WRAPPER
#ifndef WOLFTPM2_NO_WOLFCRYPT #ifndef WOLFTPM2_NO_WOLFCRYPT
#include <wolfssl/wolfcrypt/hash.h> #include <wolfssl/wolfcrypt/hash.h>
#endif #endif
@ -198,13 +200,20 @@ exit_badargs:
/* --- END TPM2.0 PCR Extend example tool -- */ /* --- END TPM2.0 PCR Extend example tool -- */
/******************************************************************************/ /******************************************************************************/
#endif /* !WOLFTPM2_NO_WRAPPER */
#ifndef NO_MAIN_DRIVER #ifndef NO_MAIN_DRIVER
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int rc; int rc = -1;
#ifndef WOLFTPM2_NO_WRAPPER
rc = TPM2_Extend_Test(NULL, argc, argv); rc = TPM2_Extend_Test(NULL, argc, argv);
#else
printf("Wrapper code not compiled in\n");
(void)argc;
(void)argv;
#endif /* !WOLFTPM2_NO_WRAPPER */
return rc; return rc;
} }

View File

@ -25,6 +25,7 @@
#include <wolftpm/tpm2_wrap.h> #include <wolftpm/tpm2_wrap.h>
#ifndef WOLFTPM2_NO_WRAPPER
#include <examples/pcr/quote.h> #include <examples/pcr/quote.h>
#include <examples/tpm_io.h> #include <examples/tpm_io.h>
#include <examples/tpm_test.h> #include <examples/tpm_test.h>
@ -149,6 +150,7 @@ int TPM2_Quote_Test(void* userCtx, int argc, char *argv[])
/* Create primary storage key (RSA) */ /* Create primary storage key (RSA) */
rc = wolfTPM2_CreateSRK(&dev, &storage, TPM_ALG_RSA, rc = wolfTPM2_CreateSRK(&dev, &storage, TPM_ALG_RSA,
(byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1); (byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1);
if (rc != 0) goto exit;
/* Move storage key into persistent NV */ /* Move storage key into persistent NV */
rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storage, rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storage,
@ -269,14 +271,20 @@ exit_badargs:
/* --- END TPM2.0 Quote Test -- */ /* --- END TPM2.0 Quote Test -- */
/******************************************************************************/ /******************************************************************************/
#endif /* !WOLFTPM2_NO_WRAPPER */
#ifndef NO_MAIN_DRIVER #ifndef NO_MAIN_DRIVER
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int rc; int rc = -1;
#ifndef WOLFTPM2_NO_WRAPPER
rc = TPM2_Quote_Test(NULL, argc, argv); rc = TPM2_Quote_Test(NULL, argc, argv);
#else
printf("Wrapper code not compiled in\n");
(void)argc;
(void)argv;
#endif /* !WOLFTPM2_NO_WRAPPER */
return rc; return rc;
} }
#endif #endif

View File

@ -23,6 +23,8 @@
#include <wolftpm/tpm2_wrap.h> #include <wolftpm/tpm2_wrap.h>
#ifndef WOLFTPM2_NO_WRAPPER
#include <examples/pcr/reset.h> #include <examples/pcr/reset.h>
#include <examples/tpm_io.h> #include <examples/tpm_io.h>
#include <examples/tpm_test.h> #include <examples/tpm_test.h>
@ -134,14 +136,20 @@ exit_badargs:
/******************************************************************************/ /******************************************************************************/
/* --- END TPM2.0 PCR Reset example tool -- */ /* --- END TPM2.0 PCR Reset example tool -- */
/******************************************************************************/ /******************************************************************************/
#endif /* !WOLFTPM2_NO_WRAPPER */
#ifndef NO_MAIN_DRIVER #ifndef NO_MAIN_DRIVER
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int rc; int rc = -1;
#ifndef WOLFTPM2_NO_WRAPPER
rc = TPM2_Reset_Test(NULL, argc, argv); rc = TPM2_Reset_Test(NULL, argc, argv);
#else
printf("Wrapper code not compiled in\n");
(void)argc;
(void)argv;
#endif /* !WOLFTPM2_NO_WRAPPER */
return rc; return rc;
} }

View File

@ -25,6 +25,8 @@
#include <wolftpm/tpm2_wrap.h> #include <wolftpm/tpm2_wrap.h>
#ifndef WOLFTPM2_NO_WRAPPER
#include <examples/timestamp/signed_timestamp.h> #include <examples/timestamp/signed_timestamp.h>
#include <examples/tpm_io.h> #include <examples/tpm_io.h>
#include <examples/tpm_test.h> #include <examples/tpm_test.h>
@ -124,6 +126,7 @@ int TPM2_Timestamp_Test(void* userCtx)
/* Create primary storage key (RSA) */ /* Create primary storage key (RSA) */
rc = wolfTPM2_CreateSRK(&dev, &storage, TPM_ALG_RSA, rc = wolfTPM2_CreateSRK(&dev, &storage, TPM_ALG_RSA,
(byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1); (byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1);
if (rc != 0) goto exit;
/* Move storage key into persistent NV */ /* Move storage key into persistent NV */
rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storage, rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storage,
@ -290,13 +293,19 @@ exit:
/* --- END TPM Timestamp Test -- */ /* --- END TPM Timestamp Test -- */
/******************************************************************************/ /******************************************************************************/
#endif /* !WOLFTPM2_NO_WRAPPER */
#ifndef NO_MAIN_DRIVER #ifndef NO_MAIN_DRIVER
int main(void) int main(void)
{ {
int rc; int rc = -1;
#ifndef WOLFTPM2_NO_WRAPPER
rc = TPM2_Timestamp_Test(NULL); rc = TPM2_Timestamp_Test(NULL);
#else
printf("Wrapper code not compiled in\n");
#endif /* !WOLFTPM2_NO_WRAPPER */
return rc; return rc;
} }

View File

@ -495,8 +495,8 @@ int main(void)
(defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB))
rc = TPM2_TLS_Client(NULL); rc = TPM2_TLS_Client(NULL);
#else #else
printf("Wrapper/CryptoDev code not compiled in\n"); printf("Wrapper/Crypto callback code not compiled in\n");
printf("Build wolfssl with ./configure --enable-cryptodev\n"); printf("Build wolfssl with ./configure --enable-cryptocb\n");
#endif #endif
return rc; return rc;

View File

@ -485,8 +485,8 @@ int main(void)
(defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB)) (defined(WOLF_CRYPTO_DEV) || defined(WOLF_CRYPTO_CB))
rc = TPM2_TLS_Server(NULL); rc = TPM2_TLS_Server(NULL);
#else #else
printf("Wrapper/CryptoDev code not compiled in\n"); printf("Wrapper/Crypto callback code not compiled in\n");
printf("Build wolfssl with ./configure --enable-cryptodev\n"); printf("Build wolfssl with ./configure --enable-cryptocb\n");
#endif #endif
return rc; return rc;

View File

@ -184,6 +184,7 @@ int TPM2_Wrapper_Test(void* userCtx)
/* Create primary storage key (RSA) */ /* Create primary storage key (RSA) */
rc = wolfTPM2_CreateSRK(&dev, &storageKey, TPM_ALG_RSA, rc = wolfTPM2_CreateSRK(&dev, &storageKey, TPM_ALG_RSA,
(byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1); (byte*)gStorageKeyAuth, sizeof(gStorageKeyAuth)-1);
if (rc != 0) goto exit;
/* Move this key into persistent storage */ /* Move this key into persistent storage */
rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storageKey, rc = wolfTPM2_NVStoreKey(&dev, TPM_RH_OWNER, &storageKey,

View File

@ -357,7 +357,7 @@ void TPM2_Packet_AppendSymmetric(TPM2_Packet* packet, TPMT_SYM_DEF* symmetric)
TPM2_Packet_AppendU16(packet, symmetric->algorithm); TPM2_Packet_AppendU16(packet, symmetric->algorithm);
switch (symmetric->algorithm) { switch (symmetric->algorithm) {
case TPM_ALG_XOR: case TPM_ALG_XOR:
TPM2_Packet_AppendU16(packet, symmetric->keyBits.xor); TPM2_Packet_AppendU16(packet, symmetric->keyBits.xorr);
break; break;
case TPM_ALG_AES: case TPM_ALG_AES:
TPM2_Packet_AppendU16(packet, symmetric->keyBits.aes); TPM2_Packet_AppendU16(packet, symmetric->keyBits.aes);
@ -376,7 +376,7 @@ void TPM2_Packet_ParseSymmetric(TPM2_Packet* packet, TPMT_SYM_DEF* symmetric)
TPM2_Packet_ParseU16(packet, &symmetric->algorithm); TPM2_Packet_ParseU16(packet, &symmetric->algorithm);
switch (symmetric->algorithm) { switch (symmetric->algorithm) {
case TPM_ALG_XOR: case TPM_ALG_XOR:
TPM2_Packet_ParseU16(packet, &symmetric->keyBits.xor); TPM2_Packet_ParseU16(packet, &symmetric->keyBits.xorr);
break; break;
case TPM_ALG_AES: case TPM_ALG_AES:
TPM2_Packet_ParseU16(packet, &symmetric->keyBits.aes); TPM2_Packet_ParseU16(packet, &symmetric->keyBits.aes);

View File

@ -458,8 +458,9 @@ int wolfTPM2_StartSession(WOLFTPM2_DEV* dev, WOLFTPM2_SESSION* session,
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
XMEMSET(&authSesIn, 0, sizeof(authSesIn)); XMEMSET(&authSesIn, 0, sizeof(authSesIn));
authSesIn.tpmKey = tpmKey ? tpmKey->handle.hndl : TPM_RH_NULL; authSesIn.tpmKey = tpmKey ? tpmKey->handle.hndl :
authSesIn.bind = bind ? bind->hndl : TPM_RH_NULL; (TPMI_DH_OBJECT)TPM_RH_NULL;
authSesIn.bind = bind ? bind->hndl : (TPMI_DH_ENTITY)TPM_RH_NULL;
authSesIn.sessionType = sesType; authSesIn.sessionType = sesType;
if (useEncryptDecrypt) { if (useEncryptDecrypt) {
authSesIn.symmetric.algorithm = TPM_ALG_AES; authSesIn.symmetric.algorithm = TPM_ALG_AES;

View File

@ -1080,7 +1080,7 @@ typedef TPM_KEY_BITS TPMI_AES_KEY_BITS;
typedef union TPMU_SYM_KEY_BITS { typedef union TPMU_SYM_KEY_BITS {
TPMI_AES_KEY_BITS aes; TPMI_AES_KEY_BITS aes;
TPM_KEY_BITS sym; TPM_KEY_BITS sym;
TPMI_ALG_HASH xor; TPMI_ALG_HASH xorr;
} TPMU_SYM_KEY_BITS; } TPMU_SYM_KEY_BITS;
typedef union TPMU_SYM_MODE { typedef union TPMU_SYM_MODE {

View File

@ -34,8 +34,8 @@
extern "C" { extern "C" {
#endif #endif
#define LIBWOLFTPM_VERSION_STRING "1.8.0" #define LIBWOLFTPM_VERSION_STRING "1.9.0"
#define LIBWOLFTPM_VERSION_HEX 0x01008000 #define LIBWOLFTPM_VERSION_HEX 0x01009000
#ifdef __cplusplus #ifdef __cplusplus
} }