Skip to content

Commit e54886d

Browse files
committed
Merge remote-tracking branch 'curl/master'
2 parents b032cbe + 699ac94 commit e54886d

File tree

493 files changed

+2586
-1084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

493 files changed

+2586
-1084
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ commands:
5252
- run:
5353
command: |
5454
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
55-
WOLFSSL_VER=5.7.4
55+
WOLFSSL_VER=5.7.6
5656
echo "Installing wolfSSL $WOLFSSL_VER"
5757
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/wolfSSL/wolfssl/archive/v$WOLFSSL_VER-stable.tar.gz
5858
tar -xzf v$WOLFSSL_VER-stable.tar.gz

.github/scripts/badwords.pl

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,21 @@
88
# If separator is '=', the string will be compared case sensitively.
99
# If separator is ':', the check is done case insensitively.
1010
#
11+
# To add white listed uses of bad words that are removed before checking for
12+
# the bad ones:
13+
#
14+
# ---(accepted word)
15+
#
1116
my $w;
1217
while(<STDIN>) {
1318
chomp;
1419
if($_ =~ /^#/) {
1520
next;
1621
}
17-
if($_ =~ /^([^:=]*)([:=])(.*)/) {
22+
if($_ =~ /^---(.*)/) {
23+
push @whitelist, $1;
24+
}
25+
elsif($_ =~ /^([^:=]*)([:=])(.*)/) {
1826
my ($bad, $sep, $better)=($1, $2, $3);
1927
push @w, $bad;
2028
$alt{$bad} = $better;
@@ -41,6 +49,10 @@ sub file {
4149
$in =~ s/(\[.*\])\(.*\)/$1/g;
4250
# remove backticked texts
4351
$in =~ s/\`.*\`//g;
52+
# remove whitelisted patterns
53+
for my $p (@whitelist) {
54+
$in =~ s/$p//g;
55+
}
4456
foreach my $w (@w) {
4557
my $case = $exactcase{$w};
4658
if(($in =~ /^(.*)$w/i && !$case) ||

.github/scripts/badwords.txt

+5
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,8 @@ couldn't:could not
6666
64-bits:64 bits or 64-bit
6767
32-bits:32 bits or 32-bit
6868
\bvery\b:rephrase using an alternative word
69+
\bCurl\b=curl
70+
\bLibcurl\b=libcurl
71+
---WWW::Curl
72+
---NET::Curl
73+
---Curl Corporation

.github/scripts/cleancmd.pl

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
}
3838
next if($ignore);
3939

40+
# strip out backticked words
41+
$_ =~ s/`[^`]+`//g;
42+
4043
# strip out all long command line options
4144
$_ =~ s/--[a-z0-9-]+//g;
4245

.github/scripts/cmp-config.pl

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
'#define GETHOSTNAME_TYPE_ARG2 size_t' => 1,
4242
'#define HAVE_BROTLI 1' => 1,
4343
'#define HAVE_BROTLI_DECODE_H 1' => 1,
44-
'#define HAVE_DECL_GETPWUID_R 0' => 1,
45-
'#define HAVE_DECL_GETPWUID_R 1' => 1,
46-
'#define HAVE_DECL_GETPWUID_R_MISSING 1' => 1,
4744
'#define HAVE_DLFCN_H 1' => 1,
4845
'#define HAVE_GSSAPI_GSSAPI_KRB5_H 1' => 1,
4946
'#define HAVE_INTTYPES_H 1' => 1,

.github/workflows/checkdocs.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ jobs:
120120
- name: trim cmdline docs markdown _*.md files
121121
run: find docs/cmdline-opts -name "_*.md" -print0 | xargs -0 -n1 .github/scripts/cleancmd.pl --no-header
122122

123+
- name: trim docs/ markdown _*.md files
124+
run: git ls-files docs/*.md docs/internals/*.md | xargs -n1 .github/scripts/cleancmd.pl --no-header
125+
123126
- name: setup the custom wordlist
124127
run: grep -v '^#' .github/scripts/spellcheck.words > wordlist.txt
125128

@@ -137,7 +140,7 @@ jobs:
137140
name: checkout
138141

139142
- name: badwords
140-
run: .github/scripts/badwords.pl < .github/scripts/badwords.txt docs/*.md docs/libcurl/*.md docs/libcurl/opts/*.md docs/cmdline-opts/*.md docs/TODO docs/KNOWN_BUGS tests/*.md
143+
run: .github/scripts/badwords.pl < .github/scripts/badwords.txt `git ls-files '**.md'` docs/TODO docs/KNOWN_BUGS packages/OS400/README.OS400
141144

142145
- name: verify-synopsis
143146
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md

.github/workflows/http3-linux.yml

+12-44
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ env:
4444
quictls-version: 3.3.0
4545
# renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver registryUrl=https://github.com
4646
gnutls-version: 3.8.8
47-
wolfssl-version: master
47+
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
48+
wolfssl-version: 5.7.6
4849
# renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
4950
nghttp3-version: 1.7.0
5051
# renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
@@ -55,33 +56,7 @@ env:
5556
quiche-version: 0.22.0
5657

5758
jobs:
58-
setup:
59-
runs-on: ubuntu-latest
60-
outputs:
61-
wolfssl-version: ${{ steps.wolfssl-version.outputs.result }}
62-
63-
steps:
64-
- id: wolfssl-version
65-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
66-
with:
67-
result-encoding: string
68-
script: |
69-
let version = '${{ env.wolfssl-version }}'
70-
71-
if (version != 'master') {
72-
return version
73-
}
74-
75-
let { data: commits } = await github.rest.repos.listCommits({
76-
owner: 'wolfSSL',
77-
repo: 'wolfssl',
78-
})
79-
80-
return commits[0].sha
81-
8259
build-cache:
83-
needs:
84-
- setup
8560
runs-on: ubuntu-latest
8661

8762
steps:
@@ -108,7 +83,6 @@ jobs:
10883
id: cache-wolfssl
10984
env:
11085
cache-name: cache-wolfssl
111-
wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
11286
with:
11387
path: /home/runner/wolfssl/build
11488
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
@@ -129,7 +103,7 @@ jobs:
129103
cache-name: cache-ngtcp2
130104
with:
131105
path: /home/runner/ngtcp2/build
132-
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}
106+
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}-${{ env.quictls-version }}-${{ env.gnutls-version }}-${{ env.wolfssl-version }}
133107

134108
- name: cache nghttp2
135109
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
@@ -138,7 +112,7 @@ jobs:
138112
cache-name: cache-nghttp2
139113
with:
140114
path: /home/runner/nghttp2/build
141-
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}
115+
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}-${{ env.quictls-version }}-${{ env.ngtcp2-version }}-${{ env.nghttp3-version }}
142116

143117
- id: settings
144118
if: |
@@ -191,16 +165,10 @@ jobs:
191165
name: 'build gnutls'
192166

193167
- if: steps.cache-wolfssl.outputs.cache-hit != 'true'
194-
env:
195-
wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
196168
run: |
197169
cd $HOME
198-
mkdir wolfssl
170+
git clone --quiet --depth=1 -b v${{ env.wolfssl-version }}-stable https://github.com/wolfSSL/wolfssl.git
199171
cd wolfssl
200-
git init
201-
git remote add origin https://github.com/wolfSSL/wolfssl.git
202-
git fetch origin --depth=1 ${{ env.wolfssl-version }}
203-
git checkout ${{ env.wolfssl-version }}
204172
./autogen.sh
205173
./configure --disable-dependency-tracking --enable-all --enable-quic \
206174
--disable-benchmark --disable-crypttests --disable-examples --prefix=$PWD/build
@@ -215,7 +183,9 @@ jobs:
215183
cd nghttp3
216184
git submodule update --init --depth=1
217185
autoreconf -fi
218-
./configure --disable-dependency-tracking --prefix=$PWD/build PKG_CONFIG_PATH="$PWD/build/lib/pkgconfig" --enable-lib-only
186+
./configure --disable-dependency-tracking --prefix=$PWD/build \
187+
PKG_CONFIG_PATH="$PWD/build/lib/pkgconfig" \
188+
--enable-lib-only
219189
make
220190
make install
221191
name: 'build nghttp3'
@@ -227,7 +197,7 @@ jobs:
227197
cd ngtcp2
228198
autoreconf -fi
229199
./configure --disable-dependency-tracking --prefix=$PWD/build \
230-
PKG_CONFIG_PATH="$PWD/build/lib/pkgconfig:$HOME/quictls/build/lib/pkgconfig:$HOME/gnutls/build/lib/pkgconfig:$HOME/wolfssl/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig" \
200+
PKG_CONFIG_PATH="$HOME/quictls/build/lib/pkgconfig:$HOME/gnutls/build/lib/pkgconfig:$HOME/wolfssl/build/lib/pkgconfig" \
231201
--enable-lib-only --with-openssl --with-gnutls --with-wolfssl
232202
make install
233203
name: 'build ngtcp2'
@@ -239,7 +209,7 @@ jobs:
239209
cd nghttp2
240210
autoreconf -fi
241211
./configure --disable-dependency-tracking --prefix=$PWD/build \
242-
PKG_CONFIG_PATH="$HOME/build/lib/pkgconfig:$HOME/quictls/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig" \
212+
PKG_CONFIG_PATH="$HOME/quictls/build/lib/pkgconfig:$HOME/nghttp3/build/lib/pkgconfig:$HOME/ngtcp2/build/lib/pkgconfig" \
243213
LDFLAGS="-Wl,-rpath,$HOME/quictls/build/lib" \
244214
--enable-http3
245215
make install
@@ -248,7 +218,6 @@ jobs:
248218
linux:
249219
name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
250220
needs:
251-
- setup
252221
- build-cache
253222
runs-on: 'ubuntu-24.04'
254223
timeout-minutes: 45
@@ -359,7 +328,6 @@ jobs:
359328
id: cache-wolfssl
360329
env:
361330
cache-name: cache-wolfssl
362-
wolfssl-version: ${{ needs.setup.outputs.wolfssl-version }}
363331
with:
364332
path: /home/runner/wolfssl/build
365333
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
@@ -382,7 +350,7 @@ jobs:
382350
cache-name: cache-ngtcp2
383351
with:
384352
path: /home/runner/ngtcp2/build
385-
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}
353+
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.ngtcp2-version }}-${{ env.quictls-version }}-${{ env.gnutls-version }}-${{ env.wolfssl-version }}
386354
fail-on-cache-miss: true
387355

388356
- name: cache nghttp2
@@ -392,7 +360,7 @@ jobs:
392360
cache-name: cache-nghttp2
393361
with:
394362
path: /home/runner/nghttp2/build
395-
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}
363+
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.nghttp2-version }}-${{ env.quictls-version }}-${{ env.ngtcp2-version }}-${{ env.nghttp3-version }}
396364
fail-on-cache-miss: true
397365

398366
- name: cache openssl

.github/workflows/linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ env:
4343
# renovate: datasource=github-tags depName=libressl-portable/portable versioning=semver registryUrl=https://github.com
4444
libressl-version: 4.0.0
4545
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
46-
wolfssl-version: 5.7.4
46+
wolfssl-version: 5.7.6
4747
# renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver registryUrl=https://github.com
4848
mbedtls-version: 3.6.2
4949
# renovate: datasource=github-tags depName=nibanks/msh3 versioning=semver registryUrl=https://github.com

CMake/FindLDAP.cmake

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ else()
6363
# On Apple the SDK LDAP gets picked up from
6464
# 'MacOSX.sdk/System/Library/Frameworks/LDAP.framework/Headers', which contains
6565
# ldap.h and lber.h both being stubs to include <ldap.h> and <lber.h>.
66-
# This causes an infinite inclusion loop in compile.
66+
# This causes an infinite inclusion loop in compile. Also do this for libraries
67+
# to avoid picking up the 'ldap.framework' with a full path.
6768
set(_save_cmake_system_framework_path ${CMAKE_SYSTEM_FRAMEWORK_PATH})
6869
set(CMAKE_SYSTEM_FRAMEWORK_PATH "")
6970
find_path(LDAP_INCLUDE_DIR NAMES "ldap.h")
70-
set(CMAKE_SYSTEM_FRAMEWORK_PATH ${_save_cmake_system_framework_path})
7171
find_library(LDAP_LIBRARY NAMES "ldap")
7272
find_library(LDAP_LBER_LIBRARY NAMES "lber")
73+
set(CMAKE_SYSTEM_FRAMEWORK_PATH ${_save_cmake_system_framework_path})
7374

7475
unset(LDAP_VERSION CACHE)
7576
if(LDAP_INCLUDE_DIR AND EXISTS "${LDAP_INCLUDE_DIR}/ldap_features.h")

CMake/FindRustls.cmake

+14-14
Original file line numberDiff line numberDiff line change
@@ -72,35 +72,35 @@ else()
7272
endif()
7373

7474
if(APPLE)
75-
find_library(SECURITY_FRAMEWORK "Security")
75+
find_library(SECURITY_FRAMEWORK NAMES "Security")
7676
mark_as_advanced(SECURITY_FRAMEWORK)
7777
if(NOT SECURITY_FRAMEWORK)
7878
message(FATAL_ERROR "Security framework not found")
7979
endif()
8080
list(APPEND RUSTLS_LIBRARIES "-framework Security")
8181

82-
find_library(FOUNDATION_FRAMEWORK "Foundation")
82+
find_library(FOUNDATION_FRAMEWORK NAMES "Foundation")
8383
mark_as_advanced(FOUNDATION_FRAMEWORK)
8484
if(NOT FOUNDATION_FRAMEWORK)
8585
message(FATAL_ERROR "Foundation framework not found")
8686
endif()
8787
list(APPEND RUSTLS_LIBRARIES "-framework Foundation")
8888
elseif(NOT WIN32)
89-
find_library(_pthread_library "pthread")
90-
if(_pthread_library)
91-
list(APPEND RUSTLS_LIBRARIES "pthread")
89+
find_library(PTHREAD_LIBRARY NAMES "pthread")
90+
if(PTHREAD_LIBRARY)
91+
list(APPEND RUSTLS_LIBRARIES ${PTHREAD_LIBRARY})
9292
endif()
93-
mark_as_advanced(_pthread_library)
93+
mark_as_advanced(PTHREAD_LIBRARY)
9494

95-
find_library(_dl_library "dl")
96-
if(_dl_library)
97-
list(APPEND RUSTLS_LIBRARIES "dl")
95+
find_library(DL_LIBRARY NAMES "dl")
96+
if(DL_LIBRARY)
97+
list(APPEND RUSTLS_LIBRARIES ${DL_LIBRARY})
9898
endif()
99-
mark_as_advanced(_dl_library)
99+
mark_as_advanced(DL_LIBRARY)
100100

101-
find_library(_math_library "m")
102-
if(_math_library)
103-
list(APPEND RUSTLS_LIBRARIES "m")
101+
find_library(MATH_LIBRARY NAMES "m")
102+
if(MATH_LIBRARY)
103+
list(APPEND RUSTLS_LIBRARIES ${MATH_LIBRARY})
104104
endif()
105-
mark_as_advanced(_math_library)
105+
mark_as_advanced(MATH_LIBRARY)
106106
endif()

CMake/FindWolfSSL.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ else()
9191
endif()
9292

9393
if(NOT WIN32)
94-
find_library(_math_library "m")
95-
if(_math_library)
96-
list(APPEND WOLFSSL_LIBRARIES "m") # for log and pow
94+
find_library(MATH_LIBRARY NAMES "m")
95+
if(MATH_LIBRARY)
96+
list(APPEND WOLFSSL_LIBRARIES ${MATH_LIBRARY}) # for log and pow
9797
endif()
98-
mark_as_advanced(_math_library)
98+
mark_as_advanced(MATH_LIBRARY)
9999
endif()

CMake/curl-config.cmake.in

+27-1
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,39 @@ if("@HAVE_LIBZ@")
3939
endif()
4040

4141
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
42-
check_required_components("@PROJECT_NAME@")
4342

4443
# Alias for either shared or static library
4544
if(NOT TARGET @PROJECT_NAME@::libcurl)
4645
add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
4746
endif()
4847

4948
# For compatibility with CMake's FindCURL.cmake
49+
set(CURL_VERSION_STRING "@CURLVERSION@")
5050
set(CURL_LIBRARIES @PROJECT_NAME@::libcurl)
5151
set_and_check(CURL_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
52+
53+
set(CURL_SUPPORTED_PROTOCOLS "@CURL_SUPPORTED_PROTOCOLS_LIST@")
54+
set(CURL_SUPPORTED_FEATURES "@CURL_SUPPORTED_FEATURES_LIST@")
55+
56+
foreach(_item IN LISTS CURL_SUPPORTED_PROTOCOLS CURL_SUPPORTED_FEATURES)
57+
set(CURL_SUPPORTS_${_item} TRUE)
58+
endforeach()
59+
60+
set(_missing_req "")
61+
foreach(_item IN LISTS CURL_FIND_COMPONENTS)
62+
if(CURL_SUPPORTS_${_item})
63+
set(CURL_${_item}_FOUND TRUE)
64+
elseif(CURL_FIND_REQUIRED_${_item})
65+
list(APPEND _missing_req ${_item})
66+
endif()
67+
endforeach()
68+
69+
if(_missing_req)
70+
string(REPLACE ";" " " _missing_req "${_missing_req}")
71+
if(CURL_FIND_REQUIRED)
72+
message(FATAL_ERROR "CURL: missing required components: ${_missing_req}")
73+
endif()
74+
unset(_missing_req)
75+
endif()
76+
77+
check_required_components("@PROJECT_NAME@")

0 commit comments

Comments
 (0)