Skip to content

Commit

Permalink
Merge pull request #240 from dgarske/wolftpm-v2.6.0
Browse files Browse the repository at this point in the history
wolfTPM v2.6.0 Release
  • Loading branch information
anhu authored Sep 1, 2022
2 parents ed9c746 + 94b59d5 commit 9cbf348
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 36 deletions.
63 changes: 32 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

cmake_minimum_required(VERSION 3.16)

project(wolfTPM VERSION 2.5.0 LANGUAGES C)
project(wolfTPM VERSION 2.6.0 LANGUAGES C)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(WOLFTPM_DEFINITIONS)
Expand All @@ -45,36 +45,6 @@ target_compile_definitions(wolftpm PRIVATE
)


if (WITH_WOLFSSL)
target_link_libraries(wolftpm PUBLIC wolfssl)
target_include_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/include)
target_link_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/lib)
elseif (WITH_WOLFSSL_TREE)
set(WOLFSSL_TPM "yes" CACHE STRING "")
set(WOLFSSL_EXAMPLES "no" CACHE STRING "")
set(WOLFSSL_CRYPT_TESTS "no" CACHE STRING "")
add_subdirectory(${WITH_WOLFSSL_TREE} wolfssl)
target_link_libraries(wolftpm PUBLIC wolfssl)
else()
find_package(PkgConfig)
pkg_check_modules(WOLFSSL wolfssl)

if (WOLFSSL_FOUND)
target_link_libraries(wolftpm PUBLIC ${WOLFSSL_LIBRARIES})
target_include_directories(wolftpm PUBLIC ${WOLFSSL_INCLUDE_DIRS})
target_link_directories(wolftpm PUBLIC ${WOLFSSL_LIBRARY_DIRS})
target_compile_options(wolftpm PUBLIC ${WOLFSSL_CFLAGS_OTHER})
else()
# For support with vcpkg
find_package(wolfssl CONFIG)
if (wolfssl_FOUND)
target_link_libraries(wolftpm PUBLIC wolfssl)
else()
list(APPEND WOLFTPM_DEFINITIONS "-DWOLFTPM2_NO_WOLFCRYPT")
endif()
endif()
endif()

# TODO
# * wrapper
# * wolfcrypt
Expand Down Expand Up @@ -154,6 +124,37 @@ target_include_directories(wolftpm
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)


if (WITH_WOLFSSL)
target_link_libraries(wolftpm PUBLIC wolfssl)
target_include_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/include)
target_link_directories(wolftpm PUBLIC ${WITH_WOLFSSL}/lib)
elseif (WITH_WOLFSSL_TREE)
set(WOLFSSL_TPM "yes" CACHE STRING "")
set(WOLFSSL_EXAMPLES "no" CACHE STRING "")
set(WOLFSSL_CRYPT_TESTS "no" CACHE STRING "")
add_subdirectory(${WITH_WOLFSSL_TREE} wolfssl)
target_link_libraries(wolftpm PUBLIC wolfssl)
else()
find_package(PkgConfig)
pkg_check_modules(WOLFSSL wolfssl)

if (WOLFSSL_FOUND)
target_link_libraries(wolftpm PUBLIC ${WOLFSSL_LIBRARIES})
target_include_directories(wolftpm PUBLIC ${WOLFSSL_INCLUDE_DIRS})
target_link_directories(wolftpm PUBLIC ${WOLFSSL_LIBRARY_DIRS})
target_compile_options(wolftpm PUBLIC ${WOLFSSL_CFLAGS_OTHER})
else()
# For support with vcpkg
find_package(wolfssl CONFIG)
if (wolfssl_FOUND)
target_link_libraries(wolftpm PUBLIC wolfssl)
else()
list(APPEND WOLFTPM_DEFINITIONS "-DWOLFTPM2_NO_WOLFCRYPT")
endif()
endif()
endif()

if (WOLFTPM_EXAMPLES)
add_library(tpm_test_lib STATIC
examples/tpm_io.c
Expand Down
18 changes: 18 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Release Notes

## wolfTPM Release 2.6 (09/01/2022)

**Summary**

Fix for CSharp wrapper when setting a custom OID for a CSR. Added CSharp wrapper documentation and improved a few others. Added CSharp function to set key password for blob.

**Detail**

* Fix for CSharp `SetCustomExtension` to use allocated byte buffer instead of passing string (PR #239)
* Fixed for CMake `wolftpm/options.h` generation to support disabled source tree changes (`CMAKE_DISABLE_SOURCE_CHANGES`) (PR #235)
* Fixed CMake / vcpkg issue with options.h output location (PR #235)
* Added CSharp `KeyBlob.SetKeyAuthPassword` and test case (PR #237)
* Added API documentation for the CSharp wrappers (PR #234)
* Fixed documentation error on `wolfTPM2_GetKeyBlobAsBuffer` (PR #234)
* Fixed documentation for encDecAlg with authenticated session (PR #236)
* Fixed software TPM (docs/SWTPM.md) example argument for `-rm` (PR #238)


## wolfTPM Release 2.5 (07/22/2022)

**Summary**
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# All right reserved.

AC_COPYRIGHT([Copyright (C) 2014-2021 wolfSSL Inc.])
AC_INIT([wolftpm],[2.5.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])
AC_INIT([wolftpm],[2.6.0],[https://github.com/wolfssl/wolfTPM/issues],[wolftpm],[http://www.wolfssl.com])

AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux])
Expand All @@ -23,7 +23,7 @@ AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])

WOLFTPM_LIBRARY_VERSION=14:0:0
WOLFTPM_LIBRARY_VERSION=15:0:0
# | | |
# +------+ | +---+
# | | |
Expand Down
Empty file modified examples/tpm_test.h
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion src/tpm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void TPM2_ReleaseLock(TPM2_CTX* ctx)
if (ctx->lockCount == 0) {
wc_UnLockMutex(&ctx->hwLock);
}

#endif
}

Expand Down
Empty file modified wolftpm/tpm2_types.h
100755 → 100644
Empty file.
Empty file modified wolftpm/tpm2_wrap.h
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions wolftpm/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
extern "C" {
#endif

#define LIBWOLFTPM_VERSION_STRING "2.5.0"
#define LIBWOLFTPM_VERSION_HEX 0x02005000
#define LIBWOLFTPM_VERSION_STRING "2.6.0"
#define LIBWOLFTPM_VERSION_HEX 0x02006000

#ifdef __cplusplus
}
Expand Down

0 comments on commit 9cbf348

Please sign in to comment.