diff --git a/README.md b/README.md index 94f4e52..78bc9b1 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,22 @@ Set to any value to stop storage of token data. ## Release Notes +### wolfPKCS11 Release 1.3 (Mar 22, 2024) + +**Summary** + +Added Visual Studio support for wolfPKCS11. Fixes for cast warnings and portability. + +**Detail** + +* Fixed `C_GetAttributeValue` incorrectly erroring with `CKR_ATTRIBUTE_VALUE_INVALID` when data == NULL. The `C_GetAttributeValue` should set length if data field is NULL. (PR #27) +* Fixed several cast warnings and possible use of uninitialized. (PR #28) +* Fixed portability issues with `WOLFPKCS11_USER_SETTINGS`. (PR #28) +* Added Visual Studio support for wolfPKCS11. (PR #28) + - This includes wolfTPM support with Windows TBS interface +* Reworked shared library versioning. (PR #29) + + ### wolfPKCS11 Release 1.2 (Dec 26, 2023) **Summary** diff --git a/configure.ac b/configure.ac index 29c2387..9dbe518 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ # AC_COPYRIGHT([Copyright (C) 2014-2023 wolfSSL Inc.]) AC_PREREQ([2.63]) -AC_INIT([wolfpkcs11],[1.2.0],[https://github.com/wolfssl/wolfpkcs11/issues],[wolfpkcs11],[http://www.wolfssl.com]) +AC_INIT([wolfpkcs11],[1.3.0],[https://github.com/wolfssl/wolfpkcs11/issues],[wolfpkcs11],[http://www.wolfssl.com]) AC_CONFIG_AUX_DIR([build-aux]) # The following sets CFLAGS to empty if unset on command line. @@ -32,18 +32,25 @@ AC_ARG_PROGRAM AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([wolfpkcs11/config.h]) -WOLFPKCS11_LIBRARY_VERSION=3:0:0 -# | | | -# +------+ | +---+ -# | | | -# current:revision:age -# | | | -# | | +- increment if interfaces have been added -# | | set to zero if interfaces have been removed -# | | or changed -# | +- increment if source code has changed -# | set to zero if current is incremented -# +- increment if interfaces have been added, removed or changed +# shared library versioning +# The three numbers in the libpkcs11.so.*.*.* file name. Unfortunately + +# increment if interfaces have been removed or changed +WOLFPKCS11_LIBRARY_VERSION_FIRST=3 + +# increment if interfaces have been added +# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented +WOLFPKCS11_LIBRARY_VERSION_SECOND=1 + +# increment if source code has changed +# set to zero if WOLFPKCS11_LIBRARY_VERSION_FIRST is incremented or +# WOLFPKCS11_LIBRARY_VERSION_SECOND is incremented +WOLFPKCS11_LIBRARY_VERSION_THIRD=0 + +WOLFPKCS11_LIBRARY_VERSION=${WOLFPKCS11_LIBRARY_VERSION_FIRST}:${WOLFPKCS11_LIBRARY_VERSION_SECOND}:${WOLFPKCS11_LIBRARY_VERSION_THIRD} +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_FIRST]) +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_SECOND]) +AC_SUBST([WOLFPKCS11_LIBRARY_VERSION_THIRD]) AC_SUBST([WOLFPKCS11_LIBRARY_VERSION]) diff --git a/src/crypto.c b/src/crypto.c index 1d6d0fc..0612a6d 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -3862,7 +3862,8 @@ CK_RV C_WrapKey(CK_SESSION_HANDLE hSession, if (ret != 0) return CKR_FUNCTION_FAILED; - serialBuff = XMALLOC(serialSize, NULL, DYNAMIC_TYPE_TMP_BUFFER); + serialBuff = (byte*)XMALLOC(serialSize, NULL, + DYNAMIC_TYPE_TMP_BUFFER); if (serialBuff == NULL) return CKR_HOST_MEMORY; @@ -4009,7 +4010,8 @@ CK_RV C_UnwrapKey(CK_SESSION_HANDLE hSession, if (wrapkeyType != CKK_AES) return CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT; - workBuffer = XMALLOC(ulWrappedKeyLen, NULL, DYNAMIC_TYPE_TMP_BUFFER); + workBuffer = (byte*)XMALLOC(ulWrappedKeyLen, NULL, + DYNAMIC_TYPE_TMP_BUFFER); if (workBuffer == NULL) return CKR_HOST_MEMORY; diff --git a/src/include.am b/src/include.am index 6322eac..f54ea41 100644 --- a/src/include.am +++ b/src/include.am @@ -12,7 +12,7 @@ src_libwolfpkcs11_la_SOURCES = \ src_libwolfpkcs11_la_CFLAGS = -DBUILDING_WOLFPKCS11 $(AM_CFLAGS) src_libwolfpkcs11_la_CPPFLAGS = -DBUILDING_WOLFPKCS11 $(AM_CPPFLAGS) -src_libwolfpkcs11_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFPKCS11_LIBRARY_VERSION} +src_libwolfpkcs11_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-number ${WOLFPKCS11_LIBRARY_VERSION} #src_libwolfpkcs11_la_DEPENDENCIES = #EXTRA_DIST += diff --git a/wolfpkcs11/version.h b/wolfpkcs11/version.h index b71823d..0489a70 100644 --- a/wolfpkcs11/version.h +++ b/wolfpkcs11/version.h @@ -28,8 +28,8 @@ extern "C" { #endif -#define LIBWOLFPKCS11_VERSION_STRING "1.2.0" -#define LIBWOLFPKCS11_VERSION_HEX 0x01002000 +#define LIBWOLFPKCS11_VERSION_STRING "1.3.0" +#define LIBWOLFPKCS11_VERSION_HEX 0x01003000 #ifdef __cplusplus }