Skip to content

Commit

Permalink
Update to openssl 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
luc committed Mar 18, 2024
1 parent 5f79e06 commit 2d7784b
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 67 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-dep-openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-mac64
path: ${{ github.workspace }}/externals/prebuilt/mac64_openssl_1.1.1g
path: ${{ github.workspace }}/externals/prebuilt/mac64_openssl_3.2.1

- name: Archive prebuilt openssl ios
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-ios
path: ${{ github.workspace }}/externals/prebuilt/iosV8_openssl_1.1.1g
path: ${{ github.workspace }}/externals/prebuilt/iosV8_openssl_3.2.1
8 changes: 4 additions & 4 deletions apps/app_demo_slproject/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ apply plugin: 'com.android.application'
android {
signingConfigs {
release {
keyAlias 'cpvrlab'
keyPassword '?' // Change to your key password
storeFile file('../cpvrlab-release-key')
storePassword '?' // Change to your store password
keyAlias 'slproject-release-key'
keyPassword '' // Change to your key password
storeFile file('../slproject-release-key')
storePassword '' // Change to your store password
}
}
compileSdkVersion 29
Expand Down
46 changes: 18 additions & 28 deletions externals/prebuild_scripts/build_openssl_for_andV8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,38 @@
# the variable TOOLCHAIN (search below). E.g. on macos it is
# $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin

openssl_VERSION="OpenSSL_1_1_1h"
ANDROID_NDK_VERSION="r20b"

openssl_VERSION="3.2.1"
if [ -n "$1" ]
then
openssl_VERSION="$1"
fi

if [ "$ANDROID_NDK_HOME" == "" ]
WORK_PATH=$(cd "$(dirname "$0")";pwd)
if [ ! -d android-ndk-r20b ]
then
echo "android ndk home not defined"
echo "export ANDROID_NDK_HOME=/path/Android/ndk-bundle/"
exit
wget https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
unzip android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
fi
export ANDROID_NDK_HOME="android-ndk-r20b"
export ANDROID_NDK_PATH=${WORK_PATH}/${ANDROID_NDK_HOME}
export ANDROID_NDK_ROOT=${ANDROID_NDK_PATH}

ARCH=andV8
ZIPFILE=${ARCH}_openssl

clear
echo "Building openssl Version: $openssl_VERSION"

if [ ! -d "openssl/.git" ]; then
git clone https://github.com/openssl/openssl.git
fi

# Get all assimp tags and check if the requested exists
cd openssl
git tag > openssl_tags.txt

if grep -Fx "$openssl_VERSION" openssl_tags.txt > /dev/null; then
git checkout $openssl_VERSION
git pull origin $openssl_VERSION
else
echo "No valid openssl tag passed as 1st parameter !!!!!"
exit
if [ ! -d "openssl-${openssl_VERSION}" ]; then
wget https://www.openssl.org/source/openssl-${openssl_VERSION}.tar.gz
tar -zxf openssl-${openssl_VERSION}.tar.gz
fi

ls

cd openssl-${openssl_VERSION}

export CC=clang
export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin:$PATH
export API=21
export PATH=$TOOLCHAIN:$PATH
architecture=android-arm64

export PREFIX=$(pwd)/../$ZIPFILE
Expand All @@ -70,10 +60,10 @@ make install

cd ..

if [ -d "../prebuilt/${ARCH}_openssl" ]
if [ -d "../prebuilt/${ARCH}_openssl-${openssl_VERSION}" ]
then
rm -rf ../prebuilt/${ARCH}_openssl
rm -rf ../prebuilt/${ARCH}_openssl-${openssl_VERSION}
fi

mv ${ZIPFILE} ../prebuilt/${ARCH}_openssl/
mv ${ZIPFILE} ../prebuilt/${ARCH}_openssl-${openssl_VERSION}/

31 changes: 11 additions & 20 deletions externals/prebuild_scripts/build_openssl_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,36 @@
# ####################################################


VERSION="1.1.1h"
openssl_VERSION="OpenSSL_1_1_1h"
VERSION="3.2.1"
#if [ -n "$1" ]
#then
# openssl_VERSION="$1"
# VERSION="$1"
#fi

ARCH=linux
ZIPFILE=${ARCH}_openssl_${VERSION}

clear
echo "Building openssl Version: $openssl_VERSION"
echo "Building openssl Version: $VERSION"

if [ ! -d "openssl/.git" ]; then
git clone https://github.com/openssl/openssl.git
if [ ! -d "openssl-${VERSION}" ]; then
wget https://www.openssl.org/source/openssl-${VERSION}.tar.gz
tar -zxf openssl-${VERSION}.tar.gz
fi

# Get all assimp tags and check if the requested exists
cd openssl
git tag > openssl_tags.txt
cd "openssl-${VERSION}"

if grep -Fx "$openssl_VERSION" openssl_tags.txt > /dev/null; then
git checkout $openssl_VERSION
git pull origin $openssl_VERSION
else
echo "No valid openssl tag passed as 1st parameter !!!!!"
exit
fi


export CC=clang
#export CC=clang
export PREFIX=$(pwd)/../$ZIPFILE

if [ ! -d "$PREFIX" ]
then
mkdir $PREFIX
fi

./config --prefix=$PREFIX --openssldir=$PREFIX
#./config --prefix=$PREFIX --openssldir=$PREFIX

./Configure ${x86_64} --prefix=$PREFIX --openssldir=$PREFIX

if [ $? -ne 0 ]
then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ echo "============================================================"

git clone https://github.com/jasonacox/Build-OpenSSL-cURL.git

OPENSSL_VER=1.1.1g
#OPENSSL_VER=1.1.1g
OPENSSL_VER=3.2.1
OUTDIR_MAC=mac64_openssl_"$OPENSSL_VER"
OUTDIR_IOS=iosV8_openssl_"$OPENSSL_VER"
BUILDDIR=Build-OpenSSL-cURL
Expand All @@ -35,3 +36,4 @@ cp -R ../prebuild_scripts/$BUILDDIR/openssl/iOS/include $OUTDIR_IOS/include
cp -R ../prebuild_scripts/$BUILDDIR/openssl/iOS/lib $OUTDIR_IOS/release
cp ../prebuild_scripts/$BUILDDIR/LICENSE $OUTDIR_MAC/
cp ../prebuild_scripts/$BUILDDIR/LICENSE $OUTDIR_IOS/

33 changes: 21 additions & 12 deletions externals/prebuild_scripts/build_openssl_for_win64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

@echo off

set OPENSSL_VERSION="OpenSSL_1_1_1h"
::set OPENSSL_VERSION="OpenSSL_3_2_1"
set VERSION="3.2.1"

if "%1" == "" (
set OPENSSL_VERSION="%1"
set VERSION="%1"
::set OPENSSL_VERSION="%1"
)

:: To enable downloading prebuilds copy
Expand All @@ -17,21 +19,28 @@ set MAX_NUM_CPU_CORES=6
set SLPROJECT_ROOT=%2
set PREFIX=%cd%\..\prebuilt\win64_openssl

echo Building OpenSSL Version: %OPENSSL_VERSION%
::echo Building OpenSSL Version: %OPENSSL_VERSION%
echo Building OpenSSL Version: %VERSION%
echo Installation directory: %PREFIX%
echo Using %MAX_NUM_CPU_CORES% cpu cores for build.

::-----------------------------------------------------------------::
if not exist openssl (
git clone https://github.com/openssl/openssl.git
) else (
echo openssl already exists
)
cd openssl
git checkout %OPENSSL_VERSION%
git pull origin %OPENSSL_VERSION%
::if not exist openssl (
:: git clone https://github.com/openssl/openssl.git
::) else (
:: echo openssl already exists
::)
::cd openssl
::git checkout %OPENSSL_VERSION%
::git pull origin %OPENSSL_VERSION%
::
::perl Configure VC-WIN64A --prefix=%PREFIX% --openssldir=%PREFIX%

if [ ! -d "openssl-${VERSION}" ]; then
curl https://www.openssl.org/source/openssl-${VERSION}.tar.gz
tar -zxf openssl-${VERSION}.tar.gz
fi

perl Configure VC-WIN64A --prefix=%PREFIX% --openssldir=%PREFIX%

nmake clean
nmake
Expand Down

0 comments on commit 2d7784b

Please sign in to comment.