changeset 2676:d2f70c8f8bfd jobs

primitives to compile OpenSSL within MariaDB
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 12 Jun 2018 16:22:07 +0200
parents 3fc310ceb6d4
children 0196d07a900f
files Resources/CMake/OpenSslConfiguration.cmake Resources/CMake/OrthancFrameworkConfiguration.cmake Resources/CMake/OrthancFrameworkParameters.cmake
diffstat 3 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/OpenSslConfiguration.cmake	Mon Jun 11 20:26:24 2018 +0200
+++ b/Resources/CMake/OpenSslConfiguration.cmake	Tue Jun 12 16:22:07 2018 +0200
@@ -34,7 +34,7 @@
     -DOPENSSL_NO_KRB5 
     -DOPENSSL_NO_MD2 
     -DOPENSSL_NO_MDC2 
-    -DOPENSSL_NO_MD4
+    #-DOPENSSL_NO_MD4   # MD4 is necessary for MariaDB/MySQL client
     -DOPENSSL_NO_RC2 
     -DOPENSSL_NO_RC4 
     -DOPENSSL_NO_RC5 
@@ -75,6 +75,7 @@
     ${OPENSSL_SOURCES_DIR}/crypto/evp
     ${OPENSSL_SOURCES_DIR}/crypto/hmac
     ${OPENSSL_SOURCES_DIR}/crypto/lhash
+    ${OPENSSL_SOURCES_DIR}/crypto/md4
     ${OPENSSL_SOURCES_DIR}/crypto/md5
     ${OPENSSL_SOURCES_DIR}/crypto/modes
     ${OPENSSL_SOURCES_DIR}/crypto/objects
@@ -96,6 +97,12 @@
     ${OPENSSL_SOURCES_DIR}/ssl
     )
 
+  if (ENABLE_OPENSSL_ENGINES)
+    list(APPEND OPENSSL_SOURCES_SUBDIRS
+      ${OPENSSL_SOURCES_DIR}/engines
+      )
+  endif()
+
   if (ENABLE_PKCS11)
     list(APPEND OPENSSL_SOURCES_SUBDIRS
       # EC, ECDH and ECDSA are necessary for PKCS11
@@ -136,6 +143,9 @@
     ${OPENSSL_SOURCES_DIR}/crypto/evp/e_dsa.c
     ${OPENSSL_SOURCES_DIR}/crypto/evp/m_ripemd.c
     ${OPENSSL_SOURCES_DIR}/crypto/lhash/lh_test.c
+    ${OPENSSL_SOURCES_DIR}/crypto/md4/md4.c
+    ${OPENSSL_SOURCES_DIR}/crypto/md4/md4s.cpp
+    ${OPENSSL_SOURCES_DIR}/crypto/md4/md4test.c
     ${OPENSSL_SOURCES_DIR}/crypto/md5/md5s.cpp
     ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/bio_ber.c
     ${OPENSSL_SOURCES_DIR}/crypto/pkcs7/pk7_enc.c
@@ -203,6 +213,10 @@
       ${OPENSSL_SOURCES}
       PROPERTIES COMPILE_DEFINITIONS
       "OPENSSL_SYSNAME_WIN32;SO_WIN32;WIN32_LEAN_AND_MEAN;L_ENDIAN")
+
+    if (ENABLE_OPENSSL_ENGINES)
+      link_libraries(crypt32)
+    endif()
   endif()
 
   source_group(ThirdParty\\OpenSSL REGULAR_EXPRESSION ${OPENSSL_SOURCES_DIR}/.*)
--- a/Resources/CMake/OrthancFrameworkConfiguration.cmake	Mon Jun 11 20:26:24 2018 +0200
+++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake	Tue Jun 12 16:22:07 2018 +0200
@@ -43,6 +43,7 @@
 if (NOT ENABLE_CRYPTO_OPTIONS)
   unset(ENABLE_SSL CACHE)
   unset(ENABLE_PKCS11 CACHE)
+  unset(ENABLE_OPENSSL_ENGINES CACHE)
   unset(USE_SYSTEM_OPENSSL CACHE)
   unset(USE_SYSTEM_LIBP11 CACHE)
   add_definitions(
@@ -187,6 +188,7 @@
     include(${CMAKE_CURRENT_LIST_DIR}/OpenSslConfiguration.cmake)
     add_definitions(-DORTHANC_ENABLE_SSL=1)
   else()
+    unset(ENABLE_OPENSSL_ENGINES CACHE)
     unset(USE_SYSTEM_OPENSSL CACHE)
     add_definitions(-DORTHANC_ENABLE_SSL=0)
   endif()
--- a/Resources/CMake/OrthancFrameworkParameters.cmake	Mon Jun 11 20:26:24 2018 +0200
+++ b/Resources/CMake/OrthancFrameworkParameters.cmake	Tue Jun 12 16:22:07 2018 +0200
@@ -98,6 +98,7 @@
 set(ENABLE_WEB_SERVER OFF CACHE INTERNAL "Enable embedded Web server")
 set(ENABLE_DCMTK OFF CACHE INTERNAL "Enable DCMTK")
 set(ENABLE_DCMTK_NETWORKING OFF CACHE INTERNAL "Enable DICOM networking in DCMTK")
+set(ENABLE_OPENSSL_ENGINES OFF CACHE INTERNAL "Enable support of engines in OpenSSL")
 
 set(HAS_EMBEDDED_RESOURCES OFF CACHE INTERNAL
   "Whether resources are auto-generated using EmbedResources.py")