Mercurial > hg > orthanc
comparison Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 3817:37e20bbf25f5
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 08 Apr 2020 14:50:06 +0200 |
parents | cdb429340112 |
children | 35065dd39cc8 |
comparison
equal
deleted
inserted
replaced
3816:09f091b6b569 | 3817:37e20bbf25f5 |
---|---|
1 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.1.1d) | 1 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.1.1f) |
2 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-1.1.1d.tar.gz") | 2 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-1.1.1f.tar.gz") |
3 SET(OPENSSL_MD5 "3be209000dbc7e1b95bcdf47980a3baa") | 3 SET(OPENSSL_MD5 "3f486f2f4435ef14b81814dbbc7b48bb") |
4 | 4 |
5 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}") | 5 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}") |
6 set(FirstRun OFF) | 6 set(FirstRun OFF) |
7 else() | 7 else() |
8 set(FirstRun ON) | 8 set(FirstRun ON) |
14 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h " | 14 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h " |
15 #define DATE \"\" | 15 #define DATE \"\" |
16 #define PLATFORM \"\" | 16 #define PLATFORM \"\" |
17 #define compiler_flags \"\" | 17 #define compiler_flags \"\" |
18 ") | 18 ") |
19 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/bn_conf.h "") | 19 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/bn_conf.h "") |
20 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/dso_conf.h "") | 20 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/dso_conf.h "") |
21 | 21 |
22 configure_file( | 22 configure_file( |
23 ${ORTHANC_ROOT}/Resources/Patches/openssl-1.1.1d-conf.h.in | 23 ${ORTHANC_ROOT}/Resources/Patches/openssl-1.1.1-conf.h.in |
24 ${OPENSSL_SOURCES_DIR}/include/openssl/opensslconf.h | 24 ${OPENSSL_SOURCES_DIR}/include/openssl/opensslconf.h |
25 ) | 25 ) |
26 | 26 |
27 # Apply the patches | 27 # Apply the patches |
28 execute_process( | 28 execute_process( |
29 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i | 29 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i |
30 ${ORTHANC_ROOT}/Resources/Patches/openssl-1.1.1d.patch | 30 ${ORTHANC_ROOT}/Resources/Patches/openssl-1.1.1f.patch |
31 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | 31 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
32 RESULT_VARIABLE Failure | 32 RESULT_VARIABLE Failure |
33 ) | 33 ) |
34 | 34 |
35 if (Failure) | 35 if (Failure) |
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 | |
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 | |
242 ) | |
243 | |
244 else() | |
245 # Fixes error "OpenSSL error: error:2406C06E:random number | |
246 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was | |
247 # present in Orthanc 1.6.0, if statically linking on Ubuntu 18.04 | |
248 add_definitions( | |
249 -DOPENSSL_RAND_SEED_OS | |
237 ) | 250 ) |
238 endif() | 251 endif() |
239 | 252 |
240 | 253 |
241 set_source_files_properties( | 254 set_source_files_properties( |