1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 01:19:52 +03:00

Compare commits

...

5 Commits

Author SHA1 Message Date
siddharth-narayan
73c6bc2fa8
Merge ed82884202 into c76f11a523 2024-07-05 20:50:37 -04:00
Siddharth
ed82884202 Move duplicated code to one place 2024-07-05 20:50:28 -04:00
Ilya Shipitsin
c76f11a523
Merge pull request #2026 from siddharth-narayan/fedora-fix-engine
Fix openssl engine support on Fedora Rawhide
2024-07-04 19:26:11 +02:00
siddharth-narayan
25585a1e3d
Guard engine.h include 2024-07-04 13:05:30 -04:00
siddharth-narayan
4370efcc90
replace openssl-devel with openssl-devel-engine 2024-07-04 13:02:16 -04:00
3 changed files with 16 additions and 34 deletions

View File

@ -25,7 +25,7 @@ jobs:
submodules: true
- name: Install dependencies
run: |
dnf -y install git cmake ncurses-devel openssl-devel libsodium-devel readline-devel zlib-devel gcc-c++ clang
dnf -y install git cmake ncurses-devel openssl-devel-engine libsodium-devel readline-devel zlib-devel gcc-c++ clang
- name: Compile with ${{ matrix.cc }}
run: |
export CC=${{ matrix.cc }}

View File

@ -19,7 +19,19 @@ set_target_properties(mayaqua
find_package(OpenSSL REQUIRED)
if(OPENSSL_VERSION VERSION_LESS "3") # Disable oqsprovider when OpenSSL version < 3
set(SKIP_OQS_PROVIDER ON)
add_definitions(-DSKIP_OQS_PROVIDER)
else()
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
add_subdirectory(3rdparty/liboqs)
add_subdirectory(3rdparty/oqs-provider)
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(mayaqua PRIVATE oqsprovider)
endif()
include(CheckSymbolExists)
@ -78,22 +90,6 @@ if(WIN32)
"ws2_32.lib"
"WtsApi32.Lib"
)
if (SKIP_OQS_PROVIDER)
add_definitions(-DSKIP_OQS_PROVIDER)
else()
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
add_subdirectory(3rdparty/liboqs)
add_subdirectory(3rdparty/oqs-provider)
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(mayaqua PRIVATE oqsprovider)
endif()
endif()
if(UNIX)
@ -112,22 +108,6 @@ if(UNIX)
$<$<BOOL:${LIB_M}>:${LIB_M}>
$<$<BOOL:${LIB_RT}>:${LIB_RT}>
)
if (SKIP_OQS_PROVIDER)
add_definitions(-DSKIP_OQS_PROVIDER)
else()
set(OQS_BUILD_ONLY_LIB ON CACHE BOOL "Set liboqs to build only the library (no tests)")
set(BUILD_TESTING OFF CACHE BOOL "By setting this to OFF, no tests or examples will be compiled.")
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
add_subdirectory(3rdparty/liboqs)
add_subdirectory(3rdparty/oqs-provider)
target_include_directories(oqsprovider PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/3rdparty/liboqs/include)
set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(mayaqua PRIVATE oqsprovider)
endif()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7l|aarch64|s390x)$" OR NOT HAVE_SYS_AUXV OR SKIP_CPU_FEATURES)
add_definitions(-DSKIP_CPU_FEATURES)

View File

@ -20,7 +20,9 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/pkcs7.h>