Skip to content

Commit

Permalink
Diverse changes plus resolving merge conflict.
Browse files Browse the repository at this point in the history
- replace ^M^L by normal line feed
- keep using reentrant version of gmtime_r even though not really available
  under windows.
- Reformatting, whitespacing, and removal of outdated commented out statements.
- Keep tests even though not functional under windows.
  a.o. DeriveTests.testSymDerive ObjectTests.testCreateSecretKey
  SymmetricAlgorithmTests.CKM_AES_ECB-based
- merge conflict parameter to encryptDecrypt
- Use CPPUNIT_LIBRARIES iso. hardcoded CppUnit to keep linux cmake build
  working.
- Replace CppUnit_INCLUDE_DIR by CPPUNIT_INCLUDE_DIRS
- add_executable needs to be put befor  list(APPEND SOURCES  otherwise not
  known
- reenable cmake test for sqlite.h
- update cmake search script for cppunit and CPPUNIT_* variables
- try appveyor test with x64 again, appveyor not rely on specifc vcpkg release,
  reenable tests and some shuffling sequence to first update then build
- ECDSA by default on for cmake, only disable on windows
- SoftHSM.cpp don't emit exception output to cerr.

Merge remote-tracking branch 'upstream/develop' into HEAD
  • Loading branch information
halderen committed Jul 27, 2023
2 parents 3016c0a + ac70dc3 commit c97d646
Show file tree
Hide file tree
Showing 37 changed files with 253 additions and 267 deletions.
30 changes: 13 additions & 17 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: 2.6.0-{build}
configuration: Release
platform:
- x86
- x64
init:
- ps: >-
If ($env:Platform -Match "x86") {
Expand Down Expand Up @@ -58,29 +59,24 @@ install:
# Update vcpkg
- cd c:\tools\vcpkg
- cmd: git fetch
- cmd: git checkout 2021.05.12
- cmd: bootstrap-vcpkg.bat
- cmd: vcpkg update
- cmd: vcpkg upgrade --no-dry-run
- cmd: vcpkg install sqlite3:x86-windows
- cmd: vcpkg install openssl-windows:x86-windows
- cmd: vcpkg install openssl-windows:x84-windows
- cmd: vcpkg install openssl-windows:x64-windows
- cmd: vcpkg install botan:x86-windows
- cmd: vcpkg install cppunit:x86-windows
# static link is forbidden with components under GNU license
# switch to a source code under a more permissive NETBSD license
#- cmd: vcpkg install getopt-win32:x86-windows-static
- cmd: vcpkg update
- cmd: vcpkg upgrade --no-dry-run
- cmd: vcpkg integrate install
build_script:
- cmd: if exist "C:\projects\softhsmv2\build" rd /s /q C:\projects\softhsmv2\build
- cmd: if exist "C:\projects\softhsmv2\build" rmdir /s /q C:\projects\softhsmv2\build
- cmd: mkdir C:\projects\softhsmv2\build
- cmd: cd C:\projects\softhsmv2\build
- cmd: vcpkg integrate install
- cmd: cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DWITH_OBJECTSTORE_BACKEND_DB=%DB_BACKEND% -DWITH_CRYPTO_BACKEND=%CRYPTO_BACKEND% -DBUILD_TESTS=ON -DDISABLE_NON_PAGED_MEMORY=ON -DENABLE_GOST=OFF
- cmd: cmake --build . --config RelWithDebInfo
- cmd: ctest -C RelWithDebInfo --progress --verbose
- cmd: cmake -DCMAKE_INSTALL_PREFIX=build/SoftHSMv2-$(Platform) -DCMAKE_INSTALL_CONFIG_NAME=RelWithDebInfo -P cmake_install.cmake
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#test: off
- cmd: cmake -Bbuild -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake -DWITH_OBJECTSTORE_BACKEND_DB=%DB_BACKEND% -DWITH_CRYPTO_BACKEND=%CRYPTO_BACKEND% -DBUILD_TESTS=ON -DDISABLE_NON_PAGED_MEMORY=ON -DENABLE_GOST=OFF
- cmd: cmake -Bbuild --build . --config RelWithDebInfo
- cmd: ctest -Bbuild -C RelWithDebInfo --progress --verbose
- cmd: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=build/SoftHSMv2-$(Platform) -DCMAKE_INSTALL_CONFIG_NAME=RelWithDebInfo -P cmake_install.cmake
- cmd: IF "%ENV_PLATFORM%"=="x86" ( CD win32\Release ) ELSE ( CD win32\x64\Release)
test: on
artifacts:
- path: build/SoftHSMv2-$(Platform)
name: SoftHSMv2-$(PACKAGE_VERSION_NAME)-$(Platform)
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ before_install:
- sudo apt-get install build-essential autoconf automake libtool libcppunit-dev libsqlite3-dev sqlite3 libbotan-2-dev libssl-dev p11-kit
script: sh testing/travis/travis.sh
env:
- CPP_LIBRARY_ASSERTIONS=yes CRYPTO=openssl OBJSTORE=file
- CRYPTO=openssl OBJSTORE=file
- CRYPTO=openssl OBJSTORE=sqlite
- CRYPTO=botan OBJSTORE=file
Expand Down
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ option(BUILD_TESTS "Compile tests along with libraries" OFF)
option(DISABLE_NON_PAGED_MEMORY "Disable non-paged memory for secure storage" OFF)
option(DISABLE_VISIBILITY "Disables and unsets -fvisibility=hidden" OFF)
option(ENABLE_64bit "Enable 64-bit compiling" OFF)
option(ENABLE_ECC "Enable support for ECC" OFF)
option(ENABLE_EDDSA "Enable support for EDDSA" OFF)
option(ENABLE_ECC "Enable support for ECC" ON)
option(ENABLE_EDDSA "Enable support for EDDSA" ON)
option(ENABLE_GOST "Enable support for GOST" OFF)
option(ENABLE_FIPS "Enable support for FIPS 140-2 mode" OFF)
option(ENABLE_P11_KIT "Enable p11-kit integration" ON)
Expand Down Expand Up @@ -58,7 +58,7 @@ set(DEFAULT_TOKENDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/softhsm/tokens/"
CACHE STRING "The default location of the token directory")
set(DEFAULT_UMASK "0077"
CACHE STRING "The default file mode creation mask")

set(MAX_PIN_LEN 255 CACHE STRING "Maximum PIN length")
set(MIN_PIN_LEN 4 CACHE STRING "Minimum PIN length")

Expand Down Expand Up @@ -134,11 +134,6 @@ if(ENABLE_P11_KIT)
)
endif(ENABLE_P11_KIT)

#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()

# Packaging
set(CPACK_PACKAGE_NAME ${PACKAGE_NAME})
set(CPACK_PACKAGE_VENDOR "OpenDNSSEC")
Expand Down
2 changes: 1 addition & 1 deletion config.h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ int setenv(const char *name, const char *value, int overwrite);

// #pragma warning(disable: 4996)

#endif
#endif
28 changes: 12 additions & 16 deletions modules/CompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,8 @@ if(WITH_SQLITE3)
message(STATUS "SQLite3: Includes: ${SQLITE3_INCLUDES}")
message(STATUS "SQLite3: Libs: ${SQLITE3_LIBS}")

set(HAVE_SQLITE3_H 1)
#check_include_files(sqlite3.h HAVE_SQLITE3_H)
#check_library_exists(sqlite3 sqlite3_prepare_v2 "" HAVE_LIBSQLITE3)
#find_program(SQLITE3_COMMAND NAMES sqlite3)
#if(SQLITE3_COMMAND MATCHES "-NOTFOUND")
# message(FATAL_ERROR "SQLite3: Command was not found")
#endif(SQLITE3_COMMAND MATCHES "-NOTFOUND")
check_include_files(sqlite3.h HAVE_SQLITE3_H)
check_library_exists(sqlite3 sqlite3_prepare_v2 "" HAVE_LIBSQLITE3)
else(WITH_SQLITE3)
message(STATUS "Not including SQLite3 in build")
endif(WITH_SQLITE3)
Expand Down Expand Up @@ -486,17 +481,18 @@ else(ENABLE_P11_KIT)
endif(ENABLE_P11_KIT)

if(BUILD_TESTS)
# Find CppUnit (equivalent of acx_cppunit.m4)
set(CppUnit_FIND_QUIETLY OFF)

# Find CppUnit (equivalent of acx_cppunit.m4)
include(FindCppUnit)

if(NOT CppUnit_FOUND)
message(FATAL_ERROR "Failed to find CppUnit, try to set the path to CppUnit root folder in the system variable CPPUNIT_INCLUDE_DIR and library path in CPPUNIT_LIBRARY!")
else()
message(STATUS "CppUnit tests enabled.")
endif(NOT CppUnit_FOUND)

if(NOT CPPUNIT_FOUND)
message(FATAL_ERROR "Failed to find CppUnit!")
endif(NOT CPPUNIT_FOUND)

set(CPPUNIT_INCLUDES ${CPPUNIT_INCLUDE_DIR})
set(CPPUNIT_LIBS ${CPPUNIT_LIBRARY})
set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARIES})
message(STATUS "CppUnit: Includes: ${CPPUNIT_INCLUDES}")
message(STATUS "CppUnit: Libs: ${CPPUNIT_LIBS}")
else(BUILD_TESTS)
message(STATUS "Not building tests")
endif(BUILD_TESTS)
Expand Down
98 changes: 68 additions & 30 deletions modules/FindCppUnit.cmake
Original file line number Diff line number Diff line change
@@ -1,38 +1,76 @@
# - try to find cppunit library
#
# http://root.cern.ch/viewvc/trunk/cint/reflex/cmake/modules/FindCppUnit.cmake
# Cache Variables: (probably not for direct use in your scripts)
# CPPUNIT_INCLUDE_DIR
# CPPUNIT_LIBRARY
#
# - Find CppUnit
# This module finds an installed CppUnit package.
# Non-cache variables you might use in your CMakeLists.txt:
# CPPUNIT_FOUND
# CPPUNIT_INCLUDE_DIRS
# CPPUNIT_LIBRARIES
#
# It sets the following variables:
# CPPUNIT_FOUND - Set to false, or undefined, if CppUnit isn't found.
# CPPUNIT_INCLUDE_DIR - The CppUnit include directory.
# CPPUNIT_LIBRARY - The CppUnit library to link against.
# Requires these CMake modules:
# SelectLibraryConfigurations (included with CMake >= 2.8.0)
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2009-2011 Ryan Pavlik <[email protected]> <[email protected]>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright 2009-2011, Iowa State University
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0

find_package(CppUnit CONFIG)
set(CPPUNIT_ROOT_DIR
"${CPPUNIT_ROOT_DIR}"
CACHE
PATH
"Directory to search")

if(NOT CPPUNIT_FOUND)
pkg_check_modules(cppunit CPPUNIT_FOUND)
endif()
find_library(CPPUNIT_LIBRARY_RELEASE
NAMES
cppunit
HINTS
"${CPPUNIT_ROOT_DIR}")

find_library(CPPUNIT_LIBRARY_DEBUG
NAMES
cppunitd
HINTS
"${CPPUNIT_ROOT_DIR}")

include(SelectLibraryConfigurations)
select_library_configurations(CPPUNIT)

if(NOT CPPUNIT_FOUND)
FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h)
FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit)

IF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)
SET(CPPUNIT_FOUND TRUE)
ENDIF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)

IF (CPPUNIT_FOUND)
# show which CppUnit was found only if not quiet
IF (NOT CppUnit_FIND_QUIETLY)
MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
ENDIF (NOT CppUnit_FIND_QUIETLY)
ELSE (CPPUNIT_FOUND)
# fatal error if CppUnit is required but not found
IF (CppUnit_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find CppUnit")
ENDIF (CppUnit_FIND_REQUIRED)
ENDIF (CPPUNIT_FOUND)
# Might want to look close to the library first for the includes.
get_filename_component(_libdir "${CPPUNIT_LIBRARY_RELEASE}" PATH)

find_path(CPPUNIT_INCLUDE_DIR
NAMES
cppunit/TestCase.h
HINTS
"${_libdir}/.."
PATHS
"${CPPUNIT_ROOT_DIR}"
PATH_SUFFIXES
include/)


include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(cppunit
DEFAULT_MSG
CPPUNIT_LIBRARY
CPPUNIT_INCLUDE_DIR)

if(CPPUNIT_FOUND)
set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS})
set(CPPUNIT_INCLUDE_DIRS "${CPPUNIT_INCLUDE_DIR}")
mark_as_advanced(CPPUNIT_ROOT_DIR)
endif()

mark_as_advanced(CPPUNIT_INCLUDE_DIR
CPPUNIT_LIBRARY_RELEASE
CPPUNIT_LIBRARY_DEBUG)
2 changes: 1 addition & 1 deletion src/bin/dump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target_compile_options(${PROJECT_NAME}-file PRIVATE ${COMPILE_OPTIONS})

if(WITH_OBJECTSTORE_BACKEND_DB)
add_executable(${PROJECT_NAME}-db softhsm2-dump-db.cpp)
target_compile_options(${PROJECT_NAME}-db PRIVATE ${COMPILE_OPTIONS})
target_compile_options(${PROJECT_NAME}-db PRIVATE ${COMPILE_OPTIONS})
target_link_libraries(${PROJECT_NAME}-db ${SQLITE3_LIBS} ${YIELD_LIB})
list(APPEND INSTALL_TARGETS ${PROJECT_NAME}-db)
list(APPEND INSTALL_MAN_FILES ${PROJECT_NAME}-db.1)
Expand Down
6 changes: 3 additions & 3 deletions src/bin/keyconv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if(WITH_BOTAN)
endif(WITH_BOTAN)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${PROJECT_SOURCE_DIR}/../win32/getopt.cpp)
list(APPEND CRYPTO_LIBS "Ws2_32.lib;Crypt32.lib")
list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${PROJECT_SOURCE_DIR}/../win32/getopt.cpp)
list(APPEND CRYPTO_LIBS "Ws2_32.lib;Crypt32.lib")
endif()

include_directories(${INCLUDE_DIRS})
Expand Down
11 changes: 5 additions & 6 deletions src/bin/migrate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ if(BUILD_MIGRATE)
${PROJECT_SOURCE_DIR}/../common/library.cpp
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/../../lib/win32
${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../win32/getopt.cpp)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/../../lib/win32 ${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../win32/getopt.cpp)
endif()

include_directories(${INCLUDE_DIRS})
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${SQLITE3_LIBS} ${YIELD_LIB} ${CMAKE_DL_LIBS})
target_compile_options(${PROJECT_NAME} PRIVATE ${COMPILE_OPTIONS})
target_compile_options(${PROJECT_NAME} PRIVATE ${COMPILE_OPTIONS})

install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down
5 changes: 2 additions & 3 deletions src/bin/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ if(WITH_BOTAN)
endif(WITH_BOTAN)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/../../lib/win32
${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../win32/getopt.cpp)
list(APPEND INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/../../lib/win32 ${CMAKE_CURRENT_SOURCE_DIR}/../win32)
list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../win32/getopt.cpp)
endif()

include_directories(${INCLUDE_DIRS})
Expand Down
29 changes: 19 additions & 10 deletions src/lib/SoftHSM.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 NLnet Labs
* Copyright (c) 2010 SURFnet bv
* Copyright (c) 2010 .SE (The Internet Infrastructure Foundation)
* All rights reserved.
Expand Down Expand Up @@ -861,7 +862,6 @@ void SoftHSM::prepareSupportedMecahnisms(std::map<std::string, CK_MECHANISM_TYPE
}
catch (const std::out_of_range& e)
{
(e);
WARNING_MSG("Unknown mechanism provided: %s", token.c_str());
}
prev = pos + 1;
Expand Down Expand Up @@ -1124,17 +1124,20 @@ CK_RV SoftHSM::C_GetMechanismInfo(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_
break;
#ifndef WITH_FIPS
case CKM_DES_CBC_PAD:
/* FALLTHROUGH */
#endif
case CKM_DES3_CBC_PAD:
pInfo->flags = CKF_WRAP | CKF_UNWRAP;
// falls through
/* FALLTHROUGH */
#ifndef WITH_FIPS
case CKM_DES_ECB:
/* FALLTHROUGH */
case CKM_DES_CBC:
/* FALLTHROUGH */
#endif
case CKM_DES3_CBC:
pInfo->flags |= CKF_WRAP;
// falls through
/* FALLTHROUGH */
case CKM_DES3_ECB:
// Key size is not in use
pInfo->ulMinKeySize = 0;
Expand All @@ -1154,10 +1157,9 @@ CK_RV SoftHSM::C_GetMechanismInfo(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_
break;
case CKM_AES_CBC_PAD:
pInfo->flags = CKF_UNWRAP | CKF_WRAP;
// falls through
/* FALLTHROUGH */
case CKM_AES_CBC:
pInfo->flags |= CKF_WRAP;
// falls through
case CKM_AES_ECB:
case CKM_AES_CTR:
case CKM_AES_GCM:
Expand Down Expand Up @@ -2347,7 +2349,8 @@ CK_RV SoftHSM::SymEncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMech
iv.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen);
memcpy(&iv[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pIv, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen);
aad.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
memcpy(&aad[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pAAD, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
if (CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen > 0)
memcpy(&aad[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pAAD, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
tagBytes = CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulTagBits;
if (tagBytes > 128 || tagBytes % 8 != 0)
{
Expand Down Expand Up @@ -3067,7 +3070,8 @@ CK_RV SoftHSM::SymDecryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMech
iv.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen);
memcpy(&iv[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pIv, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen);
aad.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
memcpy(&aad[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pAAD, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
if (CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen > 0)
memcpy(&aad[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pAAD, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen);
tagBytes = CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulTagBits;
if (tagBytes > 128 || tagBytes % 8 != 0)
{
Expand Down Expand Up @@ -7121,8 +7125,10 @@ CK_RV SoftHSM::C_UnwrapKey
{
OSObject* osobject = (OSObject*)handleManager->getObject(*hKey);
if (osobject == NULL_PTR || !osobject->isValid())
{
rv = CKR_FUNCTION_FAILED;
if (osobject->startTransaction())
}
else if (osobject->startTransaction())
{
bool bOK = true;

Expand Down Expand Up @@ -7780,9 +7786,12 @@ CK_RV SoftHSM::generateAES
if (rv == CKR_OK)
{
OSObject* osobject = (OSObject*)handleManager->getObject(*phKey);
if (osobject == NULL_PTR || !osobject->isValid()) {
if (osobject == NULL_PTR || !osobject->isValid())
{
rv = CKR_FUNCTION_FAILED;
} else if (osobject->startTransaction()) {
}
else if (osobject->startTransaction())
{
bool bOK = true;

// Common Attributes
Expand Down
Loading

0 comments on commit c97d646

Please sign in to comment.