Skip to content

Commit 1d3f910

Browse files
committedNov 7, 2024
restore support for AWS-LC [ci skip]
Experimental. Not working. The goal is to make it possible to test and compare it with BoringSSL. Also: - disable Perl (it's not present on Alpine by default). Needed for FIPS only. - add new Windows-specific AWS-LC build issue where it force-sets `_WIN32_WINNT` to Win7. - address the above by patching out `_WIN32_WINNT` force-set. - address the above by bumping Windows target to Win7. Yet to be seen if this is a true requirement or an arbitrary value that's newer than the default they intended to avoid in some mingw builds. - fix clang 19? deprecation warning triggered in mingw-w64 builds ``` /usr/lib/llvm-19/lib/clang/19/include/mm3dnow.h:16:2: error: "The <mm3dnow.h> header is deprecated, and 3dNow! intrinsics are unsupported. For other intrinsics, include <x86intrin.h>, instead." [-Werror,-W#warnings] 16 | #warning "The <mm3dnow.h> header is deprecated, and 3dNow! intrinsics are unsupported. For other intrinsics, include <x86intrin.h>, instead." | ^ 1 error generated. ``` https://github.com/curl/curl-for-win/actions/runs/11714432529/job/32629108727#step:3:4286 - patch AWS-LC to avoid `-Werror,-Wcast-function-type-mismatch` on Windows: ``` /path/to/awslc/crypto/rand_extra/windows.c:68:22: error: cast from 'FARPROC' (aka 'long long (*)()') to 'ProcessPrngFunction' (aka 'int (*)(unsigned char *, unsigned long long)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] 68 | g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` https://github.com/curl/curl-for-win/actions/runs/11712448493/job/32623148501#step:3:3996 Upstream report and patch: aws/aws-lc#1971 aws/aws-lc#1972 Unfixed issues: - curl cmake is trying and failing to detect ECH support: ``` -- Looking for SSL_set1_ech_config_list - not found [...] "/usr/bin/ld.lld-19" --sysroot=/usr/x86_64-w64-mingw32 -m i386pep -Bdynamic -o cmTC_d97c0.exe /usr/x86_64-w64-mingw32/lib/crt2.o /usr/x86_64-w64-mingw32/lib/crtbegin.o -L/usr/lib/gcc/x86_64-w64-mingw32/13-posix -L/usr/x86_64-w64-mingw32/x86_64-w64-mingw32/lib -L/usr/x86_64-w64-mingw32/x86_64-w64-mingw32/mingw/lib -L/usr/x86_64-w64-mingw32/lib -lucrt -Xlink=-cetcompat --gc-sections --icf=all -s -Bstatic -Map curl.map -lpthread CMakeFiles/cmTC_d97c0.dir/CheckSymbolExists.c.obj --out-implib libcmTC_d97c0.dll.a --major-image-version 0 --minor-image-version 0 /home/runner/work/curl-for-win/curl-for-win/awslc/_x64-win-ucrt/usr/lib/libssl.a /home/runner/work/curl-for-win/curl-for-win/awslc/_x64-win-ucrt/usr/lib/libcrypto.a /home/runner/work/curl-for-win/curl-for-win/zlib/_x64-win-ucrt/usr/lib/libz.a -lws2_32 -lbcrypt -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 /usr/x86_64-w64-mingw32/lib/crtend.o ld.lld-19: error: libcrypto.a(err.o): invalid symbol index in addrsig section clang-19: error: linker command failed with exit code 1 (use -v to see invocation) ``` https://github.com/curl/curl-for-win/actions/runs/11714665857/job/32629738265#step:3:6997
1 parent 463b967 commit 1d3f910

16 files changed

+106
-33
lines changed
 

‎_build.sh

+15-7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
4242
# nohttp build without HTTP and proxy support
4343
# nocookie build without cookie support
4444
# imap build with IMAP protocol (for zero, bldtst or pico build)
45+
# awslc build with AWS-LC
4546
# boringssl build with BoringSSL
4647
# libressl build with LibreSSL
4748
# quictls build with quictls
@@ -177,7 +178,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
177178
# nghttp3 cmake
178179
# ngtcp2 cmake
179180
# openssl/quictls proprietary
180-
# boringssl cmake
181+
# boringssl/awslc cmake
181182
# libressl cmake
182183
# libssh cmake
183184
# libssh2 cmake-unity
@@ -515,6 +516,8 @@ build_single_target() {
515516
export _OPENSSL=''; boringssl=0
516517
if [[ "${_DEPS}" = *'libressl'* ]]; then
517518
_OPENSSL='libressl'
519+
elif [[ "${_DEPS}" = *'awslc'* ]]; then
520+
_OPENSSL='awslc'; boringssl=1
518521
elif [[ "${_DEPS}" = *'boringssl'* ]]; then
519522
_OPENSSL='boringssl'; boringssl=1
520523
elif [[ "${_DEPS}" = *'quictls'* ]]; then
@@ -819,7 +822,11 @@ build_single_target() {
819822

820823
if [ "${_OS}" = 'win' ]; then
821824

822-
_CPPFLAGS_GLOBAL+=' -D_WIN32_WINNT=0x0600' # Windows Vista
825+
if [ "${_OPENSSL}" = 'awslc' ]; then
826+
_CPPFLAGS_GLOBAL+=' -D_WIN32_WINNT=0x0700' # Windows 7
827+
else
828+
_CPPFLAGS_GLOBAL+=' -D_WIN32_WINNT=0x0600' # Windows Vista
829+
fi
823830

824831
if [ "${_HOST}" != "${_OS}" ] || \
825832
[ "${unamem}" != "${_machine}" ]; then
@@ -983,7 +990,7 @@ build_single_target() {
983990
_CXXFLAGS_GLOBAL+=' -fvisibility=hidden'
984991
fi
985992

986-
if [ "${_OPENSSL}" = 'boringssl' ]; then
993+
if [ "${boringssl}" = '1' ]; then
987994
_LDFLAGS_GLOBAL+=' -Wl,-Bstatic -lstdc++'
988995
if [ "${_TOOLCHAIN}" = 'llvm-mingw' ]; then
989996
_LDFLAGS_GLOBAL+=' -stdlib=libc++'
@@ -1303,7 +1310,7 @@ build_single_target() {
13031310
_CFLAGS_GLOBAL+=' -fno-ident'
13041311
fi
13051312

1306-
# for boringssl
1313+
# for boringssl/awslc
13071314
export _STRIP_BINUTILS=''
13081315
if [ "${_OS}" = 'win' ] && [ "${_CC}" = 'llvm' ]; then
13091316
if [ "${_CPU}" = 'x64' ] || \
@@ -1314,7 +1321,7 @@ build_single_target() {
13141321
if command -v "${tmp}" >/dev/null 2>&1; then
13151322
_STRIP_BINUTILS="$(PATH="${_ori_path}" command -v "${tmp}" 2>/dev/null)"
13161323
else
1317-
echo "! Warning: binutils strip tool '${tmp}' not found. BoringSSL libs may not be reproducible."
1324+
echo "! Warning: binutils strip tool '${tmp}' not found. BoringSSL/AWC-LC libs may not be reproducible."
13181325
fi
13191326
fi
13201327
fi
@@ -1452,7 +1459,7 @@ build_single_target() {
14521459
fi
14531460
ccrsdir="${ccrtdir}"
14541461
ccrtlib="-Wl,-lgcc -Wl,-lgcc_eh"
1455-
if [ "${_OPENSSL}" != 'boringssl' ]; then
1462+
if [ "${boringssl}" != '1' ]; then
14561463
_LDFLAGS_CXX_GLOBAL+=' -nostdlib++'
14571464
fi
14581465
ccridir="$("clang${_CCSUFFIX}" -print-resource-dir)" # /usr/lib/llvm-13/lib/clang/13.0.1
@@ -1536,7 +1543,7 @@ build_single_target() {
15361543
fi
15371544
_LDFLAGS_GLOBAL+=' -rtlib=compiler-rt'
15381545
fi
1539-
if [ "${_OPENSSL}" != 'boringssl' ]; then
1546+
if [ "${boringssl}" != '1' ]; then
15401547
_LDFLAGS_CXX_GLOBAL+=' -nostdlib++'
15411548
fi
15421549
fi
@@ -1689,6 +1696,7 @@ build_single_target() {
16891696
bld cares "${CARES_VER_}"
16901697
bld libpsl "${LIBPSL_VER_}"
16911698
bld nghttp3 "${NGHTTP3_VER_}"
1699+
bld awslc "${AWSLC_VER_}" boringssl
16921700
bld boringssl "${BORINGSSL_VER_}"
16931701
bld libressl "${LIBRESSL_VER_}"
16941702
bld quictls "${QUICTLS_VER_}" openssl

‎_ci-linux-alpine.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extra=''
1515

1616
if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
1717
extra+=' mingw-w64-gcc-base wine'
18-
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]]; then
18+
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
1919
extra+=' nasm'
2020
fi
2121
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then

‎_ci-linux-debian.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
2727
extra+=' mingw-w64 wine64'
2828
# https://tracker.debian.org/pkg/osslsigncode
2929
extra+=' osslsigncode'
30-
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]]; then
30+
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
3131
extra+=' nasm'
3232
fi
3333
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then

‎_ci-mac-homebrew.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414

1515
if [[ "${CW_CONFIG:-}" = *'win'* ]]; then
1616
extra+=' mingw-w64 osslsigncode wine-stable openssh'
17-
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]]; then
17+
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
1818
extra+=' nasm'
1919
fi
2020
elif [[ "${CW_CONFIG:-}" = *'linux'* ]]; then

‎_ci-win-msys2.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ pacman --noconfirm --ask 20 --noprogressbar --sync --needed \
1313

1414
[[ "${CW_CONFIG:-}" = *'boringssl'* ]] && \
1515
pacman --noconfirm --ask 20 --noprogressbar --sync --needed \
16-
mingw-w64-{x86_64,i686}-{go,nasm}
16+
mingw-w64-{x86_64,i686}-go
17+
18+
if [[ "${CW_CONFIG:-}" = *'boringssl'* ]] || [[ "${CW_CONFIG:-}" = *'awslc'* ]]; then
19+
pacman --noconfirm --ask 20 --noprogressbar --sync --needed \
20+
mingw-w64-{x86_64,i686}-nasm
21+
fi
1722

1823
./_build.sh

‎_dl.sh

+13
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ cat <<EOF
112112
"sig": ".asc",
113113
"keys": "A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5"
114114
},
115+
{
116+
"name": "awslc",
117+
"url": "https://github.com/aws/aws-lc/archive/refs/tags/v{ver}.tar.gz",
118+
"redir": "redir",
119+
"tag": "v\\\\d+\\\\.\\\\d+\\\\.\\\\d+$"
120+
},
115121
{
116122
"name": "boringssl",
117123
"url": "https://github.com/google/boringssl/releases/download/{ver}/boringssl-{ver}.tar.gz",
@@ -677,6 +683,9 @@ if [[ ! "${_CONFIG}" =~ (zero|bldtst) ]]; then
677683
if [[ "${_CONFIG}" = *'libressl'* ]]; then
678684
_DEPS+=' libressl'
679685
need_cacert=1
686+
elif [[ "${_CONFIG}" = *'awslc'* ]]; then
687+
_DEPS+=' awslc'
688+
need_cacert=1
680689
elif [[ "${_CONFIG}" = *'boringssl'* ]]; then
681690
_DEPS+=' boringssl'
682691
need_cacert=1
@@ -765,6 +774,10 @@ if [[ "${_DEPS}" = *'libressl'* ]]; then
765774
live_dl libressl "${LIBRESSL_VER_}"
766775
live_xt libressl "${LIBRESSL_HASH}"
767776
fi
777+
if [[ "${_DEPS}" = *'awslc'* ]]; then
778+
live_dl awslc "${AWSLC_VER_}"
779+
live_xt awslc "${AWSLC_HASH}"
780+
fi
768781
if [[ "${_DEPS}" = *'boringssl'* ]]; then
769782
live_dl boringssl "${BORINGSSL_VER_}"
770783
live_xt boringssl "${BORINGSSL_HASH}"

‎_versions.sh

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export OPENSSL_VER_='3.4.0'
4141
export OPENSSL_HASH=e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf
4242
export BORINGSSL_VER_='0.20241024.0'
4343
export BORINGSSL_HASH=7474771bad71aaef19a58ba8bc618834767b5713cc3c479a9f502ab94ef89391
44+
export AWSLC_VER_='1.37.0'
45+
export AWSLC_HASH=d5ba1bd922247ce8bdd9139289bf5a021237b121e1f29a323c0ef1730cb1ed07
4446
export LIBRESSL_VER_='4.0.0'
4547
export LIBRESSL_HASH=4d841955f0acc3dfc71d0e3dd35f283af461222350e26843fea9731c0246a1e4
4648
export OSSLSIGNCODE_VER_='2.9.0'

‎appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ branches:
99
- 'main-libressl'
1010
- 'main-quictls'
1111
- 'main-boringssl'
12+
- 'main-awslc'
1213
- 'main-mini'
1314
- 'dev'
1415
- 'dev-libressl'
1516
- 'dev-quictls'
1617
- 'dev-boringssl'
18+
- 'dev-awslc'
1719
- 'dev-mini'
1820
- 'test'
1921
- 'test-libressl'
2022
- 'test-quictls'
2123
- 'test-boringssl'
24+
- 'test-awslc'
2225
- 'test-mini'
2326
# https://www.appveyor.com/docs/build-environment/#build-worker-images
2427
# https://www.appveyor.com/docs/linux-images-software/

‎awslc.dev.patch

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
awslc.patch

‎awslc.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/crypto/rand_extra/windows.c
2+
+++ b/crypto/rand_extra/windows.c
3+
@@ -65,7 +65,7 @@
4+
if (hmod == NULL) {
5+
abort();
6+
}
7+
- g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng");
8+
+ g_processprng_fn = (ProcessPrngFunction)(void(*)(void))GetProcAddress(hmod, "ProcessPrng");
9+
if (g_processprng_fn == NULL) {
10+
abort();
11+
}

‎awslc.test.patch

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
awslc.patch

‎boringssl.sh

+40-15
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# https://github.com/mirror/mingw-w64/commit/ad2b46ca1e603872f62f83eaaff9e5ef77c99500
1313
# - as of 4fe29ebc hacks are needed to avoid build issues. grep for the hash
1414
# to find them.
15+
# Does not affect AWS-LC.
1516
# - BoringSSL also supports native-Windows threading, but it uses
1617
# MSVC-specific hacks, thus cannot be enabled for MinGW:
1718
# https://github.com/google/boringssl/blob/master/crypto/thread_win.c
@@ -32,6 +33,14 @@
3233
# This is fixed in AWS-LC fork with a CMake option.
3334
# - Objects built on different OSes result in a few byte differences.
3435
# e.g. windows.c.obj, a_utf8.c.obj. But not a_octet.c.obj.
36+
# - AWS-LC force-sets _WIN32_WINNT to _WIN32_WINNT_WIN7. The Windows target
37+
# should be up to the builder and not something for the project to set
38+
# unconditionally. If the selected version is too old, the build should
39+
# bail out. Either way, AWS-LC requires Win7, which is higher than the
40+
# Vista curl-for-win guarantees. But only for MinGW builds, as a way
41+
# to bump up the default, possibly as a workaround.
42+
43+
# https://github.com/aws/aws-lc
3544

3645
# https://boringssl.googlesource.com/boringssl/
3746
# https://bugs.chromium.org/p/boringssl/issues/list
@@ -48,7 +57,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
4857

4958
export _NAM _VER _OUT _BAS _DST
5059

51-
_NAM="$(basename "$0" | cut -f 1 -d '.')"
60+
_NAM="$(basename "$0" | cut -f 1 -d '.')"; [ -n "${2:-}" ] && _NAM="$2"
5261
_VER="$1"
5362

5463
(
@@ -57,6 +66,7 @@ _VER="$1"
5766
[ "${CW_DEV_INCREMENTAL:-}" != '1' ] && rm -r -f "${_PKGDIR:?}" "${_BLDDIR:?}"
5867

5968
CFLAGS="-ffile-prefix-map=$(pwd)="
69+
CPPFLAGS=''
6070
LIBS='-lpthread' # for tests
6171
options=''
6272

@@ -92,24 +102,39 @@ _VER="$1"
92102
fi
93103

94104
if [ "${CW_DEV_INCREMENTAL:-}" != '1' ] || [ ! -d "${_BLDDIR}" ]; then
95-
# Patch the build to omit debug info. This results in 50% smaller footprint
96-
# for each ${_BLDDIR}. As of llvm 14.0.6, llvm-strip does an imperfect job
97-
# when deleting -ggdb debug info and ends up having ~100 bytes of metadata
98-
# different (e.g. in windows.c.obj, a_utf8.c.obj, but not a_octet.c.obj)
99-
# across build host platforms. Fixed either by patching out this flag here,
100-
# or by running binutils strip on the result. binutils strip do not support
101-
# ARM64, so patch it out in that case.
102-
# Enable it for all targets for consistency.
103-
sed -i.bak 's/ -ggdb//g' ./CMakeLists.txt
104-
105-
# Skip building test components
106-
echo 'set_target_properties(decrepit bssl_shim test_fips boringssl_gtest test_support_lib urandom_test crypto_test ssl_test decrepit_test all_tests pki pki_test run_tests PROPERTIES EXCLUDE_FROM_ALL TRUE)' >> ./CMakeLists.txt
105+
if [ "${_NAM}" = 'awslc' ]; then
106+
options+=' -DBUILD_TESTING=OFF'
107+
options+=' -DBUILD_TOOL=OFF'
108+
options+=' -DDISABLE_GO=ON'
109+
options+=' -DDISABLE_PERL=ON'
110+
111+
if [ "${_OS}" = 'win' ]; then
112+
# Avoid deprecation warning triggered by mingw-w64 inside clang 19
113+
CPPFLAGS+=' -D_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS'
114+
fi
115+
116+
# Patch out to avoid redefinition errors
117+
sed -i.bak 's/-D_WIN32_WINNT=_WIN32_WINNT_WIN7//g' ./CMakeLists.txt
118+
else
119+
# Patch the build to omit debug info. This results in 50% smaller footprint
120+
# for each ${_BLDDIR}. As of llvm 14.0.6, llvm-strip does an imperfect job
121+
# when deleting -ggdb debug info and ends up having ~100 bytes of metadata
122+
# different (e.g. in windows.c.obj, a_utf8.c.obj, but not a_octet.c.obj)
123+
# across build host platforms. Fixed either by patching out this flag here,
124+
# or by running binutils strip on the result. binutils strip do not support
125+
# ARM64, so patch it out in that case.
126+
# Enable it for all targets for consistency.
127+
sed -i.bak 's/ -ggdb//g' ./CMakeLists.txt
128+
129+
# Skip building test components
130+
echo 'set_target_properties(decrepit bssl_shim test_fips boringssl_gtest test_support_lib urandom_test crypto_test ssl_test decrepit_test all_tests pki pki_test run_tests PROPERTIES EXCLUDE_FROM_ALL TRUE)' >> ./CMakeLists.txt
131+
fi
107132

108133
# shellcheck disable=SC2086
109134
cmake -B "${_BLDDIR}" ${_CMAKE_GLOBAL} ${_CMAKE_CXX_GLOBAL} ${options} \
110135
'-DBUILD_SHARED_LIBS=OFF' \
111-
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS}" \
112-
"-DCMAKE_CXX_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS} ${_CXXFLAGS_GLOBAL} ${_LDFLAGS_CXX_GLOBAL}"
136+
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${CPPFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS}" \
137+
"-DCMAKE_CXX_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${CPPFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS} ${_CXXFLAGS_GLOBAL} ${_LDFLAGS_CXX_GLOBAL}"
113138
fi
114139

115140
cmake --build "${_BLDDIR}" # --verbose

‎curl.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,14 @@ _VER="$1"
195195
fi
196196
fi
197197
options+=' -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON'
198-
if [ "${_OPENSSL}" = 'boringssl' ]; then
199-
CPPFLAGS+=" -DCURL_BORINGSSL_VERSION=\\\"${BORINGSSL_VER_}\\\""
200-
options+=' -DUSE_HTTPSRR=ON -DUSE_ECH=ON'
201-
options+=' -DHAVE_BORINGSSL=1 -DHAVE_AWSLC=0' # fast-track configuration
198+
if [ "${_OPENSSL}" = 'boringssl' ] || [ "${_OPENSSL}" = 'awslc' ]; then
199+
if [ "${_OPENSSL}" = 'boringssl' ]; then
200+
CPPFLAGS+=" -DCURL_BORINGSSL_VERSION=\\\"${BORINGSSL_VER_}\\\""
201+
options+=' -DUSE_HTTPSRR=ON -DUSE_ECH=ON'
202+
options+=' -DHAVE_BORINGSSL=1 -DHAVE_AWSLC=0' # fast-track configuration
203+
else
204+
options+=' -DHAVE_BORINGSSL=0 -DHAVE_AWSLC=1' # fast-track configuration
205+
fi
202206
LIBS+=' -lpthread'
203207
h3=1
204208
else

‎libssh.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ _VER="$1"
4141

4242
if [ -n "${_OPENSSL}" ] && [ -d "../${_OPENSSL}/${_PP}" ]; then
4343
options+=" -DOPENSSL_ROOT_DIR=${_TOP}/${_OPENSSL}/${_PP}"
44-
if [ "${_OPENSSL}" = 'boringssl' ]; then
44+
if [ "${_OPENSSL}" = 'boringssl' ] || [ "${_OPENSSL}" = 'awslc' ]; then
4545

4646
# FIXME (upstream):
4747
# - It collides with wincrypt.h macros. Workaround:

‎libssh2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ _VER="$1"
2828
if [ -n "${_OPENSSL}" ] && [ -d "../${_OPENSSL}/${_PP}" ]; then
2929
options+=' -DCRYPTO_BACKEND=OpenSSL'
3030
options+=" -DOPENSSL_ROOT_DIR=${_TOP}/${_OPENSSL}/${_PP}"
31-
if [ "${_OPENSSL}" = 'boringssl' ]; then
31+
if [ "${_OPENSSL}" = 'boringssl' ] || [ "${_OPENSSL}" = 'awslc' ]; then
3232
LIBS+=' -lpthread'
3333
fi
3434
if [ "${_OS}" = 'win' ]; then

‎ngtcp2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _VER="$1"
2929
# prevents building examples, which may fail for reasons or just take extra time.
3030
options+=' -DLIBEV_INCLUDE_DIR='
3131

32-
if [ "${_OPENSSL}" = 'boringssl' ]; then
32+
if [ "${_OPENSSL}" = 'boringssl' ] || [ "${_OPENSSL}" = 'awslc' ]; then
3333
options+=' -DENABLE_OPENSSL=OFF'
3434
options+=' -DENABLE_BORINGSSL=ON'
3535
options+=" -DBORINGSSL_INCLUDE_DIR=${_TOP}/${_OPENSSL}/${_PP}/include"

0 commit comments

Comments
 (0)
Please sign in to comment.