From ee1cea7cd4fe13437d9d2492c396d827af3ea2bd Mon Sep 17 00:00:00 2001 From: Andrew Herbert Date: Fri, 3 Mar 2017 14:42:09 +1100 Subject: [PATCH 1/2] openssl 1.1.x's default configuration results in app store rejection: The app references non-public symbols in : _getcontext, _makecontext, _setcontext --- build-libssl.sh | 10 ++++++++++ scripts/build-loop-targets.sh | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index 71e1b6c..396b693 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -60,6 +60,7 @@ echo_help() echo " Note: The framework will contain include files from the architecture listed first" echo echo "Options for OpenSSL 1.1.0 and higher ONLY" + echo " --async Exclude no-async configure option and build with async support - do not use if submitting to App Store" echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods" echo " --targets=\"TARGET TARGET ...\" Space-separated list of build targets" echo " Options: ${DEFAULTTARGETS}" @@ -184,6 +185,7 @@ ARCHS="" BRANCH="" CLEANUP="" CONFIG_ENABLE_EC_NISTP_64_GCC_128="" +CONFIG_NO_ASYNC="" CONFIG_NO_DEPRECATED="" IOS_SDKVERSION="" LOG_VERBOSE="" @@ -200,6 +202,9 @@ case $i in ARCHS="${i#*=}" shift ;; + --async) + CONFIG_NO_ASYNC="false" + ;; --branch=*) BRANCH="${i#*=}" shift @@ -310,6 +315,11 @@ else TARGETS="${DEFAULTTARGETS}" fi + # Add no-async config option (if not overwritten) - async being enabled leads to App Store rejection + if [ "${CONFIG_NO_ASYNC}" != "false" ]; then + CONFIG_OPTIONS="${CONFIG_OPTIONS} no-async" + fi + # Add no-deprecated config option (if not overwritten) if [ "${CONFIG_NO_DEPRECATED}" != "false" ]; then CONFIG_OPTIONS="${CONFIG_OPTIONS} no-deprecated" diff --git a/scripts/build-loop-targets.sh b/scripts/build-loop-targets.sh index b2ed37b..cc72692 100755 --- a/scripts/build-loop-targets.sh +++ b/scripts/build-loop-targets.sh @@ -64,11 +64,6 @@ do LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} enable-ec_nistp_64_gcc_128" fi - # Disable unavailable async for tvOS builds - if [[ "${PLATFORM}" == AppleTV* ]]; then - LOCAL_CONFIG_OPTIONS="${LOCAL_CONFIG_OPTIONS} no-async" - fi - # Run Configure run_configure From addf784317ed8985e8a6e7b0a956b024a72a96c6 Mon Sep 17 00:00:00 2001 From: Andrew Herbert Date: Mon, 6 Mar 2017 09:31:01 +1100 Subject: [PATCH 2/2] No need for --async build option --- build-libssl.sh | 10 ---------- scripts/build-loop-targets.sh | 6 ++++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/build-libssl.sh b/build-libssl.sh index 396b693..71e1b6c 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -60,7 +60,6 @@ echo_help() echo " Note: The framework will contain include files from the architecture listed first" echo echo "Options for OpenSSL 1.1.0 and higher ONLY" - echo " --async Exclude no-async configure option and build with async support - do not use if submitting to App Store" echo " --deprecated Exclude no-deprecated configure option and build with deprecated methods" echo " --targets=\"TARGET TARGET ...\" Space-separated list of build targets" echo " Options: ${DEFAULTTARGETS}" @@ -185,7 +184,6 @@ ARCHS="" BRANCH="" CLEANUP="" CONFIG_ENABLE_EC_NISTP_64_GCC_128="" -CONFIG_NO_ASYNC="" CONFIG_NO_DEPRECATED="" IOS_SDKVERSION="" LOG_VERBOSE="" @@ -202,9 +200,6 @@ case $i in ARCHS="${i#*=}" shift ;; - --async) - CONFIG_NO_ASYNC="false" - ;; --branch=*) BRANCH="${i#*=}" shift @@ -315,11 +310,6 @@ else TARGETS="${DEFAULTTARGETS}" fi - # Add no-async config option (if not overwritten) - async being enabled leads to App Store rejection - if [ "${CONFIG_NO_ASYNC}" != "false" ]; then - CONFIG_OPTIONS="${CONFIG_OPTIONS} no-async" - fi - # Add no-deprecated config option (if not overwritten) if [ "${CONFIG_NO_DEPRECATED}" != "false" ]; then CONFIG_OPTIONS="${CONFIG_OPTIONS} no-deprecated" diff --git a/scripts/build-loop-targets.sh b/scripts/build-loop-targets.sh index cc72692..ca3c5c7 100755 --- a/scripts/build-loop-targets.sh +++ b/scripts/build-loop-targets.sh @@ -56,8 +56,10 @@ do prepare_target_source_dirs ## Determine config options - # Add build target, --prefix and prevent creation of shared libraries (default since 1.1.0) - LOCAL_CONFIG_OPTIONS="${TARGET} --prefix=${TARGETDIR} ${CONFIG_OPTIONS} no-shared" + # Add build target, --prefix and prevent async (references to getcontext(), + # setcontext() and makecontext() result in App Store rejections) and creation + # of shared libraries (default since 1.1.0) + LOCAL_CONFIG_OPTIONS="${TARGET} --prefix=${TARGETDIR} ${CONFIG_OPTIONS} no-async no-shared" # Only relevant for 64 bit builds if [[ "${CONFIG_ENABLE_EC_NISTP_64_GCC_128}" == "true" && "${ARCH}" == *64 ]]; then