annotate Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 3720:faa695f433d5

upgraded OpenSSL to 1.1.1d
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Mar 2020 16:42:55 +0100
parents
children c575fb0adf91
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.1.1d)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-1.1.1d.tar.gz")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 SET(OPENSSL_MD5 "3be209000dbc7e1b95bcdf47980a3baa")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 set(FirstRun OFF)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 set(FirstRun ON)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 if (FirstRun)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 file(WRITE ${AUTOGENERATED_DIR}/openssl_cversion.c "
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 #include \"internal/cryptlib.h\"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 unsigned long OpenSSL_version_num(void)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 {
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 return OPENSSL_VERSION_NUMBER;
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 }
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 ")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/bn_conf.h "")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/include/internal/dso_conf.h "")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 # Apply the patches
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 execute_process(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 ${ORTHANC_ROOT}/Resources/Patches/openssl-1.1.1d.patch
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 RESULT_VARIABLE Failure
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 if (Failure)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 message(FATAL_ERROR "Error while patching a file")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 message("The patches for OpenSSL have already been applied")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 add_definitions(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 -DOPENSSL_THREADS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 -DOPENSSL_IA32_SSE2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 -DOPENSSL_NO_ASM
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 -DOPENSSL_NO_DYNAMIC_ENGINE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 -DOPENSSL_NO_BF
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 -DOPENSSL_NO_CAMELLIA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 -DOPENSSL_NO_CAST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 -DOPENSSL_NO_EC_NISTP_64_GCC_128
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 -DOPENSSL_NO_GMP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 -DOPENSSL_NO_GOST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 -DOPENSSL_NO_HW
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 -DOPENSSL_NO_JPAKE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 -DOPENSSL_NO_IDEA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 -DOPENSSL_NO_KRB5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 -DOPENSSL_NO_MD2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 -DOPENSSL_NO_MDC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 #-DOPENSSL_NO_MD4 # MD4 is necessary for MariaDB/MySQL client
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 -DOPENSSL_NO_RC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 -DOPENSSL_NO_RC4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -DOPENSSL_NO_RC5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -DOPENSSL_NO_RFC3779
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 -DOPENSSL_NO_SCTP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 -DOPENSSL_NO_STORE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 -DOPENSSL_NO_SEED
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 -DOPENSSL_NO_WHIRLPOOL
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 -DOPENSSL_NO_RIPEMD
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 -DOPENSSLDIR="/usr/local/ssl"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 # In order for "crypto/mem_sec.c" to compile on LSB
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 add_definitions(-DOPENSSL_NO_SECURE_MEMORY)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 include_directories(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 ${OPENSSL_SOURCES_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 ${OPENSSL_SOURCES_DIR}/crypto/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 ${OPENSSL_SOURCES_DIR}/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 set(OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 ${OPENSSL_SOURCES_DIR}/crypto/aes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 ${OPENSSL_SOURCES_DIR}/crypto/aria
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 ${OPENSSL_SOURCES_DIR}/crypto/async
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 ${OPENSSL_SOURCES_DIR}/crypto/async/arch
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 ${OPENSSL_SOURCES_DIR}/crypto/bio
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 ${OPENSSL_SOURCES_DIR}/crypto/blake2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 ${OPENSSL_SOURCES_DIR}/crypto/bn
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 ${OPENSSL_SOURCES_DIR}/crypto/buffer
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 ${OPENSSL_SOURCES_DIR}/crypto/chacha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 ${OPENSSL_SOURCES_DIR}/crypto/cmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 ${OPENSSL_SOURCES_DIR}/crypto/cms
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 ${OPENSSL_SOURCES_DIR}/crypto/comp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 ${OPENSSL_SOURCES_DIR}/crypto/conf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 ${OPENSSL_SOURCES_DIR}/crypto/ct
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 ${OPENSSL_SOURCES_DIR}/crypto/des
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 ${OPENSSL_SOURCES_DIR}/crypto/dh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 ${OPENSSL_SOURCES_DIR}/crypto/dsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 ${OPENSSL_SOURCES_DIR}/crypto/dso
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 ${OPENSSL_SOURCES_DIR}/crypto/err
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 ${OPENSSL_SOURCES_DIR}/crypto/hmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 ${OPENSSL_SOURCES_DIR}/crypto/kdf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 ${OPENSSL_SOURCES_DIR}/crypto/lhash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 ${OPENSSL_SOURCES_DIR}/crypto/md4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 ${OPENSSL_SOURCES_DIR}/crypto/md5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 ${OPENSSL_SOURCES_DIR}/crypto/objects
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 ${OPENSSL_SOURCES_DIR}/crypto/ocsp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 ${OPENSSL_SOURCES_DIR}/crypto/pem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 ${OPENSSL_SOURCES_DIR}/crypto/poly1305
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ${OPENSSL_SOURCES_DIR}/crypto/pqueue
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ${OPENSSL_SOURCES_DIR}/crypto/rand
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 ${OPENSSL_SOURCES_DIR}/crypto/ripemd
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ${OPENSSL_SOURCES_DIR}/crypto/rsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ${OPENSSL_SOURCES_DIR}/crypto/sha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${OPENSSL_SOURCES_DIR}/crypto/siphash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${OPENSSL_SOURCES_DIR}/crypto/sm2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 ${OPENSSL_SOURCES_DIR}/crypto/sm3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ${OPENSSL_SOURCES_DIR}/crypto/sm4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 ${OPENSSL_SOURCES_DIR}/crypto/srp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 ${OPENSSL_SOURCES_DIR}/crypto/stack
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ${OPENSSL_SOURCES_DIR}/crypto/store
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 ${OPENSSL_SOURCES_DIR}/crypto/ts
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ${OPENSSL_SOURCES_DIR}/crypto/txt_db
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ${OPENSSL_SOURCES_DIR}/crypto/ui
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 ${OPENSSL_SOURCES_DIR}/crypto/x509
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${OPENSSL_SOURCES_DIR}/crypto/x509v3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${OPENSSL_SOURCES_DIR}/ssl
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${OPENSSL_SOURCES_DIR}/ssl/record
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${OPENSSL_SOURCES_DIR}/ssl/statem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 if (ENABLE_OPENSSL_ENGINES)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 # Engines support is not done yet, as Orthanc only needs it for
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 # OpenSSL < 1.1.0
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 #add_definitions(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 # -DENGINESDIR="/usr/local/lib/engines-1.1"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 # )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 #list(APPEND OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 # ${OPENSSL_SOURCES_DIR}/engines
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 # ${OPENSSL_SOURCES_DIR}/crypto/engine
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 # )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 add_definitions(-DOPENSSL_NO_ENGINE)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 add_definitions(-DOPENSSL_NO_ENGINE)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 list(APPEND OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 # EC, ECDH and ECDSA are necessary for PKCS11, and for contacting
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 # HTTPS servers that use TLS certificate encrypted with ECDSA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 # (check the output of a recent version of the "sslscan"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 # command). Until Orthanc <= 1.4.1, these features were only
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 # enabled if ENABLE_PKCS11 support was set to "ON".
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 # https://groups.google.com/d/msg/orthanc-users/2l-bhYIMEWg/oMmK33bYBgAJ
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ${OPENSSL_SOURCES_DIR}/crypto/ecdh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 foreach(d ${OPENSSL_SOURCES_SUBDIRS})
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 endforeach()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 list(APPEND OPENSSL_SOURCES ${AUTOGENERATED_DIR}/openssl_cversion.c)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 list(REMOVE_ITEM OPENSSL_SOURCES
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 ${OPENSSL_SOURCES_DIR}/crypto/cversion.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256_table.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 ${OPENSSL_SOURCES_DIR}/crypto/engine/eng_devcrypto.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 # Check out "${OPENSSL_SOURCES_DIR}/Configurations/README": "this is
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 # default if no option is specified, it works on any supported system"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 set(OPENSSL_DEFINITIONS "THIRTY_TWO_BIT")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 set(OPENSSL_DEFINITIONS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 "${OPENSSL_DEFINITIONS};OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 if (ENABLE_OPENSSL_ENGINES)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 link_libraries(crypt32)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 set_source_files_properties(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 ${OPENSSL_SOURCES}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 PROPERTIES COMPILE_DEFINITIONS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 "${OPENSSL_DEFINITIONS};DSO_NONE;NO_WINDOWS_BRAINDEATH"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 )