Replace LibreSSL with wolfSSL
Using wolfSSL has multiple benefits over LibreSSL: - Better license (GPL) - Small binary size - Faster compile time - No need for extra setup after cloning
This commit is contained in:
parent
7fb5eaf527
commit
9290c74908
6 changed files with 22 additions and 24 deletions
7
.gitmodules
vendored
7
.gitmodules
vendored
|
|
@ -1,10 +1,9 @@
|
|||
[submodule "extern/libvncserver"]
|
||||
path = extern/libvncserver
|
||||
url = ../../gujjwal00/libvncserver.git
|
||||
[submodule "extern/libressl"]
|
||||
path = extern/libressl
|
||||
url = ../../libressl-portable/portable.git
|
||||
ignore = untracked # Ignore temporary files created by LibreSSL build
|
||||
[submodule "extern/libjpeg-turbo"]
|
||||
path = extern/libjpeg-turbo
|
||||
url = ../../libjpeg-turbo/libjpeg-turbo
|
||||
[submodule "extern/wolfssl"]
|
||||
path = extern/wolfssl
|
||||
url = ../../wolfSSL/wolfssl.git
|
||||
|
|
|
|||
|
|
@ -19,14 +19,6 @@ macro(avnc_check_submodule name)
|
|||
endif ()
|
||||
endmacro()
|
||||
|
||||
# Make sure libressl-portable is initialized
|
||||
macro(avnc_check_libressl)
|
||||
if (NOT EXISTS "${AVNC_EXTERN_DIR}/libressl/VERSION")
|
||||
message(FATAL_ERROR "libressl is not initialized properly.
|
||||
Please run './autogen.sh' in 'libressl' submodule.")
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
|
||||
# Requred to enable SIMD support on ARM
|
||||
if (CMAKE_ANDROID_ARCH STREQUAL "arm64")
|
||||
|
|
@ -58,20 +50,27 @@ endif ()
|
|||
# SSL
|
||||
###############################################################################
|
||||
if (AVNC_BUILD_ALL)
|
||||
avnc_check_submodule(libressl)
|
||||
avnc_check_libressl()
|
||||
avnc_check_submodule(wolfssl)
|
||||
|
||||
set(AVNC_LIBSSL_SRC_DIR ${AVNC_EXTERN_DIR}/libressl)
|
||||
set(AVNC_LIBSSL_BUILD_DIR ${CMAKE_BINARY_DIR}/libressl)
|
||||
set(AVNC_LIBSSL_SRC_DIR ${AVNC_EXTERN_DIR}/wolfssl)
|
||||
set(AVNC_LIBSSL_BUILD_DIR ${CMAKE_BINARY_DIR}/wolfssl)
|
||||
|
||||
# CMake support in wolfSSl is still under development, so we have to
|
||||
# manully set some flags to enable OpenSSL compatibility layer
|
||||
set(WOLFSSL_CRL yes)
|
||||
set(WOLFSSL_DES3 yes)
|
||||
add_definitions(-DOPENSSL_ALL -DOPENSSL_EXTRA -DHAVE_CRL -DHAVE_EX_DATA
|
||||
-DHAVE_ANON -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB -DWOLFSSL_DES_ECB
|
||||
-DWC_NO_HARDEN)
|
||||
|
||||
add_subdirectory(${AVNC_LIBSSL_SRC_DIR} ${AVNC_LIBSSL_BUILD_DIR})
|
||||
|
||||
# Set these variables so FindOpenSSL can find the library
|
||||
set(OPENSSL_SSL_LIBRARY ${AVNC_LIBSSL_BUILD_DIR}/ssl/libssl.a)
|
||||
set(OPENSSL_CRYPTO_LIBRARY ${AVNC_LIBSSL_BUILD_DIR}/crypto/libcrypto.a)
|
||||
set(OPENSSL_INCLUDE_DIR ${AVNC_LIBSSL_BUILD_DIR}/include)
|
||||
set(OPENSSL_SSL_LIBRARY ${AVNC_LIBSSL_BUILD_DIR}/libwolfssl.a)
|
||||
set(OPENSSL_CRYPTO_LIBRARY ${AVNC_LIBSSL_BUILD_DIR}/libwolfssl.a)
|
||||
set(OPENSSL_INCLUDE_DIR ${AVNC_LIBSSL_SRC_DIR}/wolfssl)
|
||||
|
||||
include_directories(${AVNC_LIBSSL_SRC_DIR}/include)
|
||||
include_directories(${AVNC_LIBSSL_SRC_DIR})
|
||||
endif ()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ android {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DAVNC_BUILD_ALL=ON'
|
||||
targets 'turbojpeg-static', 'ssl', 'crypto'
|
||||
targets 'turbojpeg-static', 'wolfssl'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ android {
|
|||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DAVNC_BUILD_ALL=ON'
|
||||
targets 'turbojpeg-static', 'ssl', 'crypto'
|
||||
targets 'turbojpeg-static', 'wolfssl'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1
extern/libressl
vendored
1
extern/libressl
vendored
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 6f38fb483cf0bf0f4112b23d9971aa51917e1910
|
||||
2
extern/libvncserver
vendored
2
extern/libvncserver
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 63a9ab673c6e4a295053eeafee8a5b14c019d2c3
|
||||
Subproject commit 8368b48f7e48b50b72037b8245d52c8e2aa9e006
|
||||
1
extern/wolfssl
vendored
Submodule
1
extern/wolfssl
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8f7e09d9b54fc2919e5464bb1a52a79a84ab310a
|
||||
Loading…
Add table
Reference in a new issue