Skip to content

Commit 424448f

Browse files
committed
Release v3.10.0 prep. Change swtpm port to use number.
1 parent 0a3b8de commit 424448f

File tree

6 files changed

+57
-9
lines changed

6 files changed

+57
-9
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 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.9.2 LANGUAGES C)
24+
project(wolfTPM VERSION 3.10.0 LANGUAGES C)
2525

2626
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2727
set(WOLFTPM_DEFINITIONS)
@@ -170,7 +170,7 @@ if("${WOLFTPM_INTERFACE}" STREQUAL "SWTPM")
170170
# SWTPM port configuration
171171
set(WOLFTPM_SWTPM_PORT "2321" CACHE STRING
172172
"Set SWTPM socket port (default: 2321)")
173-
list(APPEND WOLFTPM_DEFINITIONS "-DTPM2_SWTPM_PORT=\"${WOLFTPM_SWTPM_PORT}\"")
173+
list(APPEND WOLFTPM_DEFINITIONS "-DTPM2_SWTPM_PORT=${WOLFTPM_SWTPM_PORT}")
174174

175175
elseif("${WOLFTPM_INTERFACE}" STREQUAL "DEVTPM")
176176
list(APPEND WOLFTPM_DEFINITIONS "-DWOLFTPM_LINUX_DEV")

ChangeLog.md

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

3+
## wolfTPM Release 3.10.0 (Dec 2, 2025)
4+
5+
**Summary**
6+
7+
This release includes important bug fixes for password handling, hash algorithm selection, and TLS shutdown. Enhanced CMake support with TPM module selection. Improved Linux TPM resource manager handling. Security improvements for HMAC validation and payload length checks. Various build system improvements and test enhancements.
8+
9+
**Detail**
10+
11+
* Fixed critical bug in password handling (PR #439)
12+
- Fixed `wolfTPM2_SetKeyAuthPassword` that was truncating password to 2 bytes (bug introduced in PR #427 and release v3.9.2)
13+
- Added test to catch this and verified no other similar issues exist
14+
* Enhanced CMake support and TPM module selection (PR #438)
15+
- Added CMake support for choosing a TPM module
16+
- Finished CMake options to sync with configure
17+
- Further improvements to CMake interfaces and test scripts
18+
* Security improvements for TPM response validation (PR #437)
19+
- Validate `TPM2_GetProductInfo` payload length to avoid signed underflow and out-of-bounds access
20+
- Enforce TPM response HMAC length checks to reject zero-length or mismatched response HMACs for authenticated sessions
21+
* Added Linux TPM Resource Manager support (PR #435, #434)
22+
- Added persistent access to `/dev/tpmrmX` (enabled with `WOLFTPM_USE_TPMRM`)
23+
- Fixed TPM Linux `read()` error return code handling
24+
* Fixed crypto callback and hash algorithm selection (PR #433)
25+
- Fixed crypto callback to return CRYPTOCB_UNAVAILABLE when a TPM key is not set
26+
- Fixed to use curve type to determine hash type not digest size
27+
* Improved signature verification hash detection (PR #432)
28+
- Fixed `TPM2_VerifySignature` to detect correct hash algorithm
29+
- Added more test cases for signature verification
30+
* Improved TLS bidirectional shutdown (PR #431)
31+
- Improved the TLS bidirectional shutdown
32+
- Fixed for missing `WC_PK_TYPE_RSA_GET_SIZE` in older releases
33+
* Fixed CMake lock options (PR #430)
34+
- Fixed backward yes/no logic of `WOLFTPM_NO_LOCK_DEFAULT`
35+
- Fixed if check statement of `WOLFTPM_NO_LOCK`
36+
- Updated default logic for `WOLFTPM_NO_LOCK` depending on state of `WOLFTPM_SINGLE_THREADED`
37+
* Build system and testing improvements
38+
- Added new `make cppcheck` option with fixes for cppcheck
39+
- Fixed issue with possible use of uninitialized `rc` in `TPM2_GetNonceNoLock`
40+
- Fixed for build and testing with `--enable-infineon=9670` with additional build tests
41+
- Support for swtpm port arguments
42+
- Split up the make tests into matrix (improve test time)
43+
* Various spelling fixes and code cleanup
44+
45+
346
## wolfTPM Release 3.9.2 (July 30, 2025)
447

548
**Summary**

configure.ac

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

55
AC_COPYRIGHT([Copyright (C) 2014-2025 wolfSSL Inc.])
6-
AC_INIT([wolftpm],[3.9.2],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])
6+
AC_INIT([wolftpm],[3.10.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:7:0
31+
WOLFTPM_LIBRARY_VERSION=16:8:0
3232
# | | |
3333
# +------+ | +---+
3434
# | | |
@@ -250,7 +250,7 @@ then
250250
fi
251251

252252
AM_CFLAGS="$AM_CFLAGS -DWOLFTPM_SWTPM"
253-
AM_CFLAGS="$AM_CFLAGS -DTPM2_SWTPM_PORT=\"$SWTPM_PORT\""
253+
AM_CFLAGS="$AM_CFLAGS -DTPM2_SWTPM_PORT=$SWTPM_PORT"
254254

255255
# Set distcheck flag if port is not default (only when SWTPM is enabled)
256256
if test "x$SWTPM_PORT" != "x2321"; then

src/tpm2_swtpm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#define TPM2_SWTPM_HOST "localhost"
6363
#endif
6464
#ifndef TPM2_SWTPM_PORT
65-
#define TPM2_SWTPM_PORT "2321"
65+
#define TPM2_SWTPM_PORT 2321
6666
#endif
6767

6868
static TPM_RC SwTpmTransmit(TPM2_CTX* ctx, const void* buffer, ssize_t bufSz)
@@ -268,7 +268,7 @@ int TPM2_SWTPM_SendCommand(TPM2_CTX* ctx, TPM2_Packet* packet)
268268
}
269269

270270
if (ctx->tcpCtx.fd < 0) {
271-
rc = SwTpmConnect(ctx, TPM2_SWTPM_HOST, TPM2_SWTPM_PORT);
271+
rc = SwTpmConnect(ctx, TPM2_SWTPM_HOST, XSTRINGIFY(TPM2_SWTPM_PORT));
272272
}
273273

274274
#ifdef WOLFTPM_DEBUG_VERBOSE

wolftpm/tpm2_types.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ typedef int64_t INT64;
288288
#define WOLFTPM_NO_LOCK
289289
#endif
290290

291+
/* Helper to convert macro to string */
292+
#ifndef XSTRINGIFY
293+
#define XSTRINGIFY(s) STRINGIFY(s)
294+
#define STRINGIFY(s) #s
295+
#endif
291296

292297
/* ---------------------------------------------------------------------------*/
293298
/* TPM HARDWARE TYPE */

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.9.2"
38-
#define LIBWOLFTPM_VERSION_HEX 0x03009002
37+
#define LIBWOLFTPM_VERSION_STRING "3.10.0"
38+
#define LIBWOLFTPM_VERSION_HEX 0x03010000
3939

4040
#ifdef __cplusplus
4141
}

0 commit comments

Comments
 (0)