diff --git a/CMakeLists.txt b/CMakeLists.txt index 157b000..61b357d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 @@ -154,6 +124,37 @@ target_include_directories(wolftpm $ ) + +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 diff --git a/ChangeLog.md b/ChangeLog.md index af2c8f4..61de946 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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** diff --git a/configure.ac b/configure.ac index 7989448..4dee1db 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) @@ -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 # | | | # +------+ | +---+ # | | | diff --git a/examples/tpm_test.h b/examples/tpm_test.h old mode 100755 new mode 100644 diff --git a/src/tpm2.c b/src/tpm2.c index 1aad467..5228e58 100644 --- a/src/tpm2.c +++ b/src/tpm2.c @@ -91,7 +91,7 @@ static void TPM2_ReleaseLock(TPM2_CTX* ctx) if (ctx->lockCount == 0) { wc_UnLockMutex(&ctx->hwLock); } - + #endif } diff --git a/wolftpm/tpm2_types.h b/wolftpm/tpm2_types.h old mode 100755 new mode 100644 diff --git a/wolftpm/tpm2_wrap.h b/wolftpm/tpm2_wrap.h old mode 100755 new mode 100644 diff --git a/wolftpm/version.h b/wolftpm/version.h index bbf541b..5fca3e8 100644 --- a/wolftpm/version.h +++ b/wolftpm/version.h @@ -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 }