Skip to content

Commit

Permalink
Merge pull request #63 from jasonacox/openssl-3
Browse files Browse the repository at this point in the history
Add OpenSSL 3.0 support
  • Loading branch information
jasonacox committed Jul 19, 2023
2 parents 68f8c06 + 887e831 commit 45e8d7a
Show file tree
Hide file tree
Showing 160 changed files with 17,395 additions and 7,600 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ name: build

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request
# Triggers the workflow on push or pull request except for documentation changes
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

# Allow from the Actions tab
workflow_dispatch:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"git.ignoreLimitWarning": true
"git.ignoreLimitWarning": true,
"cmake.configureOnOpen": false
}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ The build script accepts several arguments to adjust versions and toggle feature
```
./build.sh [-o <OpenSSL version>] [-c <curl version>] [-n <nghttp2 version>] [-d] [-e] [-3] [-x] [-h] [...]
-o <version> Build OpenSSL version (default 1.1.1o)
-c <version> Build curl version (default 7.83.1)
-n <version> Build nghttp2 version (default 1.47.0)
-o <version> Build OpenSSL version (default 3.0.9)
-c <version> Build curl version (default 8.1.2)
-n <version> Build nghttp2 version (default 1.55.1)
-d Compile without HTTP2 support
-e Compile with OpenSSL engine support
-b Compile without bitcode
Expand Down Expand Up @@ -72,9 +72,9 @@ You can update the default version by editing this section in the `build.sh` scr
# EDIT this section to Select Default Versions #
################################################

OPENSSL="1.1.1o" # https://www.openssl.org/source/
LIBCURL="7.83.1" # https://curl.haxx.se/download.html
NGHTTP2="1.47.0" # https://nghttp2.org/
OPENSSL="3.0.9" # https://www.openssl.org/source/
LIBCURL="8.1.2" # https://curl.haxx.se/download.html
NGHTTP2="1.55.1" # https://nghttp2.org/

################################################
```
Expand Down
20 changes: 13 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ set -e
# EDIT this section to Select Default Versions #
################################################

OPENSSL="1.1.1t" # https://www.openssl.org/source/
LIBCURL="8.0.1" # https://curl.haxx.se/download.html
NGHTTP2="1.52.0" # https://nghttp2.org/
#OPENSSL="1.1.1u" # https://www.openssl.org/source/
OPENSSL="3.0.9" # https://www.openssl.org/source/
LIBCURL="8.1.2" # https://curl.haxx.se/download.html
NGHTTP2="1.55.1" # https://nghttp2.org/

################################################

Expand All @@ -26,7 +27,7 @@ BUILD_CMD=$*
# Set minimum OS versions for target
MACOS_X86_64_VERSION="" # Empty = use host version
MACOS_ARM64_VERSION="" # Min supported is MacOS 11.0 Big Sur
CATALYST_IOS="15.0" # Min supported is iOS 15.0 for Mac Catalyst
CATALYST_IOS="15.0" # Min supported is iOS 15.0 for Mac Catalyst
IOS_MIN_SDK_VERSION="8.0"
TVOS_MIN_SDK_VERSION="9.0"

Expand Down Expand Up @@ -168,6 +169,11 @@ echo "Targets: x86_64, armv7, armv7s, arm64 and arm64e"
## Start Counter
START=$(date +%s)

# Starting with OpenSSL 3.0 force nobitcode
if [[ "$OPENSSL" = "3.0"* ]]; then
disablebitcode="-b"
fi

## OpenSSL Build
echo
cd openssl
Expand Down Expand Up @@ -402,17 +408,17 @@ lipo -create -output $ARCHIVE/bin/openssl /tmp/openssl-x86_64 /tmp/openssl-arm64
mv /tmp/openssl-* $ARCHIVE/bin
echo
echo -e "${bold}Testing Universal Mac binaries for ${BUILD_MACHINE}...${dim}"
echo " cURL"
echo -e " ${bold}cURL${dim}"
file $ARCHIVE/bin/curl
$ARCHIVE/bin/curl -V
echo " OpenSSL"
echo -e " ${bold}OpenSSL${dim}"
file $ARCHIVE/bin/openssl
$ARCHIVE/bin/openssl version
date "+%c - End"

## Done - Display Build Duration
echo
echo -e "${bold}Build Complete${dim}"
date "+ %c - End"
END=$(date +%s)
secs=$(echo "$END - $START" | bc)
printf ' Duration %02dh:%02dm:%02ds\n' $(($secs/3600)) $(($secs%3600/60)) $(($secs%60))
Expand Down
2 changes: 1 addition & 1 deletion clean.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
echo "Cleaning Build-OpenSSL-cURL"
rm -fr curl/curl-* curl/include curl/lib openssl/openssl-1* openssl/openssl-ios* openssl/Mac openssl/iOS* openssl/tvOS* openssl/Catalyst nghttp2/nghttp2-1* nghttp2/Mac nghttp2/iOS* nghttp2/tvOS* nghttp2/lib nghttp2/Catalyst example/iOS\ Test\ App/build/* *.tgz *.pkg nghttp2/pkg-config* /tmp/curl /tmp/openssl /tmp/pkg_config
rm -fr curl/curl-* curl/include curl/lib openssl/openssl-1* openssl/openssl-3* openssl/openssl-ios* openssl/Mac openssl/iOS* openssl/tvOS* openssl/Catalyst nghttp2/nghttp2-1* nghttp2/Mac nghttp2/iOS* nghttp2/tvOS* nghttp2/lib nghttp2/Catalyst example/iOS\ Test\ App/build/* *.tgz *.pkg nghttp2/pkg-config* /tmp/curl /tmp/openssl /tmp/pkg_config
Loading

0 comments on commit 45e8d7a

Please sign in to comment.