Skip to content

Commit

Permalink
Add makefile and CMakeFiles code to use custom openssl in build (#529)
Browse files Browse the repository at this point in the history
* Add makefile and CMakeFiles code to use custom openssl in build

* APlyy fmt and rebase
  • Loading branch information
reshke authored Aug 31, 2023
1 parent 286802c commit abf4e36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ find_package(PostgreSQL REQUIRED)
set(od_libraries ${od_libraries} ${POSTGRESQL_LIBRARY} ${POSTGRESQL_LIBPGPORT} ${PQ_LIBRARY})
include_directories(${POSTGRESQL_INCLUDE_DIR})

set(OPENSSL_INCLUDE_DIR $ENV{OPENSSL_INCLUDE_DIR})
set(OPENSSL_LIBRARIES $ENV{OPENSSL_LIBRARIES})
set(OPENSSL_VERSION $ENV{OPENSSL_VERSION})

# use BoringSSL or OpenSSL
option(USE_BORINGSSL "Use BoringSSL" OFF)
if (USE_BORINGSSL)
Expand All @@ -103,6 +107,10 @@ elseif ("${OPENSSL_LIBRARIES}" STREQUAL "")
set(od_ssl ${OPENSSL_LIBRARIES})
include_directories(${OPENSSL_INCLUDE_DIR})
add_definitions(-DUSE_SSL)
else ()
set(od_ssl ${OPENSSL_LIBRARIES})
include_directories(${OPENSSL_INCLUDE_DIR})
add_definitions(-DUSE_SSL)
endif ()

# use PAM
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ clean:
rm -fr $(BUILD_TEST_ASAN_DIR)

local_build: clean
$(CMAKE_BIN) -S $(ODY_DIR) -B$(BUILD_TEST_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(CMAKE_FLAGS)
make -C$(BUILD_TEST_DIR) -j$(COMPILE_CONCURRENCY)
+$(CMAKE_BIN) -S $(ODY_DIR) -B$(BUILD_TEST_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(CMAKE_FLAGS)
+make -C$(BUILD_TEST_DIR) -j$(COMPILE_CONCURRENCY)

local_run:
$(BUILD_TEST_DIR)/sources/odyssey $(DEV_CONF)
Expand Down
2 changes: 1 addition & 1 deletion sources/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static inline int od_auth_frontend_scram_sha_256(od_client_t *client)
{
od_instance_t *instance = client->global->instance;
char *mechanisms[2] = { "SCRAM-SHA-256", "SCRAM-SHA-256-PLUS" };

/* request AuthenticationSASL */
machine_msg_t *msg;

Expand Down

0 comments on commit abf4e36

Please sign in to comment.