comparison Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 3805:cdb429340112

Fix OpenSSL initialization on Linux Standard Base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 02 Apr 2020 16:45:20 +0200
parents e9834343d327
children 35065dd39cc8
comparison
equal deleted inserted replaced
3804:552703b37114 3805:cdb429340112
229 add_definitions( 229 add_definitions(
230 -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c 230 -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c
231 ) 231 )
232 232
233 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") 233 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
234 # In order for "crypto/mem_sec.c" to compile on LSB 234 add_definitions(
235 add_definitions( 235 # In order for "crypto/mem_sec.c" to compile on LSB
236 -DOPENSSL_NO_SECURE_MEMORY 236 -DOPENSSL_NO_SECURE_MEMORY
237 -DOPENSSL_RAND_SEED_OS 237
238 # The "OPENSSL_RAND_SEED_OS" value implies a syscall() to
239 # "__NR_getrandom" (i.e. system call "getentropy(2)") in
240 # "rand_unix.c", which is not available in LSB.
241 -DOPENSSL_RAND_SEED_DEVRANDOM
238 ) 242 )
239 243
240 else() 244 else()
241 # Fixes error "OpenSSL error: error:2406C06E:random number 245 # Fixes error "OpenSSL error: error:2406C06E:random number
242 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was 246 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was