Skip to content

Commit bcf2647

Browse files
authored
Merge pull request #393 from dgarske/rel_v3.8.0_prep
wolfTPM Release v3.8.0 prep
2 parents 703b728 + 2069ed7 commit bcf2647

File tree

9 files changed

+43
-11
lines changed

9 files changed

+43
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ examples/keygen/keyload
6464
examples/keygen/keygen
6565
examples/keygen/keyimport
6666
examples/keygen/external_import
67+
examples/nvram/extend
6768
examples/nvram/store
6869
examples/nvram/read
6970
examples/nvram/counter

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
cmake_minimum_required(VERSION 3.16)
2323

24-
project(wolfTPM VERSION 3.6.0 LANGUAGES C)
24+
project(wolfTPM VERSION 3.8.0 LANGUAGES C)
2525

2626
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2727
set(WOLFTPM_DEFINITIONS)
@@ -296,6 +296,7 @@ if (WOLFTPM_EXAMPLES)
296296
add_tpm_example(secure_rot boot/secure_rot.c)
297297
add_tpm_example(csr csr/csr.c)
298298
add_tpm_example(get_ek_certs endorsement/get_ek_certs.c)
299+
add_tpm_example(ifx_fw_update firmware/ifx_fw_update.c)
299300
add_tpm_example(gpio_config gpio/gpio_config.c)
300301
add_tpm_example(gpio_read gpio/gpio_read.c)
301302
add_tpm_example(gpio_set gpio/gpio_set.c)
@@ -305,14 +306,16 @@ if (WOLFTPM_EXAMPLES)
305306
add_tpm_example(keyimport keygen/keyimport.c)
306307
add_tpm_example(keyload keygen/keyload.c)
307308
add_tpm_example(flush management/flush.c)
309+
add_tpm_example(tpmclear management/tpmclear.c)
308310
add_tpm_example(native_test native/native_test.c)
309311
add_tpm_example(counter nvram/counter.c)
312+
add_tpm_example(nvextend nvram/extend.c)
310313
add_tpm_example(policy_nv nvram/policy_nv.c)
311314
add_tpm_example(read nvram/read.c)
312315
add_tpm_example(store nvram/store.c)
313316
add_tpm_example(extend pcr/extend.c)
314-
add_tpm_example(policy pcr/policy.c)
315317
add_tpm_example(policy_sign pcr/policy_sign.c)
318+
add_tpm_example(policy pcr/policy.c)
316319
add_tpm_example(quote pcr/quote.c)
317320
add_tpm_example(read_pcr pcr/read_pcr.c)
318321
add_tpm_example(reset pcr/reset.c)
@@ -321,12 +324,11 @@ if (WOLFTPM_EXAMPLES)
321324
add_tpm_example(unseal seal/unseal.c)
322325
add_tpm_example(clock_set timestamp/clock_set.c)
323326
add_tpm_example(signed_timestamp timestamp/signed_timestamp.c)
324-
add_tpm_example(tls_client tls/tls_client.c)
325327
add_tpm_example(tls_client_notpm tls/tls_client_notpm.c)
328+
add_tpm_example(tls_client tls/tls_client.c)
326329
add_tpm_example(tls_server tls/tls_server.c)
327330
add_tpm_example(caps wrap/caps.c)
328331
add_tpm_example(wrap_test wrap/wrap_test.c)
329-
add_tpm_example(ifx_fw_update firmware/ifx_fw_update.c)
330332
endif()
331333

332334

ChangeLog.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release Notes
22

3+
## wolfTPM Release 3.8.0 (Jan 7, 2025)
4+
5+
**Summary**
6+
7+
Fixes for session auth on key bind and password policy. Added NV extend example used with Bus_Protection_Guidance. New wolfTPM2_NVExtend wrapper and example. Added new NV policy write/read wrapper API's used with policy auth
8+
9+
**Detail**
10+
11+
* Fixed issue with auth session binding. (PR #389)
12+
* Fixed possible missing `wc_GetPkcs8TraditionalOffset`. (PR #392)
13+
* Fixed issue with `wolfTPM2_PolicyHash` where input digest could be too large. (PR #389)
14+
* Added example for NV extend based on the TCG "bus protection guidance". (PR #389)
15+
* Added support for building wolfTPM against older wolfCrypt (like v4.7.0) including CI test. (PR #390)
16+
* Added HAL IO support for Microchip I2C bit-bang (PR #340)
17+
* Created separate tool (./examples/management/tpmclear) for performing the TPM2_Clear (don't use args in wrap_test). (PR #391)
18+
* Switched `wolfTPM2_LoadSymmetricKey` to default to the `WOLFTPM2_WRAP_DIGEST` for hash algorithm and not default to SHA1 for some sizes. (PR #388)
19+
* Improved TPM NV write debug logging to show before. (PR #392)
20+
* Cleanup the `SensitiveToPrivate` function stack variables. (PR #388)
21+
* Cleanup comments on EK/SRK. (PR #388)
22+
* Various spellings, tabs, execute bit on .c and formatting. (PR #386, #388, #392)
23+
24+
325
## wolfTPM Release 3.6.0 (Nov 5, 2024)
426

527
**Summary**

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# All right reserved.
44

55
AC_COPYRIGHT([Copyright (C) 2014-2024 wolfSSL Inc.])
6-
AC_INIT([wolftpm],[3.6.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])
6+
AC_INIT([wolftpm],[3.8.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])
77

88
AC_PREREQ([2.63])
99
AC_CONFIG_AUX_DIR([build-aux])
@@ -28,7 +28,7 @@ AC_ARG_PROGRAM
2828

2929
AC_CONFIG_HEADERS([src/config.h])
3030

31-
WOLFTPM_LIBRARY_VERSION=16:4:0
31+
WOLFTPM_LIBRARY_VERSION=16:5:0
3232
# | | |
3333
# +------+ | +---+
3434
# | | |

examples/nvram/extend.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ int TPM2_NVRAM_Extend_Example(void* userCtx, int argc, char *argv[])
187187
XMEMSET(policyOr, 0, sizeof(policyOr));
188188
rc = wolfTPM2_PolicyHash(hashAlg, policyOr, &nvSize,
189189
TPM_CC_PolicyOR, policyDigest, policyDigestSz);
190+
if (rc != TPM_RC_SUCCESS) {
191+
printf("wolfTPM2_PolicyHash failed!\n");
192+
goto exit;
193+
}
190194
printf("PolicyOR A/B/C: %d\n", nvSize);
191195
TPM2_PrintBin(policyOr, nvSize);
192196

@@ -247,6 +251,10 @@ int TPM2_NVRAM_Extend_Example(void* userCtx, int argc, char *argv[])
247251
policyOr, nvSize
248252
);
249253
}
254+
if (rc != 0) {
255+
printf("NV Create failed!\n");
256+
goto exit;
257+
}
250258

251259
/* Close session and unload endorsement */
252260
wolfTPM2_UnsetAuth(&dev, 0);

examples/tls/tls_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ int TPM2_TLS_ClientArgs(void* userCtx, int argc, char *argv[])
439439
#else
440440
void* pkey = NULL;
441441
#endif
442-
rc = wolfTPM2_ExportPublicKeyBuffer(&dev, pkey,
442+
rc = wolfTPM2_ExportPublicKeyBuffer(&dev, (WOLFTPM2_KEY*)pkey,
443443
ENCODING_TYPE_ASN1, der, &derSz);
444444
if (rc < 0) {
445445
printf("Failed to export TPM public key!\n");

examples/tls/tls_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int TPM2_TLS_ServerArgs(void* userCtx, int argc, char *argv[])
432432
#else
433433
void* pkey = NULL;
434434
#endif
435-
rc = wolfTPM2_ExportPublicKeyBuffer(&dev, pkey,
435+
rc = wolfTPM2_ExportPublicKeyBuffer(&dev, (WOLFTPM2_KEY*)pkey,
436436
ENCODING_TYPE_ASN1, der, &derSz);
437437
if (rc < 0) {
438438
printf("Failed to export TPM public key!\n");

src/tpm2_wrap.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7891,7 +7891,6 @@ static int tpm2_ifx_firmware_data(WOLFTPM2_DEV* dev,
78917891
rc = cb(&cmd[2], IFX_FW_MAX_CHUNK_SZ, offset, cb_ctx);
78927892
if (rc > 0 && rc <= IFX_FW_MAX_CHUNK_SZ) {
78937893
chunk_sz = rc;
7894-
rc = 0;
78957894
}
78967895
else if (rc == 0) {
78977896
#ifdef DEBUG_WOLFTPM

wolftpm/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
extern "C" {
3535
#endif
3636

37-
#define LIBWOLFTPM_VERSION_STRING "3.6.0"
38-
#define LIBWOLFTPM_VERSION_HEX 0x03006000
37+
#define LIBWOLFTPM_VERSION_STRING "3.8.0"
38+
#define LIBWOLFTPM_VERSION_HEX 0x03008000
3939

4040
#ifdef __cplusplus
4141
}

0 commit comments

Comments
 (0)