summaryrefslogtreecommitdiff
path: root/src/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-10-05 13:05:12 +0200
committerSander Vrijders <sander@ouroboros.rocks>2019-10-05 13:52:26 +0200
commitc8ab23cbce8a209566f317d22e2c554ff621e3c8 (patch)
treed5705905d8cd21eee16a5487ba10bc87b20f4e34 /src/lib/CMakeLists.txt
parentd7db0ac776bdeaff89d13e951e19e9fe28d7bbd1 (diff)
downloadouroboros-c8ab23cbce8a209566f317d22e2c554ff621e3c8.tar.gz
ouroboros-c8ab23cbce8a209566f317d22e2c554ff621e3c8.zip
build: Allow older OpenSSL versions for random
Ubuntu 16 comes with older versions of OpenSSL, glibc and libgcrypt. Ouroboros will now fall back to OpenSSL even if the version is <= 1.1.0. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/CMakeLists.txt')
-rw-r--r--src/lib/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 31a7742b..8dbedcff 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -99,6 +99,7 @@ endif ()
find_package(OpenSSL QUIET)
if (OPENSSL_FOUND)
+ set(HAVE_OPENSSL_RNG TRUE)
if (OPENSSL_VERSION VERSION_LESS "1.1.0")
message(STATUS "Install version >= \"1.1.0\" to enable OpenSSL support "
"(found version \"${OPENSSL_VERSION}\")")
@@ -114,7 +115,7 @@ if (OPENSSL_FOUND)
endif ()
endif ()
-if (NOT HAVE_OPENSSL)
+if (NOT HAVE_OPENSSL_RNG)
set(OPENSSL_INCLUDE_DIR "")
set(OPENSSL_LIBRARIES "")
endif ()
@@ -133,7 +134,7 @@ else ()
endif()
if (NOT ((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR APPLE OR
- HAVE_SYS_RANDOM OR HAVE_OPENSSL OR HAVE_LIBGCRYPT))
+ HAVE_SYS_RANDOM OR HAVE_OPENSSL_RNG OR HAVE_LIBGCRYPT))
message(FATAL_ERROR "No secure random generator found, "
"please install libgcrypt (> 1.7.0) or OpenSSL")
endif ()