Skip to content

Commit

Permalink
Removed openssl code from 'detail' header, added it to public usage b…
Browse files Browse the repository at this point in the history
…ased on used crypto provider

Signed-off-by: AssemblyJohn <[email protected]>
  • Loading branch information
AssemblyJohn committed Aug 5, 2024
1 parent d1f9a77 commit aa5fb1f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ option(LIBEVSE_SECURITY_USE_BOOST_FILESYSTEM "Usage of boost/filesystem.hpp inst
option(LIBEVSE_CRYPTO_SUPPLIER_OPENSSL "Default OpenSSL cryptography supplier" ON)

# dependencies
find_package(OpenSSL 3 REQUIRED)
if (LIBEVSE_CRYPTO_SUPPLIER_OPENSSL)
find_package(OpenSSL 3 REQUIRED)
endif()

add_subdirectory(lib)

Expand Down
10 changes: 8 additions & 2 deletions lib/evse_security/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ target_sources(evse_security

crypto/interface/crypto_supplier.cpp
crypto/interface/crypto_types.cpp
crypto/openssl/openssl_crypto_supplier.cpp
crypto/openssl/openssl_provider.cpp
)

if (LIBEVSE_CRYPTO_SUPPLIER_OPENSSL)
target_sources(evse_security
PRIVATE
crypto/openssl/openssl_crypto_supplier.cpp
crypto/openssl/openssl_provider.cpp
)
endif()

target_include_directories(evse_security
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down
5 changes: 2 additions & 3 deletions lib/evse_security/crypto/openssl/openssl_crypto_supplier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Copyright Pionix GmbH and Contributors to EVerest
#include <evse_security/crypto/openssl/openssl_crypto_supplier.hpp>

#include <evse_security/detail/openssl/openssl_types.hpp>
#include <evse_security/utils/evse_filesystem.hpp>

#include <everest/logging.hpp>

#include <algorithm>
Expand All @@ -23,6 +20,8 @@
#include <openssl/x509v3.h>

#include <evse_security/crypto/openssl/openssl_provider.hpp>
#include <evse_security/crypto/openssl/openssl_types.hpp>
#include <evse_security/utils/evse_filesystem.hpp>

namespace evse_security {

Expand Down

0 comments on commit aa5fb1f

Please sign in to comment.