Skip to content

Commit

Permalink
Merge pull request #2 from txtsd/openssl3
Browse files Browse the repository at this point in the history
  • Loading branch information
txtsd authored Mar 6, 2023
2 parents c7661ab + ebdca23 commit 2585443
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7,998 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
build
cmake-build-*
Makefile
cmake_install.cmake
install_manifest.txt
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cpp-httplib"]
path = cpp-httplib
url = git@github.com:yhirose/cpp-httplib.git
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Set the minimum version of CMake that can be used
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.18)

set(CMAKE_CXX_STANDARD 14)
cmake_policy(SET CMP0065 NEW)

if (STATIC_BINARY)
message("Building static portable binary with small size")
message(STATUS "Building static portable binary with small size")
endif ()


Expand All @@ -14,7 +14,6 @@ project(DPITunnel-cli)

# Add dependencies
add_subdirectory(RawSocket)
add_subdirectory(cpp-httplib)
add_subdirectory(dnslib)
add_subdirectory(libnl)

Expand Down Expand Up @@ -44,7 +43,6 @@ target_include_directories(DPITunnel-cli-exec
PRIVATE
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/RawSocket/include
${PROJECT_SOURCE_DIR}/cpp-httplib/include
${PROJECT_SOURCE_DIR}/dnslib/include
${PROJECT_SOURCE_DIR}/libnl/include
)
Expand All @@ -55,11 +53,18 @@ find_package(Threads REQUIRED)
if (STATIC_BINARY)
set(OPENSSL_USE_STATIC_LIBS TRUE)
endif ()
find_package(OpenSSL REQUIRED)
find_package(OpenSSL REQUIRED COMPONENTS SSL Crypto)

# Add httplib (cpp-httplib)
find_package(httplib 0.12.0 COMPONENTS OpenSSL ZLIB Brotli)
if (NOT HTTPLIB_FOUND)
add_subdirectory(cpp-httplib)
message(STATUS "Using bundled httplib")
endif()

target_link_libraries(DPITunnel-cli-exec
RawSocket
cpp-httplib
httplib::httplib
dnslib
libnl
Threads::Threads
Expand Down
1 change: 0 additions & 1 deletion autoconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ int run_autoconf() {
SSL_library_init();
OpenSSL_add_all_algorithms();
SSL_load_error_strings();
ERR_load_BIO_strings();
ERR_load_crypto_strings();

store = gen_x509_store();
Expand Down
1 change: 1 addition & 0 deletions cpp-httplib
Submodule cpp-httplib added at 7b6999
9 changes: 0 additions & 9 deletions cpp-httplib/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 2585443

Please sign in to comment.