diff --git a/SymCryptEngine/dynamic/CMakeLists.txt b/SymCryptEngine/dynamic/CMakeLists.txt index ad43a0e..1a6392d 100644 --- a/SymCryptEngine/dynamic/CMakeLists.txt +++ b/SymCryptEngine/dynamic/CMakeLists.txt @@ -12,6 +12,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -Wall -Wextra -Wno-unused-par find_package(OpenSSL REQUIRED) include_directories(${OPENSSL_INCLUDE_DIR}) +find_library(SYMCRYPT_LIBRARY symcrypt) + add_library(scossl_dynamic SHARED ../src/scossl.c ../src/scossl_ciphers.c @@ -39,7 +41,7 @@ set_target_properties(scossl_dynamic PROPERTIES PREFIX "") set_target_properties(scossl_dynamic PROPERTIES OUTPUT_NAME "symcryptengine") target_link_directories(scossl_dynamic PUBLIC ${CMAKE_SOURCE_DIR}) -target_link_libraries(scossl_dynamic PUBLIC symcrypt) +target_link_libraries(scossl_dynamic PUBLIC ${SYMCRYPT_LIBRARY}) target_link_libraries(scossl_dynamic PUBLIC ${OPENSSL_CRYPTO_LIBRARY}) # Install the engine to the OpenSSL engines directory diff --git a/SymCryptEngine/src/scossl.c b/SymCryptEngine/src/scossl.c index 3de1a98..00c1f3c 100644 --- a/SymCryptEngine/src/scossl.c +++ b/SymCryptEngine/src/scossl.c @@ -56,7 +56,7 @@ static SCOSSL_STATUS scossl_bind_engine(ENGINE* e) if( !scossl_module_initialized ) { - SymCryptModuleInit(SYMCRYPT_CODE_VERSION_API, SYMCRYPT_CODE_VERSION_MINOR, SYMCRYPT_CODE_VERSION_PATCH); + SYMCRYPT_MODULE_INIT(); scossl_module_initialized = 1; } diff --git a/SymCryptEngine/src/scossl_helpers.c b/SymCryptEngine/src/scossl_helpers.c index c07158d..ba984f1 100644 --- a/SymCryptEngine/src/scossl_helpers.c +++ b/SymCryptEngine/src/scossl_helpers.c @@ -316,9 +316,6 @@ void _scossl_log_SYMCRYPT_ERROR( case SYMCRYPT_NO_ERROR: scErrorString = "SYMCRYPT_NO_ERROR"; break; - case SYMCRYPT_UNUSED: - scErrorString = "SYMCRYPT_UNUSED"; - break; case SYMCRYPT_WRONG_KEY_SIZE: scErrorString = "SYMCRYPT_WRONG_KEY_SIZE"; break;