You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2019/06/17 03:36:03 UTC

[arrow] branch master updated: ARROW-5538: [C++] Restrict minimum OpenSSL version to 1.0.2

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 6fc91cd  ARROW-5538: [C++] Restrict minimum OpenSSL version to 1.0.2
6fc91cd is described below

commit 6fc91cd1c3d6b35030033607d2197f1caf3db687
Author: Deepak Majeti <De...@hpe.com>
AuthorDate: Mon Jun 17 12:35:51 2019 +0900

    ARROW-5538: [C++] Restrict minimum OpenSSL version to 1.0.2
    
    Author: Deepak Majeti <De...@hpe.com>
    
    Closes #4586 from majetideepak/ARROW-5538 and squashes the following commits:
    
    20f0faa7d <Deepak Majeti> improve message
    556edd089 <Deepak Majeti> use cmake version support
    64f4156f0 <Deepak Majeti> cmake format
    5e7f277e9 <Deepak Majeti> ARROW-5538:  Restrict minimum OpenSSL version to 1.0.2
---
 cpp/cmake_modules/DefineOptions.cmake       |  3 ++-
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 12 ++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/cpp/cmake_modules/DefineOptions.cmake b/cpp/cmake_modules/DefineOptions.cmake
index 10ec8ad..461d0f4 100644
--- a/cpp/cmake_modules/DefineOptions.cmake
+++ b/cpp/cmake_modules/DefineOptions.cmake
@@ -291,7 +291,8 @@ Always OFF if building binaries" OFF)
   define_option(PARQUET_BUILD_EXAMPLES
                 "Build the Parquet examples. Requires static libraries to be built." OFF)
 
-  define_option(PARQUET_REQUIRE_ENCRYPTION "Fail if OpenSSL is not found" OFF)
+  define_option(PARQUET_REQUIRE_ENCRYPTION
+                "Build support for encryption. Fail if OpenSSL is not found" OFF)
 
   #----------------------------------------------------------------------
   set_option_category("Gandiva")
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index f022267..2238a56 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -766,20 +766,21 @@ set(ARROW_USE_OPENSSL OFF)
 if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET)
   set(PARQUET_REQUIRE_ENCRYPTION OFF)
 endif()
+set(ARROW_OPENSSL_REQUIRED_VERSION "1.0.2")
 if(PARQUET_REQUIRE_ENCRYPTION OR ARROW_FLIGHT)
   # This must work
-  find_package(OpenSSL REQUIRED)
+  find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} REQUIRED)
   set(ARROW_USE_OPENSSL ON)
 elseif(ARROW_PARQUET)
   # Enable Parquet encryption if OpenSSL is there, but don't fail if it's not
-  find_package(OpenSSL QUIET)
+  find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} QUIET)
   if(OPENSSL_FOUND)
     set(ARROW_USE_OPENSSL ON)
   endif()
 endif()
 
 if(ARROW_USE_OPENSSL)
-  message(STATUS "Building with OpenSSL support")
+  message(STATUS "Building with OpenSSL (Version: ${OPENSSL_VERSION}) support")
   # OpenSSL::SSL and OpenSSL::Crypto
   # are not available in older CMake versions (CMake < v3.2).
   if(NOT TARGET OpenSSL::SSL)
@@ -798,7 +799,10 @@ if(ARROW_USE_OPENSSL)
 
   include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR})
 else()
-  message(STATUS "Building without OpenSSL support")
+  message(
+    STATUS
+      "Building without OpenSSL support. Minimum OpenSSL version ${ARROW_OPENSSL_REQUIRED_VERSION} required."
+    )
 endif()
 
 # ----------------------------------------------------------------------