Skip to content

Commit

Permalink
Merge pull request #29 from dgarske/rel_v1.3_prep
Browse files Browse the repository at this point in the history
wolfPKCS11 Release v1.3 preparation
  • Loading branch information
douzzer committed Mar 22, 2024
2 parents 5dc7cef + 61f3b58 commit b94a987
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 18 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
33 changes: 20 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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:https://www.wolfssl.com])
AC_INIT([wolfpkcs11],[1.3.0],[https://github.com/wolfssl/wolfpkcs11/issues],[wolfpkcs11],[http:https://www.wolfssl.com])
AC_CONFIG_AUX_DIR([build-aux])

# The following sets CFLAGS to empty if unset on command line.
Expand All @@ -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])


Expand Down
6 changes: 4 additions & 2 deletions src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 +=
4 changes: 2 additions & 2 deletions wolfpkcs11/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b94a987

Please sign in to comment.