annotate OrthancFramework/Resources/CMake/OpenSslConfigurationStatic-1.1.1.cmake @ 4634:9a9118406484

author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 21 Apr 2021 10:44:49 +0200
parents d9473bd5ed43
children 0524d6e93672
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
3 # Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4368
diff changeset
4 # Copyright (C) 2017-2021 Osimis S.A., Belgium
4120
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
5 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
6 # This program is free software: you can redistribute it and/or
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
7 # modify it under the terms of the GNU Lesser General Public License
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
8 # as published by the Free Software Foundation, either version 3 of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
9 # the License, or (at your option) any later version.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
10 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
11 # This program is distributed in the hope that it will be useful, but
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
14 # Lesser General Public License for more details.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
15 #
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
16 # You should have received a copy of the GNU Lesser General Public
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
17 # License along with this program. If not, see
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
18 # <http://www.gnu.org/licenses/>.
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
19
304842a0d152 adding missing license headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
20
3890
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
21 SET(OPENSSL_SOURCES_DIR ${CMAKE_BINARY_DIR}/openssl-1.1.1g)
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
22 SET(OPENSSL_URL "http://orthanc.osimis.io/ThirdPartyDownloads/openssl-1.1.1g.tar.gz")
35065dd39cc8 upgrade to openssl 1.1.1g
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3805
diff changeset
23 SET(OPENSSL_MD5 "76766e98997660138cdaf13a187bd234")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 if (IS_DIRECTORY "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(FirstRun OFF)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(FirstRun ON)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 endif()
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 DownloadPackage(${OPENSSL_MD5} ${OPENSSL_URL} "${OPENSSL_SOURCES_DIR}")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 if (FirstRun)
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
34 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/buildinf.h "
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
35 #define DATE \"\"
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
36 #define PLATFORM \"\"
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
37 #define compiler_flags \"\"
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ")
3803
e9834343d327 upgrade to openssl 1.1.1f
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3802
diff changeset
39 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/bn_conf.h "")
e9834343d327 upgrade to openssl 1.1.1f
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3802
diff changeset
40 file(WRITE ${OPENSSL_SOURCES_DIR}/crypto/dso_conf.h "")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
42 configure_file(
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
43 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-1.1.1-conf.h.in
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
44 ${OPENSSL_SOURCES_DIR}/include/openssl/opensslconf.h
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
45 )
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
46
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 # Apply the patches
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 execute_process(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
50 ${CMAKE_CURRENT_LIST_DIR}/../Patches/openssl-1.1.1g.patch
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 RESULT_VARIABLE Failure
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 if (Failure)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 message(FATAL_ERROR "Error while patching a file")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 endif()
4368
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
58
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
59 file(RENAME
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
60 ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
61 ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2_source.h)
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
62
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
63 # The following patch of "e_os2.h" prevents from building OpenSSL
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
64 # as a DLL under Windows. Otherwise, symbols have inconsistent
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
65 # linkage if ${OPENSSL_SOURCES} is used to create a DLL (notably
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
66 # if building an Orthanc plugin such as PostgreSQL or MySQL).
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
67 file(WRITE ${OPENSSL_SOURCES_DIR}/include/openssl/e_os2.h "
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
68 #include \"e_os2_source.h\"
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
69 #if defined(_WIN32)
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
70 # undef OPENSSL_EXPORT
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
71 # undef OPENSSL_IMPORT
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
72 # undef OPENSSL_EXTERN
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
73 # undef OPENSSL_GLOBAL
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
74 # define OPENSSL_EXPORT
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
75 # define OPENSSL_IMPORT
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
76 # define OPENSSL_EXTERN extern
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
77 # define OPENSSL_GLOBAL
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
78 #endif
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
79 ")
781f53eee856 fix OpenSslConfigurationStatic-1.1.1.cmake to generate windows plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4120
diff changeset
80
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 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
83 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 add_definitions(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 -DOPENSSL_THREADS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 -DOPENSSL_IA32_SSE2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 -DOPENSSL_NO_ASM
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 -DOPENSSL_NO_DYNAMIC_ENGINE
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
90 -DOPENSSL_NO_DEVCRYPTOENG
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 -DOPENSSL_NO_BF
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 -DOPENSSL_NO_CAMELLIA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 -DOPENSSL_NO_CAST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 -DOPENSSL_NO_EC_NISTP_64_GCC_128
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 -DOPENSSL_NO_GMP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 -DOPENSSL_NO_GOST
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 -DOPENSSL_NO_HW
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 -DOPENSSL_NO_JPAKE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 -DOPENSSL_NO_IDEA
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 -DOPENSSL_NO_KRB5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 -DOPENSSL_NO_MD2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 -DOPENSSL_NO_MDC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 #-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
105 -DOPENSSL_NO_RC2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 -DOPENSSL_NO_RC4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 -DOPENSSL_NO_RC5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 -DOPENSSL_NO_RFC3779
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 -DOPENSSL_NO_SCTP
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 -DOPENSSL_NO_STORE
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 -DOPENSSL_NO_SEED
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 -DOPENSSL_NO_WHIRLPOOL
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 -DOPENSSL_NO_RIPEMD
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
114 -DOPENSSL_NO_AFALGENG
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 -DOPENSSLDIR="/usr/local/ssl"
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 include_directories(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 ${OPENSSL_SOURCES_DIR}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 ${OPENSSL_SOURCES_DIR}/crypto/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 ${OPENSSL_SOURCES_DIR}/include
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 set(OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${OPENSSL_SOURCES_DIR}/crypto
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${OPENSSL_SOURCES_DIR}/crypto/aes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 ${OPENSSL_SOURCES_DIR}/crypto/aria
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 ${OPENSSL_SOURCES_DIR}/crypto/asn1
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 ${OPENSSL_SOURCES_DIR}/crypto/async
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 ${OPENSSL_SOURCES_DIR}/crypto/async/arch
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ${OPENSSL_SOURCES_DIR}/crypto/bio
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 ${OPENSSL_SOURCES_DIR}/crypto/blake2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ${OPENSSL_SOURCES_DIR}/crypto/bn
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ${OPENSSL_SOURCES_DIR}/crypto/buffer
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 ${OPENSSL_SOURCES_DIR}/crypto/chacha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${OPENSSL_SOURCES_DIR}/crypto/cmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${OPENSSL_SOURCES_DIR}/crypto/cms
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${OPENSSL_SOURCES_DIR}/crypto/comp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${OPENSSL_SOURCES_DIR}/crypto/conf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${OPENSSL_SOURCES_DIR}/crypto/ct
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${OPENSSL_SOURCES_DIR}/crypto/des
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${OPENSSL_SOURCES_DIR}/crypto/dh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 ${OPENSSL_SOURCES_DIR}/crypto/dsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 ${OPENSSL_SOURCES_DIR}/crypto/dso
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 ${OPENSSL_SOURCES_DIR}/crypto/ec/curve448/arch_32
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${OPENSSL_SOURCES_DIR}/crypto/err
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${OPENSSL_SOURCES_DIR}/crypto/evp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 ${OPENSSL_SOURCES_DIR}/crypto/hmac
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 ${OPENSSL_SOURCES_DIR}/crypto/kdf
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ${OPENSSL_SOURCES_DIR}/crypto/lhash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${OPENSSL_SOURCES_DIR}/crypto/md4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${OPENSSL_SOURCES_DIR}/crypto/md5
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${OPENSSL_SOURCES_DIR}/crypto/modes
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${OPENSSL_SOURCES_DIR}/crypto/objects
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 ${OPENSSL_SOURCES_DIR}/crypto/ocsp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 ${OPENSSL_SOURCES_DIR}/crypto/pem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 ${OPENSSL_SOURCES_DIR}/crypto/pkcs12
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 ${OPENSSL_SOURCES_DIR}/crypto/pkcs7
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ${OPENSSL_SOURCES_DIR}/crypto/poly1305
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 ${OPENSSL_SOURCES_DIR}/crypto/pqueue
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${OPENSSL_SOURCES_DIR}/crypto/rand
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 ${OPENSSL_SOURCES_DIR}/crypto/ripemd
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 ${OPENSSL_SOURCES_DIR}/crypto/rsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 ${OPENSSL_SOURCES_DIR}/crypto/sha
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 ${OPENSSL_SOURCES_DIR}/crypto/siphash
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 ${OPENSSL_SOURCES_DIR}/crypto/sm2
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 ${OPENSSL_SOURCES_DIR}/crypto/sm3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 ${OPENSSL_SOURCES_DIR}/crypto/sm4
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 ${OPENSSL_SOURCES_DIR}/crypto/srp
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 ${OPENSSL_SOURCES_DIR}/crypto/stack
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 ${OPENSSL_SOURCES_DIR}/crypto/store
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 ${OPENSSL_SOURCES_DIR}/crypto/ts
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ${OPENSSL_SOURCES_DIR}/crypto/txt_db
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 ${OPENSSL_SOURCES_DIR}/crypto/ui
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 ${OPENSSL_SOURCES_DIR}/crypto/x509
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 ${OPENSSL_SOURCES_DIR}/crypto/x509v3
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 ${OPENSSL_SOURCES_DIR}/ssl
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 ${OPENSSL_SOURCES_DIR}/ssl/record
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 ${OPENSSL_SOURCES_DIR}/ssl/statem
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 if (ENABLE_OPENSSL_ENGINES)
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
194 add_definitions(
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
195 #-DENGINESDIR="/usr/local/lib/engines-1.1" # On GNU/Linux
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
196 -DENGINESDIR="."
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
197 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
199 list(APPEND OPENSSL_SOURCES_SUBDIRS
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
200 ${OPENSSL_SOURCES_DIR}/engines
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
201 ${OPENSSL_SOURCES_DIR}/crypto/engine
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
202 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 else()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 add_definitions(-DOPENSSL_NO_ENGINE)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 endif()
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 list(APPEND OPENSSL_SOURCES_SUBDIRS
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 # 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
209 # 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
210 # (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
211 # 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
212 # 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
213 # 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
214 ${OPENSSL_SOURCES_DIR}/crypto/ec
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 ${OPENSSL_SOURCES_DIR}/crypto/ecdh
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 ${OPENSSL_SOURCES_DIR}/crypto/ecdsa
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 foreach(d ${OPENSSL_SOURCES_SUBDIRS})
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 AUX_SOURCE_DIRECTORY(${d} OPENSSL_SOURCES)
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 endforeach()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 list(REMOVE_ITEM OPENSSL_SOURCES
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_nyi.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_unix.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_vms.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_win32.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 ${OPENSSL_SOURCES_DIR}/crypto/LPdir_wince.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 ${OPENSSL_SOURCES_DIR}/crypto/aes/aes_x86core.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 ${OPENSSL_SOURCES_DIR}/crypto/armcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 ${OPENSSL_SOURCES_DIR}/crypto/bio/bss_dgram.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 ${OPENSSL_SOURCES_DIR}/crypto/des/ncbc_enc.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 ${OPENSSL_SOURCES_DIR}/crypto/ec/ecp_nistz256.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 ${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
236 ${OPENSSL_SOURCES_DIR}/crypto/engine/eng_devcrypto.c
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
237 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_base2_44.c # Cannot be compiled with MinGW
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
238 ${OPENSSL_SOURCES_DIR}/crypto/poly1305/poly1305_ieee754.c # Cannot be compiled with MinGW
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 ${OPENSSL_SOURCES_DIR}/crypto/ppccap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 ${OPENSSL_SOURCES_DIR}/crypto/s390xcap.c
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 ${OPENSSL_SOURCES_DIR}/crypto/sparcv9cap.c
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
242 ${OPENSSL_SOURCES_DIR}/engines/e_afalg.c # Cannot be compiled with MinGW
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243 )
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
245 # Check out "${OPENSSL_SOURCES_DIR}/Configurations/README": "This is
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
246 # default if no option is specified, it works on any supported
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
247 # system." It is mandatory to define it as a macro, as it is used by
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
248 # all the source files that include OpenSSL (e.g. "Core/Toolbox.cpp"
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
249 # or curl)
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
250 add_definitions(-DTHIRTY_TWO_BIT)
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
252
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
253 if (NOT CMAKE_COMPILER_IS_GNUCXX OR
3726
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
254 "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
255 "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
3726
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
256 # Disable the use of a gcc extension, that is neither available on
7b7ca203f1a3 fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3725
diff changeset
257 # MinGW, nor on LSB
3725
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
258 add_definitions(
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
259 -DOPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
260 )
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
261 endif()
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
262
8060880d5e66 fix openssl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3724
diff changeset
263
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 set(OPENSSL_DEFINITIONS
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
266 "${OPENSSL_DEFINITIONS};OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN;NO_WINDOWS_BRAINDEATH")
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
267
3723
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
268 if (ENABLE_OPENSSL_ENGINES)
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
269 link_libraries(crypt32)
cc6d4edfe8fe fix pkcs11 compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3722
diff changeset
270 endif()
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
271
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
272 add_definitions(
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
273 -DOPENSSL_RAND_SEED_OS # ${OPENSSL_SOURCES_DIR}/crypto/rand/rand_win.c
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
274 )
3724
f29a75a3190a fix for msvc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3723
diff changeset
275
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
276 elseif ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
277 add_definitions(
3805
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
278 # In order for "crypto/mem_sec.c" to compile on LSB
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
279 -DOPENSSL_NO_SECURE_MEMORY
3805
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
280
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
281 # The "OPENSSL_RAND_SEED_OS" value implies a syscall() to
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
282 # "__NR_getrandom" (i.e. system call "getentropy(2)") in
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
283 # "rand_unix.c", which is not available in LSB.
cdb429340112 Fix OpenSSL initialization on Linux Standard Base
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3803
diff changeset
284 -DOPENSSL_RAND_SEED_DEVRANDOM
4634
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
285
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
286 # If "OPENSSL_NO_ERR" is not defined, the PostgreSQL plugin
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
287 # crashes with segmentation fault in function
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
288 # "build_SYS_str_reasons()", that is called from
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
289 # "OPENSSL_init_ssl()"
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
290 # https://bugs.orthanc-server.com/show_bug.cgi?id=193
9a9118406484 fix issue 193
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4437
diff changeset
291 -DOPENSSL_NO_ERR
3802
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
292 )
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
293
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
294 else()
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
295 # Fixes error "OpenSSL error: error:2406C06E:random number
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
296 # generator:RAND_DRBG_instantiate:error retrieving entropy" that was
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
297 # present in Orthanc 1.6.0, if statically linking on Ubuntu 18.04
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
298 add_definitions(
6462ecaa045b fix unit test, reorganization of OpenSSL initialization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3726
diff changeset
299 -DOPENSSL_RAND_SEED_OS
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
300 )
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
301 endif()
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
302
3722
a49d49d945c9 fixing openssl compilation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3721
diff changeset
303
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
304 set_source_files_properties(
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 ${OPENSSL_SOURCES}
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
306 PROPERTIES COMPILE_DEFINITIONS
3721
c575fb0adf91 upgraded jsoncpp to 0.10.7 for pre-C++11 compilers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3720
diff changeset
307 "${OPENSSL_DEFINITIONS};DSO_NONE"
3720
faa695f433d5 upgraded OpenSSL to 1.1.1d
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
308 )