Merge branch 'master' into bagder/smtp-strparse

This commit is contained in:
Viktor Szakats 2025-12-20 22:07:26 +01:00 committed by GitHub
commit c549ae1dbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3462 changed files with 66812 additions and 70349 deletions

View file

@ -38,28 +38,16 @@ commands:
steps:
- run:
command: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update && sudo apt-get install -y libssh-dev
install-deps:
steps:
- run:
command: |
sudo apt-get update && sudo apt-get install -y libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev python3-pip libpsl-dev
sudo python3 -m pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt
install-wolfssl:
steps:
- run:
command: |
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
WOLFSSL_VERSION=5.8.0
echo "Installing wolfSSL $WOLFSSL_VERSION"
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
--location "https://github.com/wolfSSL/wolfssl/archive/v$WOLFSSL_VERSION-stable.tar.gz" | tar -xz
cd wolfssl-$WOLFSSL_VERSION-stable
./autogen.sh
./configure --disable-dependency-tracking --enable-tls13 --enable-all --enable-harden --prefix=$HOME/wssl
make install
sudo apt-get update && sudo apt-get install -y libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev python3-pip
python3 -m venv ~/venv
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt
configure:
steps:
@ -109,16 +97,24 @@ commands:
build:
steps:
- run: make -j3 V=1
- run: src/curl --disable --version
- run: make -j3 V=1 examples
test:
steps:
- run: make -j3 V=1 test-ci TFLAGS='-j14'
- run:
command: |
source ~/venv/bin/activate
# Revert a CircleCI-specific local setting that makes test 1459
# return 67 (CURLE_LOGIN_DENIED) instead of the
# expected 60 (CURLE_PEER_FAILED_VERIFICATION).
echo 'StrictHostKeyChecking yes' >> ~/.ssh/config
make -j3 V=1 test-ci TFLAGS='-j14'
executors:
ubuntu:
machine:
image: ubuntu-2004:2024.01.1
image: ubuntu-2204:2025.09.1
jobs:
basic:
@ -161,7 +157,7 @@ jobs:
arm:
machine:
image: ubuntu-2004:2024.01.1
image: ubuntu-2204:2025.09.1
resource_class: arm.medium
steps:
- checkout
@ -172,7 +168,7 @@ jobs:
arm-cares:
machine:
image: ubuntu-2004:2024.01.1
image: ubuntu-2204:2025.09.1
resource_class: arm.medium
steps:
- checkout

View file

@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: curl
# https://docs.github.com/code-security/dependabot/working-with-dependabot/dependabot-options-reference
version: 2
updates:
- package-ecosystem: 'github-actions'
@ -11,7 +13,7 @@ updates:
cooldown:
default-days: 7
groups:
actions-deps:
gha-dependencies:
patterns:
- '*'
commit-message:
@ -19,8 +21,8 @@ updates:
- package-ecosystem: 'pip'
directories:
- '/.github/scripts'
- '/tests'
- '.github/scripts'
- 'tests'
schedule:
interval: 'monthly'
cooldown:
@ -29,7 +31,7 @@ updates:
semver-minor-days: 7
semver-patch-days: 3
groups:
actions-deps:
pip-dependencies:
patterns:
- '*'
commit-message:

6
.github/labeler.yml vendored
View file

@ -11,7 +11,7 @@
# the files fit into the category, and the any-glob-to-any-file ones are added
# as long as any file matches. The first ones are for "major" categories (the
# PR is all about that one topic, like HTTP/3), while the second ones are
# "addendums" that give useful information about a PR that's really mostly
# "addendums" that give useful information about a PR that is really mostly
# something else (e.g. CI if the PR also touches CI jobs).
#
# N.B. any-glob-to-all-files is misnamed; it acts like one-glob-to-all-files.
@ -65,7 +65,7 @@ build:
**/*.mk,\
*.m4,\
docs/INSTALL-CMAKE.md,\
lib/curl_config.h.cmake,\
lib/curl_config-cmake.h.in,\
lib/libcurl*.in,\
CMake/**,\
CMakeLists.txt,\
@ -98,7 +98,7 @@ cmake:
**/CMakeLists.txt,\
CMake/**,\
docs/INSTALL-CMAKE.md,\
lib/curl_config.h.cmake,\
lib/curl_config-cmake.h.in,\
tests/cmake/**\
}"

7
.github/scripts/badwords.ok vendored Normal file
View file

@ -0,0 +1,7 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
#
# whitelisted uses of bad words
# file:[line]:rule
docs/FAQ.md::\bwill\b

View file

@ -20,6 +20,29 @@ use warnings;
my @whitelist;
my %alt;
my %exactcase;
my $skip_indented = 1;
if($ARGV[0] eq "-a") {
shift @ARGV;
$skip_indented = 0;
}
my %wl;
if($ARGV[0] eq "-w") {
shift @ARGV;
my $file = shift @ARGV;
open(W, "<$file") or die "Cannot open '$file': $!";
while(<W>) {
if(/^#/) {
# allow #-comments
next;
}
if(/^([^:]*):(\d*):(.*)/) {
$wl{"$1:$2:$3"}=1;
#print STDERR "whitelisted $1:$2:$3\n";
}
}
close(W);
}
my @w;
while(<STDIN>) {
@ -30,7 +53,7 @@ while(<STDIN>) {
if($_ =~ /^---(.*)/) {
push @whitelist, $1;
}
elsif($_ =~ /^([^:=]*)([:=])(.*)/) {
elsif($_ =~ /^(.*)([:=])(.*)/) {
my ($bad, $sep, $better)=($1, $2, $3);
push @w, $bad;
$alt{$bad} = $better;
@ -50,7 +73,7 @@ sub file {
my $in = $_;
$l++;
chomp $in;
if($in =~ /^ /) {
if($skip_indented && $in =~ /^ /) {
next;
}
# remove the link part
@ -67,8 +90,22 @@ sub file {
($in =~ /^(.*)$w/ && $case) ) {
my $p = $1;
my $c = length($p)+1;
my $ch = "$f:$l:$w";
if($wl{$ch}) {
# whitelisted filename + line + word
print STDERR "$ch found but whitelisted\n";
next;
}
$ch = $f . "::" . $w;
if($wl{$ch}) {
# whitelisted filename + word
print STDERR "$ch found but whitelisted\n";
next;
}
print STDERR "$f:$l:$c: error: found bad word \"$w\"\n";
printf STDERR " %4d | $in\n", $l;
printf STDERR " %4d | %s\n", $l, $in;
printf STDERR " | %*s^%s\n", length($p), " ",
"~" x (length($w)-1);
printf STDERR " maybe use \"%s\" instead?\n", $alt{$w};
@ -79,9 +116,11 @@ sub file {
close(F);
}
my @files = @ARGV;
foreach my $each (@files) {
my @filemasks = @ARGV;
open(my $git_ls_files, '-|', 'git', 'ls-files', '--', @filemasks) or die "Failed running git ls-files: $!";
while(my $each = <$git_ls_files>) {
chomp $each;
file($each);
}
close $git_ls_files;
exit $errors;

View file

@ -3,74 +3,93 @@
# SPDX-License-Identifier: curl
#
back-end:backend
e-mail:email
\be-mail[^/]:email
run-time:runtime
set-up:setup
tool chain:toolchain
tool-chain:toolchain
wild-card:wildcard
wild card:wildcard
\bthread ?safe[^."t]:thread-safe
\bthread ?unsafe[^."t]:thread-unsafe
multi ?thread:multi-thread
\bit's:it is
aren't:are not
can't:cannot
could've:could have
couldn't:could not
didn't:did not
doesn't:does not
don't:do not
haven't:have not
i'd:I would
i'll:I will
i'm:I am
you've:You have
we've:we have
we're:we are
we'll:we will
we'd:we would
they've:They have
they're:They are
they'll:They will
i've:I have
isn't:is not
it'd:it would
it'll:it will
might've:might have
needn't:need not
should've:should have
shouldn't:should not
that's:that is
there's:there is
they'd:They would
you've:you have
they'll:They will
they're:They are
they've:They have
this'll:this will
wasn't:was not
we'd:we would
we'll:we will
we're:we are
we've:we have
weren't:were not
won't:will not
would've:would have
wouldn't:would not
you'd:you would
you'll:you will
you're:you are
should've:should have
don't=do not
could've:could have
doesn't:does not
isn't:is not
aren't:are not
you've:you have
a html: an html
a http: an http
a ftp: an ftp
a IPv4: an IPv4
a IPv6: an IPv6
url =URL
internet\b=Internet
url [^=]=URL
[^/]internet\b=Internet
isation:ization
\bit's:it is
it'd:it would
there's:there is
[^.]\. And: Rewrite it somehow?
^(And|So|But) = Rewrite it somehow?
\. But: Rewrite it somehow?
\. So : Rewrite without "so" ?
dir :directory
dir [^=]=directory
Dir [^=]=Directory
sub-director:subdirector
can't:cannot
that's:that is
web page:webpage
host name\b:hostname
host names\b:hostnames
file name\b:filename
[^;<]file name\b:filename
file names\b:filenames
\buser name\b:username
\buser names\b:usernames
\bpass phrase:passphrase
didn't:did not
doesn't:does not
won't:will not
couldn't:could not
\bwill\b:rewrite to present tense
\b32bit=32-bit
\b64bit=64-bit
32 bit\b=32-bit
64 bit\b=64-bit
\b32bit:32-bit
\b64bit:64-bit
32 bit\b:32-bit
64 bit\b:64-bit
64-bits:64 bits or 64-bit
32-bits:32 bits or 32-bit
\bvery\b:rephrase using an alternative word
\bCurl\b=curl
\bcURL\b=curl
\bLibcurl\b=libcurl
\bLibCurl\b=libcurl
---WWW::Curl
---NET::Curl
---Curl Corporation
\bmanpages[^./;=&{:-]:man pages
\bmanpage[^si./;=&{:-]:man page

View file

@ -16,7 +16,7 @@ use warnings;
my @asyms;
open(S, "<./docs/libcurl/symbols-in-versions")
|| die "can't find symbols-in-versions";
|| die "cannot find symbols-in-versions";
while(<S>) {
if(/^([^ ]*) /) {
push @asyms, $1;
@ -30,7 +30,7 @@ my @aopts = (
);
open(O, "<./docs/options-in-versions")
|| die "can't find options-in-versions";
|| die "cannot find options-in-versions";
while(<O>) {
chomp;
if(/^([^ ]+)/) {
@ -50,7 +50,7 @@ while(<O>) {
close(O);
open(C, "<./.github/scripts/spellcheck.curl")
|| die "can't find spellcheck.curl";
|| die "cannot find spellcheck.curl";
while(<C>) {
if(/^\#/) {
next;
@ -99,7 +99,7 @@ sub process {
# *italics*
$l =~ s/\*(\S.*?)\*//g;
# strip out https URLs, we don't want them spellchecked
# strip out https URLs, we do not want them spellchecked
$l =~ s!https://[a-z0-9\#_/.-]+!!gi;
$out .= $l;
@ -119,6 +119,10 @@ sub process {
}
}
for my $f (@ARGV) {
my @filemasks = @ARGV;
open(my $git_ls_files, '-|', 'git', 'ls-files', '--', @filemasks) or die "Failed running git ls-files: $!";
while(my $f = <$git_ls_files>) {
chomp $f;
process($f);
}
close $git_ls_files;

View file

@ -68,7 +68,6 @@ my %remove = (
'#define HAVE_OPENSSL_PEM_H 1' => 1,
'#define HAVE_OPENSSL_RSA_H 1' => 1,
'#define HAVE_OPENSSL_SSL_H 1' => 1,
'#define HAVE_OPENSSL_X509_H 1' => 1,
'#define HAVE_QUICHE_H 1' => 1,
'#define HAVE_SSL_SET_QUIC_TLS_CBS 1' => 1,
'#define HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT 1' => 1,
@ -136,6 +135,5 @@ foreach my $v (keys %remove) {
}
}
# return the exit code from diff
exit system("diff -u /tmp/autotools /tmp/cmake") >> 8;

View file

@ -7,7 +7,7 @@ bu
clen
CNA
hel
htpt
htpts
inout
PASE
passwor

View file

@ -7,7 +7,7 @@ set -eu
cd "$(dirname "${0}")"/../..
# shellcheck disable=SC2046
git ls-files -z | xargs -0 -r \
codespell \
--skip '.github/scripts/pyspelling.words' \
--skip '.github/scripts/typos.toml' \
@ -16,4 +16,4 @@ codespell \
--skip 'scripts/wcurl' \
--ignore-regex '.*spellchecker:disable-line' \
--ignore-words '.github/scripts/codespell-ignore.words' \
$(git ls-files)
--

View file

@ -53,6 +53,7 @@ axTLS
backend
backends
backoff
backtick
backticks
balancers
Baratov
@ -149,7 +150,6 @@ CSeq
csh
cshrc
CTRL
cURL
CURLcode
curldown
CURLE
@ -172,8 +172,10 @@ dbg
Debian
DEBUGBUILD
decrypt
decrypted
decrypting
deepcode
defacto
DELE
DER
dereference
@ -202,6 +204,7 @@ DLLs
DNS
dns
dnsop
DNSSEC
DoH
DoT
doxygen
@ -215,6 +218,7 @@ dynbuf
EAGAIN
EBCDIC
ECC
ECCN
ECDHE
ECH
ECHConfig
@ -245,6 +249,7 @@ et
etag
ETag
ETags
exa
exe
executables
EXPN
@ -258,6 +263,7 @@ Fedora
Feltzing
ffi
filesize
filesystem
FindCURL
FLOSS
fnmatch
@ -299,6 +305,7 @@ Ghedini
giga
Gisle
Glesys
glibc
globbed
globbing
gmail
@ -380,6 +387,7 @@ imap
IMAPS
imaps
impacket
implementers
init
initializer
inlined
@ -418,6 +426,7 @@ kerberos
Keychain
keychain
KiB
kibibyte
kickstart
Kirei
Knauf
@ -432,7 +441,9 @@ ldap
LDAPS
ldaps
LF
LGPL
LGTM
libbacktrace
libbrotlidec
libc
libcurl
@ -462,6 +473,7 @@ libWebSocket
libz
libzstd
LineageOS
linter
linux
lldb
ln
@ -492,6 +504,7 @@ Mavrogiannopoulos
Mbed
mbedTLS
md
mebibyte
Meglio
memdebug
MesaLink
@ -564,6 +577,7 @@ Necko
NetBSD
netrc
netstat
NetWare
Netware
NFS
nghttp
@ -707,6 +721,7 @@ ROADMAP
Roadmap
Rockbox
roffit
RPC
RPG
RR
RRs
@ -794,6 +809,7 @@ sprintf
src
SRP
SRWLOCK
SSI
SSL
ssl
SSLeay
@ -889,6 +905,7 @@ UI
UID
UIDL
Ultrix
umask
Unary
unassign
UNC
@ -954,12 +971,13 @@ watchOS
WAV
WB
wcurl
web page
WebDAV
WebOS
webpage
webpages
WebSocket
WEBSOCKET
Wget
WHATWG
whitespace
Whitespaces
@ -978,7 +996,9 @@ www
Xbox
XDG
xdigit
XHTML
Xilinx
xmllint
XP
Xtensa
XYZ

View file

@ -30,4 +30,4 @@ matrix:
- 'strong'
- 'em'
sources:
- '**/*.md|!docs/BINDINGS.md|!docs/DISTROS.md|!docs/CIPHERS-TLS12.md|!docs/wcurl.md'
- '**/*.md|!docs/BINDINGS.md|!docs/DISTROS.md|!docs/CIPHERS-TLS12.md|!docs/wcurl.md|!tests/data/data*.md'

View file

@ -116,7 +116,6 @@ my %commonrc = (
'26' => 1,
);
sub runone {
my $a;
my $nargs = getnum(60) + 1;

View file

@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: curl
pyspelling==2.11
pyspelling==2.12.1

View file

@ -2,4 +2,4 @@
#
# SPDX-License-Identifier: curl
test* -crlf
proselint==0.16.0

View file

@ -5,5 +5,5 @@
cmakelang==0.6.13
codespell==2.4.1
pytype==2024.10.11
reuse==6.1.2
ruff==0.14.1
reuse==6.2.0
ruff==0.14.9

View file

@ -3,7 +3,11 @@
#
# SPDX-License-Identifier: curl
# shellcheck disable=SC2046
shellcheck --exclude=1091 \
set -eu
cd "$(dirname "${0}")"/../..
git grep -z -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' | xargs -0 -r \
shellcheck --exclude=1091,2248 \
--enable=avoid-nullary-conditions,deprecate-which \
$(grep -l -E '^#!(/usr/bin/env bash|/bin/sh|/bin/bash)' $(git ls-files))
--

View file

@ -31,10 +31,7 @@ my @tabs = (
"Makefile\\.(am|example)\$",
"/mkfile",
"\\.sln\$",
"^tests/data/test",
);
my @mixed_eol = (
"^tests/data/data1706-stdout.txt",
"^tests/data/test",
);
@ -42,8 +39,11 @@ my @need_crlf = (
"\\.(bat|sln)\$",
);
my @space_at_eol = (
my @double_empty_lines = (
"^lib/.+\\.(c|h)\$",
"^packages/",
"^tests/data/test",
"\\.(m4|py)\$",
);
my @non_ascii_allowed = (
@ -96,41 +96,38 @@ sub eol_detect {
my $issues = 0;
open my $git_ls_files, '-|', 'git ls-files' or die "Failed running git ls-files: $!";
open(my $git_ls_files, '-|', 'git ls-files') or die "Failed running git ls-files: $!";
while(my $filename = <$git_ls_files>) {
chomp $filename;
open my $fh, '<', $filename or die "Cannot open '$filename': $!";
open(my $fh, '<', $filename) or die "Cannot open '$filename': $!";
my $content = do { local $/; <$fh> };
close $fh;
my @err = ();
if(!fn_match($filename, @tabs) &&
$content =~ /\t/) {
$content =~ /\t/) {
push @err, "content: has tab";
}
my $eol = eol_detect($content);
if($eol eq "" &&
!fn_match($filename, @mixed_eol)) {
if($eol eq "") {
push @err, "content: has mixed EOL types";
}
if($eol ne "crlf" &&
fn_match($filename, @need_crlf)) {
fn_match($filename, @need_crlf)) {
push @err, "content: must use CRLF EOL for this file type";
}
if($eol ne "lf" && $content ne "" &&
!fn_match($filename, @need_crlf) &&
!fn_match($filename, @mixed_eol)) {
!fn_match($filename, @need_crlf)) {
push @err, "content: must use LF EOL for this file type";
}
if(!fn_match($filename, @space_at_eol) &&
$content =~ /[ \t]\n/) {
if($content =~ /[ \t]\n/) {
my $line;
for my $l (split(/\n/, $content)) {
$line++;
@ -141,20 +138,27 @@ while(my $filename = <$git_ls_files>) {
}
if($content ne "" &&
$content !~ /\n\z/) {
$content !~ /\n\z/) {
push @err, "content: has no EOL at EOF";
}
if($content =~ /\n\n\z/ ||
$content =~ /\r\n\r\n\z/) {
$content =~ /\r\n\r\n\z/) {
push @err, "content: has multiple EOL at EOF";
}
if($content =~ /\n\n\n\n/ ||
$content =~ /\r\n\r\n\r\n\r\n/) {
$content =~ /\r\n\r\n\r\n\r\n/) {
push @err, "content: has 3 or more consecutive empty lines";
}
if(!fn_match($filename, @double_empty_lines)) {
if($content =~ /\n\n\n/ ||
$content =~ /\r\n\r\n\r\n/) {
push @err, "content: has 2 consecutive empty lines";
}
}
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
push @err, "content: has binary contents";
}

View file

@ -4,12 +4,12 @@
[default]
extend-ignore-identifiers-re = [
"^(ba|pn|PN|UE)$",
"^(ba|fo|pn|PN|UE)$",
"^(CNA|ser)$",
"^(ECT0|ECT1|HELO|htpt|PASE)$",
"^(ECT0|ECT1|HELO|htpts|PASE)$",
"^[A-Za-z0-9_-]*(EDE|GOST)[A-Z0-9_-]*$", # ciphers
"^0x[0-9a-fA-F]+FUL$", # unsigned long hex literals ending with 'F'
"^(eyeballers|HELO_smtp|optin|passin|perfec|SMTP_HELO)$",
"^(eyeballers|HELO_smtp|Januar|optin|passin|perfec|SMTP_HELO)$",
"^(clen|req_clen|smtp_perform_helo|smtp_state_helo_resp|Tru64|_stati64)$",
"secur32",
"proxys", # this should be limited to tests/http/*. Short for secure proxy.

View file

@ -39,7 +39,6 @@ sub testcompile {
return $rc;
}
sub extract {
my($f) = @_;
my $syn = 0;

View file

@ -5,9 +5,11 @@
set -eu
# shellcheck disable=SC2046
cd "$(dirname "${0}")"/../..
git ls-files '*.yaml' '*.yml' -z | xargs -0 -r \
yamllint \
--format standard \
--strict \
--config-data "$(dirname "$0")/yamlcheck.yaml" \
$(git ls-files '*.yaml' '*.yml')
--config-data .github/scripts/yamlcheck.yaml \
--

2
.github/stale.yml vendored
View file

@ -6,7 +6,7 @@
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
# Issues with these labels are never considered stale
exemptLabels:
- pinned
- security

View file

@ -14,8 +14,8 @@ name: 'Docs'
- '*/ci'
paths:
- '.github/workflows/checkdocs.yml'
- '.github/scripts/mdlinkcheck'
- '/scripts/**'
- '.github/scripts/**'
- 'scripts/**'
- '**.md'
- 'docs/*'
pull_request:
@ -24,7 +24,7 @@ name: 'Docs'
paths:
- '.github/workflows/checkdocs.yml'
- '.github/scripts/**'
- '.github/scripts/mdlinkcheck'
- 'scripts/**'
- '**.md'
- 'docs/*'
@ -35,83 +35,68 @@ concurrency:
permissions: {}
jobs:
# proselint:
# name: 'proselint'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# with:
# persist-credentials: false
#
# - name: 'install prereqs'
# run: |
# sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
# sudo apt-get -o Dpkg::Use-Pty=0 update
# sudo rm -f /var/lib/man-db/auto-update
# sudo apt-get -o Dpkg::Use-Pty=0 install python3-proselint
#
# # config file help: https://github.com/amperser/proselint/
# - name: 'create proselint config'
# run: |
# cat <<JSON > ~/.proselintrc.json
# {
# "checks": {
# "typography.diacritical_marks": false,
# "typography.symbols": false,
# "annotations.misc": false,
# "security.password": false,
# "misc.annotations": false
# }
# }
# JSON
#
# - name: 'trim headers off all *.md files'
# run: git ls-files -z '*.md' | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
#
# - name: 'check prose'
# run: git ls-files -z '*.md' | grep -Evz 'CHECKSRC\.md|DISTROS\.md|curl_mprintf\.md|CURLOPT_INTERFACE\.md|interface\.md' | xargs -0 proselint -- README
#
# # This is for CHECKSRC and files with aggressive exclamation mark needs
# - name: 'create second proselint config'
# run: |
# cat <<JSON > ~/.proselintrc.json
# {
# "checks": {
# "typography.diacritical_marks": false,
# "typography.symbols": false,
# "typography.exclamation": false,
# "lexical_illusions.misc": false,
# "annotations.misc": false
# }
# }
# JSON
#
# - name: 'check special prose'
# run: proselint docs/internals/CHECKSRC.md docs/libcurl/curl_mprintf.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
linkcheck:
name: 'linkcheck'
# config file help: https://github.com/amperser/proselint/
proselint:
name: 'proselint'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'mdlinkcheck'
run: ./scripts/mdlinkcheck
- name: 'install prereqs'
run: |
python3 -m venv ~/venv
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-proselint.txt
- name: 'trim headers off all *.md files'
run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl
- name: 'check prose'
run: |
cat <<JSON > ~/.proselintrc.json
{
"checks": {
"annotations.misc": false,
"lexical_illusions": false,
"misc.annotations": false,
"redundancy.misc.garner": false,
"security.password": false,
"spelling.ve_of": false,
"typography.diacritical_marks": false,
"typography.symbols": false
}
}
JSON
source ~/venv/bin/activate
git ls-files README '*.md' -z | grep -Evz '(CHECKSRC|DISTROS|CURLOPT_INTERFACE|interface)\.md' | xargs -0 proselint check --
- name: 'check special prose' # For CHECKSRC and files with aggressive exclamation mark needs
run: |
cat <<JSON > ~/.proselintrc.json
{
"checks": {
"annotations.misc": false,
"lexical_illusions": false,
"typography.diacritical_marks": false,
"typography.punctuation.exclamation": false,
"typography.symbols": false
}
}
JSON
source ~/venv/bin/activate
proselint check docs/internals/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md
pyspelling:
name: 'pyspelling'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'trim all *.md files in docs/'
run: |
# shellcheck disable=SC2046
.github/scripts/cleancmd.pl $(find docs -name '*.md')
run: .github/scripts/cleancmd.pl 'docs/*.md'
- name: 'install'
run: |
@ -135,14 +120,12 @@ jobs:
name: 'badwords, synopsis'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'badwords'
run: |
# shellcheck disable=SC2046
.github/scripts/badwords.pl < .github/scripts/badwords.txt $(git ls-files '**.md') docs/TODO docs/KNOWN_BUGS packages/OS400/README.OS400
run: .github/scripts/badwords.pl -w .github/scripts/badwords.ok '**.md' packages/OS400/README.OS400 < .github/scripts/badwords.txt
- name: 'verify synopsis'
run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md
@ -151,7 +134,7 @@ jobs:
name: 'man-examples'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -163,7 +146,7 @@ jobs:
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

View file

@ -16,7 +16,6 @@ name: 'Source'
- 'appveyor.*'
- 'Dockerfile'
- 'plan9/**'
- 'tests/data/**'
pull_request:
branches:
- master
@ -25,7 +24,6 @@ name: 'Source'
- 'appveyor.*'
- 'Dockerfile'
- 'plan9/**'
- 'tests/data/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@ -38,7 +36,7 @@ jobs:
name: 'checksrc'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -49,7 +47,7 @@ jobs:
name: 'spellcheck, linters, REUSE'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -73,6 +71,7 @@ jobs:
.github/scripts/codespell.sh
- name: 'typos'
timeout-minutes: 2
run: |
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install typos-cli
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
@ -91,7 +90,7 @@ jobs:
- name: 'pytype'
run: |
source ~/venv/bin/activate
find . -name '*.py' -exec pytype -j auto -k {} +
find . -name '*.py' -exec pytype -j auto -k -- {} +
- name: 'ruff'
run: |
@ -103,10 +102,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: 'install pmccabe'
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
@ -115,18 +110,43 @@ jobs:
sudo apt-get -o Dpkg::Use-Pty=0 install \
pmccabe
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'check scores'
run: ./scripts/top-complexity
xmllint:
name: 'xmllint'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: 'install prereqs'
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get -o Dpkg::Use-Pty=0 update
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install \
libxml2-utils
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'check'
run: git grep -z -i -l -E '^<\?xml' | xargs -0 -r xmllint --output /dev/null
miscchecks:
name: 'misc checks'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'install prereqs'
run: HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install shellcheck zizmor
timeout-minutes: 2
run: HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install actionlint shellcheck zizmor
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -137,6 +157,13 @@ jobs:
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
zizmor --pedantic .github/workflows/*.yml .github/dependabot.yml
- name: 'actionlint'
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export SHELLCHECK_OPTS='--exclude=1090,1091,2086,2153 --enable=avoid-nullary-conditions,deprecate-which'
actionlint --version
actionlint --ignore matrix .github/workflows/*.yml
- name: 'shellcheck CI'
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
@ -155,9 +182,7 @@ jobs:
- name: 'yamlcheck'
run: .github/scripts/yamlcheck.sh
# we allow some extra in source code
- name: 'badwords'
run: |
# shellcheck disable=SC2046
grep -Ev '(\\bwill| url | dir )' .github/scripts/badwords.txt | \
.github/scripts/badwords.pl $(git ls-files -- src lib include)
# we allow some extra in source code
grep -Ev '(\\bwill| But: | So : )' .github/scripts/badwords.txt | .github/scripts/badwords.pl -a src lib include docs/examples

40
.github/workflows/checkurls.yml vendored Normal file
View file

@ -0,0 +1,40 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: 'URLs'
'on':
push:
branches:
- master
- '*/ci'
pull_request:
branches:
- master
schedule:
- cron: '10 5 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
linkcheck:
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
name: 'linkcheck'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'mdlinkcheck (dry run)'
if: ${{ github.event_name != 'schedule' }}
run: ./scripts/mdlinkcheck --dry-run
- name: 'mdlinkcheck'
if: ${{ github.event_name == 'schedule' }}
run: ./scripts/mdlinkcheck

View file

@ -39,25 +39,27 @@ permissions: {}
jobs:
gha_python:
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
name: 'GHA and Python'
runs-on: ubuntu-latest
permissions:
security-events: write # To create/update security events
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'initialize'
uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
with:
languages: actions, python
queries: security-extended
- name: 'perform analysis'
uses: github/codeql-action/analyze@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
uses: github/codeql-action/analyze@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
c:
if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }}
name: 'C'
runs-on: ${{ matrix.platform == 'Linux' && 'ubuntu-latest' || 'windows-2022' }}
permissions:
@ -80,12 +82,12 @@ jobs:
libnghttp2-dev libldap-dev libkrb5-dev librtmp-dev libgnutls28-dev libwolfssl-dev
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install c-ares gsasl libnghttp3 libngtcp2 mbedtls rustls-ffi
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'initialize'
uses: github/codeql-action/init@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
uses: github/codeql-action/init@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
with:
languages: cpp
build-mode: manual
@ -106,29 +108,27 @@ jobs:
# MultiSSL
export PKG_CONFIG_PATH; PKG_CONFIG_PATH="$(brew --prefix c-ares)/lib/pkgconfig:$(brew --prefix mbedtls)/lib/pkgconfig:$(brew --prefix rustls-ffi)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig"
cmake -B _bld1 -G Ninja -DENABLE_DEBUG=ON \
cmake -B _bld1 -G Ninja -DCURL_DISABLE_TYPECHECK=ON -DENABLE_DEBUG=ON \
-DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DCURL_USE_WOLFSSL=ON \
-DUSE_LIBRTMP=ON -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON -DUSE_ECH=ON -DENABLE_ARES=ON \
-DCURL_DISABLE_VERBOSE_STRINGS=ON
cmake --build _bld1
cmake --build _bld1 --target curlinfo
cmake --build _bld1 --target servers
cmake --build _bld1 --target tunits
cmake --build _bld1 --target units
cmake --build _bld1 --target testdeps
cmake --build _bld1 --target curl-examples-build
# HTTP/3
export PKG_CONFIG_PATH; PKG_CONFIG_PATH="$(brew --prefix libnghttp3)/lib/pkgconfig:$(brew --prefix libngtcp2)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig"
cmake -B _bld2 -G Ninja \
cmake -B _bld2 -G Ninja -DCURL_DISABLE_TYPECHECK=ON \
-DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DUSE_NGTCP2=ON \
-DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON \
-DUSE_LIBRTMP=ON -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON
cmake --build _bld2
cmake --build _bld2 --target servers
cmake --build _bld2 --target testdeps
cmake --build _bld2 --target curl-examples-build
_bld1/src/curl --disable --version
_bld2/src/curl --disable --version
fi
- name: 'perform analysis'
uses: github/codeql-action/analyze@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
uses: github/codeql-action/analyze@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8

View file

@ -12,7 +12,7 @@ name: 'configure-vs-cmake'
- '**/*.m4'
- '**/CMakeLists.txt'
- 'CMake/**'
- 'lib/curl_config.h.cmake'
- 'lib/curl_config-cmake.h.in'
- 'tests/cmake/**'
- '.github/scripts/cmp-config.pl'
- '.github/workflows/configure-vs-cmake.yml'
@ -25,7 +25,7 @@ name: 'configure-vs-cmake'
- '**/*.m4'
- '**/CMakeLists.txt'
- 'CMake/**'
- 'lib/curl_config.h.cmake'
- 'lib/curl_config-cmake.h.in'
- 'tests/cmake/**'
- '.github/scripts/cmp-config.pl'
- '.github/workflows/configure-vs-cmake.yml'
@ -41,7 +41,7 @@ jobs:
name: 'Linux'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -81,6 +81,7 @@ jobs:
runs-on: macos-latest
steps:
- name: 'install packages'
timeout-minutes: 2
run: |
# shellcheck disable=SC2181,SC2034
while [[ $? == 0 ]]; do for i in 1 2 3; do if brew update && brew install automake libtool; then break 2; else echo Error: wait to try again; sleep 10; fi; done; false Too many retries; done
@ -88,7 +89,7 @@ jobs:
- name: 'toolchain versions'
run: echo '::group::brew packages installed'; ls -l /opt/homebrew/opt; echo '::endgroup::'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -137,7 +138,7 @@ jobs:
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

View file

@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -103,7 +103,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -132,7 +132,7 @@ jobs:
env:
CW_JOBS: '4'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -150,7 +150,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -159,7 +159,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/curl/curl-for-win
mv curl-for-win/* .
export CW_CONFIG='-main-werror-unitybatch-win-x64'
export CW_CONFIG='-main-werror-unitybatch-win-x64-noWINE'
export CW_REVISION="${GITHUB_SHA}"
. ./_versions.sh
sudo podman image trust set --type reject default
@ -177,7 +177,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
path: 'curl'
@ -186,7 +186,7 @@ jobs:
run: |
git clone --depth 1 https://github.com/curl/curl-for-win
mv curl-for-win/* .
export CW_CONFIG='-main-werror-unitybatch-win-x64-gcc-zlibold'
export CW_CONFIG='-main-werror-unitybatch-win-x64-gcc-zlibold-noWINE'
export CW_REVISION="${GITHUB_SHA}"
. ./_versions.sh
sudo podman image trust set --type reject default

View file

@ -20,6 +20,7 @@ concurrency:
permissions: {}
env:
CURL_TEST_MIN: 1450
MAKEFLAGS: -j 5
jobs:
@ -28,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -49,7 +50,7 @@ jobs:
- name: 'maketgz'
run: SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: 'release-tgz'
path: 'curl-99.98.97.tar.gz'
@ -75,7 +76,7 @@ jobs:
timeout-minutes: 10
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -99,7 +100,7 @@ jobs:
timeout-minutes: 10
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -125,7 +126,7 @@ jobs:
timeout-minutes: 10
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -149,7 +150,7 @@ jobs:
timeout-minutes: 10
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -170,7 +171,7 @@ jobs:
timeout-minutes: 5
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -192,7 +193,7 @@ jobs:
timeout-minutes: 5
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -214,11 +215,11 @@ jobs:
timeout-minutes: 5
needs: maketgz-and-verify-in-tree
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: 'release-tgz'
@ -230,7 +231,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -267,7 +268,7 @@ jobs:
matrix:
image: [ubuntu-latest, macos-latest, windows-2022]
steps:
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
if: ${{ contains(matrix.image, 'windows') }}
with:
msystem: mingw64
@ -279,6 +280,7 @@ jobs:
mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd mingw-w64-x86_64-libpsl mingw-w64-x86_64-libssh2 mingw-w64-x86_64-nghttp2 mingw-w64-x86_64-openssl
- name: 'install prereqs'
timeout-minutes: 3
run: |
if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then
cd ~
@ -302,7 +304,7 @@ jobs:
printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-Darwin-x86_64/CMake.app/Contents/bin/cmake > ~/old-cmake-path.txt
fi
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false

View file

@ -38,22 +38,25 @@ permissions: {}
env:
MAKEFLAGS: -j 5
CURL_CI: github
CURL_TEST_MIN: 1600
# handled in renovate.json
OPENSSL_VERSION: 3.6.0
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
LIBRESSL_VERSION: 4.2.0
LIBRESSL_VERSION: 4.2.1
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
AWSLC_VERSION: 1.61.4
AWSLC_VERSION: 1.65.1
# renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com
BORINGSSL_VERSION: 0.20251002.0
# renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver registryUrl=https://github.com
GNUTLS_VERSION: 3.8.10
BORINGSSL_VERSION: 0.20251124.0
# renovate: datasource=github-tags depName=gnutls/nettle versioning=semver registryUrl=https://github.com
NETTLE_VERSION: 3.10.2
# renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver extractVersion=^nettle_?(?<version>.+)_release_.+$ registryUrl=https://github.com
GNUTLS_VERSION: 3.8.11
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
WOLFSSL_VERSION: 5.8.2
WOLFSSL_VERSION: 5.8.4
# renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com
NGHTTP3_VERSION: 1.12.0
NGHTTP3_VERSION: 1.13.1
# renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com
NGTCP2_VERSION: 1.17.0
NGTCP2_VERSION: 1.18.0
# renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
NGHTTP2_VERSION: 1.68.0
# renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com
@ -66,7 +69,7 @@ jobs:
steps:
- name: 'cache openssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-openssl-http3-no-deprecated
env:
cache-name: cache-openssl-http3-no-deprecated
@ -75,7 +78,7 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }}
- name: 'cache libressl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-libressl
env:
cache-name: cache-libressl
@ -84,7 +87,7 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
- name: 'cache awslc'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-awslc
env:
cache-name: cache-awslc
@ -93,7 +96,7 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }}
- name: 'cache boringssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-boringssl
env:
cache-name: cache-boringssl
@ -101,17 +104,26 @@ jobs:
path: ~/boringssl/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }}
- name: 'cache nettle'
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nettle
env:
cache-name: cache-nettle
with:
path: ~/nettle/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }}
- name: 'cache gnutls'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-gnutls
env:
cache-name: cache-gnutls
with:
path: ~/gnutls/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }}
- name: 'cache wolfssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-wolfssl
env:
cache-name: cache-wolfssl
@ -120,7 +132,7 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }}
- name: 'cache nghttp3'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nghttp3
env:
cache-name: cache-nghttp3
@ -129,16 +141,16 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP3_VERSION }}
- name: 'cache ngtcp2'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-ngtcp2
env:
cache-name: cache-ngtcp2
with:
path: ~/ngtcp2/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}
- name: 'cache ngtcp2 boringssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-ngtcp2-boringssl
env:
cache-name: cache-ngtcp2-boringssl
@ -147,7 +159,7 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.BORINGSSL_VERSION }}
- name: 'cache nghttp2'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nghttp2
env:
cache-name: cache-nghttp2
@ -161,6 +173,7 @@ jobs:
steps.cache-libressl.outputs.cache-hit != 'true' ||
steps.cache-awslc.outputs.cache-hit != 'true' ||
steps.cache-boringssl.outputs.cache-hit != 'true' ||
steps.cache-nettle.outputs.cache-hit != 'true' ||
steps.cache-gnutls.outputs.cache-hit != 'true' ||
steps.cache-wolfssl.outputs.cache-hit != 'true' ||
steps.cache-nghttp3.outputs.cache-hit != 'true' ||
@ -181,7 +194,7 @@ jobs:
libbrotli-dev libzstd-dev zlib1g-dev \
libev-dev \
libc-ares-dev \
nettle-dev libp11-kit-dev autopoint bison gperf gtk-doc-tools libtasn1-bin # for GnuTLS
libp11-kit-dev autopoint bison gperf gtk-doc-tools libtasn1-bin # for GnuTLS
echo 'CC=gcc-12' >> "$GITHUB_ENV"
echo 'CXX=g++-12' >> "$GITHUB_ENV"
@ -189,7 +202,7 @@ jobs:
if: ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
cd openssl
./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated
make
@ -228,26 +241,37 @@ jobs:
cmake --build .
cmake --install .
- name: 'build nettle'
if: ${{ steps.cache-nettle.outputs.cache-hit != 'true' }}
run: |
cd ~
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
--location "https://ftpmirror.gnu.org/nettle/nettle-${NETTLE_VERSION}.tar.gz" | tar -xz
cd "nettle-${NETTLE_VERSION}"
./configure --disable-dependency-tracking --prefix=/home/runner/nettle/build \
--disable-silent-rules --disable-static --disable-openssl --disable-documentation
make install
- name: 'build gnutls'
if: ${{ steps.cache-gnutls.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "${GNUTLS_VERSION}" https://github.com/gnutls/gnutls.git
cd gnutls
# required: nettle-dev libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin
./bootstrap
./configure --disable-dependency-tracking --prefix="$PWD"/build \
LDFLAGS="-Wl,-rpath,$PWD/build/lib -L$PWD/build/lib" \
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
"https://www.gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_VERSION%.*}/gnutls-${GNUTLS_VERSION}.tar.xz" | tar -xJ
cd "gnutls-${GNUTLS_VERSION}"
# required: libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin
./configure --disable-dependency-tracking --prefix=/home/runner/gnutls/build \
PKG_CONFIG_PATH=/home/runner/nettle/build/lib64/pkgconfig \
LDFLAGS=-Wl,-rpath,/home/runner/nettle/build/lib64 \
--with-included-libtasn1 --with-included-unistring \
--disable-guile --disable-doc --disable-tests --disable-tools
make
make install
- name: 'build wolfssl'
if: ${{ steps.cache-wolfssl.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl.git
git clone --quiet --depth 1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl
cd wolfssl
./autogen.sh
./configure --disable-dependency-tracking --enable-all --enable-quic \
@ -259,9 +283,9 @@ jobs:
if: ${{ steps.cache-nghttp3.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3
git clone --quiet --depth 1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3
cd nghttp3
git submodule update --init --depth=1
git submodule update --init --depth 1
autoreconf -fi
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only
make
@ -272,7 +296,7 @@ jobs:
# building twice to get crypto libs for ossl, libressl and awslc installed
run: |
cd ~
git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2
git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -fi
./configure --disable-dependency-tracking --prefix="$PWD"/build \
@ -280,7 +304,7 @@ jobs:
make install
make clean
./configure --disable-dependency-tracking --prefix="$PWD"/build \
PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/wolfssl/build/lib/pkgconfig \
PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig:/home/runner/nettle/build/lib64/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/wolfssl/build/lib/pkgconfig \
--enable-lib-only --with-openssl --with-gnutls --with-wolfssl --with-boringssl \
BORINGSSL_LIBS='-L/home/runner/awslc/build/lib -lssl -lcrypto' \
BORINGSSL_CFLAGS='-I/home/runner/awslc/build/include'
@ -290,7 +314,7 @@ jobs:
if: ${{ steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl
git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl
cd ngtcp2-boringssl
autoreconf -fi
./configure --disable-dependency-tracking --prefix="$PWD"/build \
@ -303,9 +327,9 @@ jobs:
if: ${{ steps.cache-nghttp2.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2
git clone --quiet --depth 1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2
cd nghttp2
git submodule update --init --depth=1
git submodule update --init --depth 1
autoreconf -fi
# required (for nghttpx application): libc-ares-dev libev-dev zlib1g-dev
# optional (for nghttpx application): libbrotli-dev
@ -331,6 +355,7 @@ jobs:
build:
- name: 'openssl'
PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1640'
configure: >-
LDFLAGS=-Wl,-rpath,/home/runner/openssl/build/lib
--with-openssl=/home/runner/openssl/build --with-ngtcp2 --enable-ssls-export
@ -353,6 +378,7 @@ jobs:
- name: 'libressl'
PKG_CONFIG_PATH: /home/runner/libressl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1790'
generate: >-
-DOPENSSL_ROOT_DIR=/home/runner/libressl/build -DUSE_NGTCP2=ON
@ -365,6 +391,7 @@ jobs:
- name: 'awslc'
PKG_CONFIG_PATH: /home/runner/awslc/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1790'
generate: >-
-DOPENSSL_ROOT_DIR=/home/runner/awslc/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF
-DCMAKE_UNITY_BUILD=ON
@ -378,35 +405,41 @@ jobs:
- name: 'boringssl'
PKG_CONFIG_PATH: /home/runner/boringssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2-boringssl/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1790'
generate: >-
-DOPENSSL_ROOT_DIR=/home/runner/boringssl/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF
-DCMAKE_UNITY_BUILD=ON
- name: 'gnutls'
install_packages: nettle-dev libp11-kit-dev
install_packages: libp11-kit-dev libssh-dev
install_steps: skipall
PKG_CONFIG_PATH: /home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
PKG_CONFIG_PATH: /home/runner/nettle/build/lib64/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib -Wl,-rpath,/home/runner/nettle/build/lib64 -Wl,-rpath,/home/runner/ngtcp2/build/lib
configure: >-
LDFLAGS=-Wl,-rpath,/home/runner/gnutls/build/lib
--with-gnutls=/home/runner/gnutls/build --with-ngtcp2 --enable-ssls-export
--with-gnutls=/home/runner/gnutls/build --with-ngtcp2 --with-libssh --enable-ssls-export
- name: 'gnutls'
install_packages: nettle-dev libp11-kit-dev
PKG_CONFIG_PATH: /home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
install_packages: libp11-kit-dev libssh-dev
PKG_CONFIG_PATH: /home/runner/nettle/build/lib64/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib
tflags: '--min=1840'
generate: >-
-DCURL_USE_GNUTLS=ON -DUSE_NGTCP2=ON
-DCURL_USE_GNUTLS=ON -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH=ON
-DCMAKE_UNITY_BUILD=ON
- name: 'wolfssl'
install_packages: libssh2-1-dev
install_steps: skipall
PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
configure: >-
LDFLAGS=-Wl,-rpath,/home/runner/wolfssl/build/lib
--with-wolfssl=/home/runner/wolfssl/build --with-ngtcp2 --enable-ech --enable-ssls-export
--with-wolfssl=/home/runner/wolfssl/build --with-ngtcp2 --enable-ech --with-libssh2 --enable-ssls-export
--enable-unity
- name: 'wolfssl'
install_packages: libssh2-1-dev
PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1840'
generate: >-
-DCURL_USE_WOLFSSL=ON -DUSE_NGTCP2=ON
-DUSE_ECH=ON
@ -414,6 +447,7 @@ jobs:
- name: 'openssl-quic'
install_steps: skipall
PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig
tflags: '--min=1640'
configure: >-
LDFLAGS=-Wl,-rpath,/home/runner/openssl/build/lib
--with-openssl=/home/runner/openssl/build --with-openssl-quic
@ -437,6 +471,7 @@ jobs:
- name: 'quiche'
PKG_CONFIG_PATH: /home/runner/nghttp2/build/lib/pkgconfig:/home/runner/quiche/target/release
tflags: '--min=1790'
generate: >-
-DOPENSSL_ROOT_DIR=/home/runner/quiche/quiche/deps/boringssl/src
-DUSE_QUICHE=ON
@ -455,15 +490,14 @@ jobs:
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install \
libtool autoconf automake pkgconf \
libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libidn2-0-dev libldap-dev libuv1-dev \
libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libidn2-0-dev libldap-dev libuv1-dev valgrind \
${INSTALL_PACKAGES} \
${MATRIX_INSTALL_PACKAGES}
echo 'CC=gcc-12' >> "$GITHUB_ENV"
echo 'CXX=g++-12' >> "$GITHUB_ENV"
- name: 'cache openssl'
if: ${{ matrix.build.name == 'openssl' || matrix.build.name == 'openssl-quic' }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-openssl-http3-no-deprecated
env:
cache-name: cache-openssl-http3-no-deprecated
@ -473,7 +507,7 @@ jobs:
fail-on-cache-miss: true
- name: 'cache libressl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-libressl
env:
cache-name: cache-libressl
@ -483,7 +517,7 @@ jobs:
fail-on-cache-miss: true
- name: 'cache awslc'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-awslc
env:
cache-name: cache-awslc
@ -493,7 +527,7 @@ jobs:
fail-on-cache-miss: true
- name: 'cache boringssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-boringssl
env:
cache-name: cache-boringssl
@ -502,20 +536,31 @@ jobs:
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }}
fail-on-cache-miss: true
- name: 'cache nettle'
if: ${{ matrix.build.name == 'gnutls' }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nettle
env:
cache-name: cache-nettle
with:
path: ~/nettle/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }}
fail-on-cache-miss: true
- name: 'cache gnutls'
if: ${{ matrix.build.name == 'gnutls' }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-gnutls
env:
cache-name: cache-gnutls
with:
path: ~/gnutls/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }}
fail-on-cache-miss: true
- name: 'cache wolfssl'
if: ${{ matrix.build.name == 'wolfssl' }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-wolfssl
env:
cache-name: cache-wolfssl
@ -525,7 +570,7 @@ jobs:
fail-on-cache-miss: true
- name: 'cache nghttp3'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nghttp3
env:
cache-name: cache-nghttp3
@ -535,17 +580,17 @@ jobs:
fail-on-cache-miss: true
- name: 'cache ngtcp2'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-ngtcp2
env:
cache-name: cache-ngtcp2
with:
path: ~/ngtcp2/build
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}
key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}
fail-on-cache-miss: true
- name: 'cache ngtcp2 boringssl'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-ngtcp2-boringssl
env:
cache-name: cache-ngtcp2-boringssl
@ -555,7 +600,7 @@ jobs:
fail-on-cache-miss: true
- name: 'cache nghttp2'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nghttp2
env:
cache-name: cache-nghttp2
@ -566,7 +611,7 @@ jobs:
- name: 'cache quiche'
if: ${{ matrix.build.name == 'quiche' }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-quiche
env:
cache-name: cache-quiche
@ -578,7 +623,7 @@ jobs:
if: ${{ matrix.build.name == 'quiche' && steps.cache-quiche.outputs.cache-hit != 'true' }}
run: |
cd ~
git clone --quiet --depth=1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche.git
git clone --quiet --depth 1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche
cd quiche
#### Work-around https://github.com/curl/curl/issues/7927 #######
#### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
@ -587,15 +632,14 @@ jobs:
cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
ln -s libquiche.so target/release/libquiche.so.0
mkdir -v quiche/deps/boringssl/src/lib
# shellcheck disable=SC2046
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \;
# include dir
# /home/runner/quiche/quiche/deps/boringssl/src/include
# lib dir
# /home/runner/quiche/quiche/deps/boringssl/src/lib
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -605,6 +649,7 @@ jobs:
- name: 'configure'
env:
LDFLAGS: '${{ matrix.build.LDFLAGS }}'
MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
MATRIX_GENERATE: '${{ matrix.build.generate }}'
MATRIX_PKG_CONFIG_PATH: '${{ matrix.build.PKG_CONFIG_PATH }}'
@ -669,6 +714,18 @@ jobs:
env:
TFLAGS: '${{ matrix.build.tflags }}'
run: |
TFLAGS+=' -n'
source ~/venv/bin/activate
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
cmake --build bld --verbose --target test-ci
else
make -C bld V=1 test-ci
fi
- name: 'run tests (valgrind)'
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
run: |
export TFLAGS='-j6 --min=4 HTTP/3'
source ~/venv/bin/activate
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
cmake --build bld --verbose --target test-ci
@ -682,7 +739,7 @@ jobs:
[ -d ~/venv ] || python3 -m venv ~/venv
~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt
- name: 'run pytest event based'
- name: 'run pytest (event based)'
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
env:
CURL_TEST_EVENT: 1

View file

@ -11,12 +11,12 @@
# is still supported (as of this writing).
# stretch has ELTS support from Freexian until 2027-06-30
# For ELTS info see https://www.freexian.com/lts/extended/docs/how-to-use-extended-lts/
# The Debian key will expire 2025-05-20, after which package signature
# The Debian key expires 2025-05-20, after which package signature
# verification may need to be disabled.
# httrack is one of the smallest downloaders, needed to bootstrap ELTS,
# and won't conflict with the curl we're building.
# and doesn not conflict with the curl we are building.
name: 'Old Linux'
name: 'Linux Old'
'on':
push:
@ -52,14 +52,17 @@ permissions: {}
env:
MAKEFLAGS: -j 5
CURL_CI: github
CURL_TEST_MIN: 1500
DEBIAN_FRONTEND: noninteractive
jobs:
cmake-autotools:
name: 'cmake & autotools'
name: 'autotools & cmake'
runs-on: 'ubuntu-latest'
container: 'debian:stretch'
env:
CMAKE_VERSION: '3.7.0' # Earliest version supported by curl
steps:
- name: 'install prereqs'
# Remember, this shell is dash, not bash
@ -72,105 +75,114 @@ jobs:
dpkg -i freexian-archive-keyring_2022.06.08_all.deb
echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
apt-get -o Dpkg::Use-Pty=0 update
apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends cmake make automake autoconf libtool gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libgnutls28-dev libc-ares-dev libkrb5-dev libldap2-dev librtmp-dev stunnel4 groff
apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends make automake autoconf libtool gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libc-ares-dev libkrb5-dev libldap2-dev librtmp-dev stunnel4
# GitHub's actions/checkout needs newer glibc and libstdc++. The latter also depends on
# gcc-8-base, but it doesn't actually seem used in our situation and isn't available in
# gcc-8-base, but it does not actually seem used in our situation and is not available in
# the main repo, so force the install.
httrack --get https://deb.freexian.com/extended-lts/pool/main/g/glibc/libc6_2.28-10+deb10u5_amd64.deb
httrack --get https://deb.freexian.com/extended-lts/pool/main/g/gcc-8/libstdc++6_8.3.0-6_amd64.deb
dpkg -i --force-depends libc6_*_amd64.deb libstdc++6_*_amd64.deb
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: 'install prereqs (cmake)'
run: |
cd ~
fn="cmake-${CMAKE_VERSION}-linux-x86_64"
httrack --get "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${fn}.tar.gz"
tar -xf "${fn}".tar*.gz
rm -f "${fn}".tar*.gz
mv "cmake-${CMAKE_VERSION}-Linux-x86_64" cmake
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'cmake build-only configure (out-of-tree)'
- name: 'CM build-only configure (out-of-tree)'
run: |
mkdir bld-1
cd bld-1
cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
-DCURL_USE_GNUTLS=ON -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON
"$HOME"/cmake/bin/cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
-DCURL_ENABLE_SSL=OFF -DENABLE_ARES=OFF -DCURL_ZSTD=OFF -DCURL_USE_GSSAPI=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON
- name: 'cmake build-only build'
- name: 'CM build-only build'
run: VERBOSE=1 make -C bld-1 install
- name: 'cmake build-only curl -V'
- name: 'CM build-only curl -V'
run: bld-1/src/curl --disable --version
- name: 'cmake build-only configure log'
- name: 'CM build-only configure log'
if: ${{ !cancelled() }}
run: cat bld-1/CMakeFiles/CMake*.log 2>/dev/null || true
- name: 'cmake build-only curl_config.h'
- name: 'CM build-only curl_config.h'
run: |
echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::'
grep -F '#define' bld-1/lib/curl_config.h | sort || true
# when this job can get a libssh version 0.9.0 or later, this should get
# that enabled again
- name: 'cmake configure (out-of-tree, c-ares, zstd, gssapi)'
- name: 'CM configure (out-of-tree, c-ares, zstd, gssapi)'
run: |
mkdir bld-cares
cd bld-cares
cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
-DCURL_USE_GNUTLS=ON -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON \
"$HOME"/cmake/bin/cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON \
-DCURL_ENABLE_SSL=OFF -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_LIBRTMP=ON \
-DCURL_LIBCURL_VERSIONED_SYMBOLS=ON
- name: 'cmake configure log'
- name: 'CM configure log'
if: ${{ !cancelled() }}
run: cat bld-cares/CMakeFiles/CMake*.log 2>/dev/null || true
- name: 'cmake curl_config.h'
- name: 'CM curl_config.h'
run: |
echo '::group::raw'; cat bld-cares/lib/curl_config.h || true; echo '::endgroup::'
grep -F '#define' bld-cares/lib/curl_config.h | sort || true
- name: 'cmake build'
- name: 'CM build'
run: make -C bld-cares
- name: 'cmake curl -V'
- name: 'CM curl -V'
run: bld-cares/src/curl --disable --version
- name: 'cmake install'
- name: 'CM install'
run: make -C bld-cares install
- name: 'cmake build tests'
- name: 'CM build tests'
run: make -C bld-cares testdeps
- name: 'cmake run tests'
- name: 'CM run tests'
run: make -C bld-cares test-ci
- name: 'cmake build examples'
- name: 'CM build examples'
run: make -C bld-cares curl-examples-build
- name: 'autoreconf'
- name: 'AM autoreconf'
run: autoreconf -fi
- name: 'autotools configure (out-of-tree, c-ares, zstd, gssapi)'
- name: 'AM configure (out-of-tree, c-ares, zstd, gssapi)'
run: |
mkdir bld-am
cd bld-am
../configure --disable-dependency-tracking --enable-unity --enable-warnings --enable-werror \
--with-gnutls --enable-ares --without-libssh2 --with-zstd --with-gssapi --with-librtmp \
--without-ssl --enable-ares --without-libssh2 --with-zstd --with-gssapi --with-librtmp \
--prefix="$PWD"/../curl-install-am
- name: 'autotools configure log'
- name: 'AM configure log'
if: ${{ !cancelled() }}
run: cat bld-am/config.log 2>/dev/null || true
- name: 'autotools curl_config.h'
- name: 'AM curl_config.h'
run: |
echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::'
grep -F '#define' bld-am/lib/curl_config.h | sort || true
- name: 'autotools build'
- name: 'AM build'
run: make -C bld-am
- name: 'autotools curl -V'
- name: 'AM curl -V'
run: bld-am/src/curl --disable --version
- name: 'autotools install'
- name: 'AM install'
run: make -C bld-am install
- name: 'autotools build tests'
- name: 'AM build tests'
run: make -C bld-am/tests all

View file

@ -36,32 +36,37 @@ permissions: {}
env:
MAKEFLAGS: -j 5
CURL_CI: github
CURL_TEST_MIN: 1600
CURL_CLANG_TIDYFLAGS: '-checks=-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.ArrayBound,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-valist.Uninitialized'
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
LIBRESSL_VERSION: 4.2.0
LIBRESSL_VERSION: 4.2.1
# renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?<version>.+)-stable$ registryUrl=https://github.com
WOLFSSL_VERSION: 5.8.2
WOLFSSL_VERSION: 5.8.4
# renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver registryUrl=https://github.com
MBEDTLS_VERSION: 4.0.0
# renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver:^3.0.0 registryUrl=https://github.com
MBEDTLS_VERSION_PREV: 3.6.4
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
AWSLC_VERSION: 1.61.4
AWSLC_VERSION: 1.65.1
# renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com
BORINGSSL_VERSION: 0.20251002.0
BORINGSSL_VERSION: 0.20251124.0
# handled in renovate.json
OPENSSL_VERSION: 3.6.0
# renovate: datasource=github-tags depName=rustls/rustls-ffi versioning=semver registryUrl=https://github.com
RUSTLS_VERSION: 0.15.0
# handled in renovate.json
OPENLDAP_VERSION: 2.6.10
# renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com
NGHTTP2_VERSION: 1.68.0
# renovate: datasource=github-releases depName=pizlonator/fil-c versioning=semver-coerced registryUrl=https://github.com
FIL_C_VERSION: 0.677
jobs:
linux:
name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }}
runs-on: ${{ matrix.build.image || 'ubuntu-latest' }}
container: ${{ matrix.build.container }}
timeout-minutes: 45
timeout-minutes: 25
env:
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
MATRIX_INSTALL_PACKAGES: '${{ matrix.build.install_packages }}'
@ -107,12 +112,12 @@ jobs:
-DCURL_USE_GSSAPI=ON
- name: 'mbedtls clang'
install_packages: libnghttp2-dev libldap-dev clang
install_packages: libssh-dev libnghttp2-dev libldap-dev clang
install_steps: mbedtls pytest
configure: CC=clang LDFLAGS=-Wl,-rpath,/home/runner/mbedtls/lib --with-mbedtls=/home/runner/mbedtls --enable-debug --with-fish-functions-dir --with-zsh-functions-dir
configure: CC=clang LDFLAGS=-Wl,-rpath,/home/runner/mbedtls/lib --with-mbedtls=/home/runner/mbedtls --with-libssh --enable-debug --with-fish-functions-dir --with-zsh-functions-dir
- name: 'mbedtls-prev'
install_packages: libnghttp2-dev libuv1-dev
install_packages: libssh2-1-dev libnghttp2-dev libuv1-dev
install_steps: mbedtls-prev pytest
PKG_CONFIG_PATH: /home/runner/mbedtls-prev/lib/pkgconfig # Requires v3.6.0
generate: -DCURL_USE_MBEDTLS=ON -DCURL_USE_LIBUV=ON -DENABLE_DEBUG=ON
@ -149,11 +154,12 @@ jobs:
- name: 'openssl libssh2 sync-resolver valgrind'
install_packages: libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev valgrind
generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_USE_LIBSSH2=ON
generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF
- name: 'openssl'
install_packages: libssh-dev
install_steps: pytest
configure: CFLAGS=-std=gnu89 --with-openssl --enable-debug
configure: CFLAGS=-std=gnu89 --with-openssl --with-libssh --enable-debug
- name: 'openssl arm'
install_steps: pytest
@ -171,8 +177,8 @@ jobs:
configure: CC=clang --disable-shared --with-openssl --with-gssapi --enable-debug --disable-docs --disable-manual --with-ldap=/home/runner/openldap-static --with-ldap-lib=ldap --with-lber-lib=lber
- name: 'openssl clang krb5 LTO'
install_packages: libkrb5-dev clang
install_steps: skiprun
install_packages: libssh2-1-dev libkrb5-dev clang
install_steps: skiprun pytest
CC: clang
generate: -DCURL_USE_OPENSSL=ON -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LTO=ON
@ -180,6 +186,7 @@ jobs:
configure: --with-openssl --disable-ipv6 --enable-debug --disable-unity --disable-libcurl-option --disable-digest-auth
- name: 'openssl https-only'
tflags: '--min=1150'
configure: >-
--with-openssl --enable-debug --disable-unity
--disable-dict --disable-gopher --disable-ldap --disable-telnet
@ -191,13 +198,13 @@ jobs:
- name: 'openssl torture !FTP'
install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=25 !FTP
tflags: '-t --shallow=25 !FTP --min=1450'
torture: true
- name: 'openssl torture FTP'
install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev
generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON
tflags: -t --shallow=20 FTP
tflags: '-t --shallow=20 FTP --min=260'
torture: true
- name: 'openssl i686'
@ -211,8 +218,20 @@ jobs:
--with-openssl --with-librtmp --with-libssh2 --with-libidn2 --enable-ares --enable-debug
- name: '!ssl !http !smtp !imap'
tflags: '--min=475'
configure: --without-ssl --enable-debug --disable-http --disable-smtp --disable-imap --disable-unity
- name: 'libressl Fil-C'
install_steps: filc libressl-filc nghttp2-filc pytest
tflags: '!776' # adds 1-9 minutes to the test run step, and fails consistently
CC: /home/runner/filc/build/bin/filcc
PKG_CONFIG_PATH: /home/runner/nghttp2/lib/pkgconfig
generate: >-
-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_TYPECHECK=ON
-DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_LIBPSL=OFF
-DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
-DCURL_DISABLE_LDAP=ON -DUSE_LIBIDN2=OFF -DCURL_USE_LIBSSH2=OFF
- name: 'clang-tidy'
install_packages: clang-tidy libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libkrb5-dev librtmp-dev libgnutls28-dev
install_steps: skipall mbedtls rustls wolfssl-opensslextra
@ -223,7 +242,7 @@ jobs:
configure: >-
--with-wolfssl=/home/runner/wolfssl-opensslextra --with-openssl --with-rustls --with-mbedtls=/home/runner/mbedtls --with-gnutls --with-libgsasl
--with-librtmp --with-libssh2 --with-libidn2
--enable-ech --with-gssapi --enable-ssls-export
--enable-ech --with-gssapi --enable-ssls-export --disable-typecheck
- name: 'scan-build'
install_packages: clang-tools clang libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libgss-dev librtmp-dev libgnutls28-dev
@ -238,10 +257,10 @@ jobs:
--with-wolfssl=/home/runner/wolfssl-opensslextra --with-openssl --with-rustls --with-mbedtls=/home/runner/mbedtls --with-gnutls --with-libgsasl
--with-librtmp --with-libssh2 --with-libidn2
--enable-ech --with-gssapi --enable-ssls-export
--disable-debug --disable-unity
--disable-debug --disable-unity --disable-typecheck
- name: 'scan-build H3 c-ares'
install_packages: clang-tools clang libidn2-dev libnghttp2-dev
install_packages: clang-tools clang libidn2-dev libssh-dev libnghttp2-dev
install_steps: skipall
install_steps_brew: openssl libngtcp2 libnghttp3 c-ares
CC: clang
@ -251,8 +270,8 @@ jobs:
PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig
configure: >-
--with-openssl=/home/linuxbrew/.linuxbrew/opt/openssl --with-ngtcp2 --with-nghttp3=
--with-libidn2 --enable-httpsrr --enable-ares
--disable-debug --disable-unity
--with-libidn2 --with-libssh --enable-httpsrr --enable-ares
--disable-debug --disable-unity --disable-typecheck
--disable-verbose
- name: 'address-sanitizer'
@ -266,10 +285,10 @@ jobs:
- name: 'address-sanitizer H3 c-ares'
install_packages: clang libubsan1 libasan8 libtsan2
install_steps: pytest
install_steps_brew: openssl libngtcp2 libnghttp3 c-ares
install_steps_brew: openssl libssh2 libngtcp2 libnghttp3 c-ares
CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g
LDFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -ldl -lubsan -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib
PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig
PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig
CC: clang
generate: -DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl -DUSE_NGTCP2=ON -DUSE_SSLS_EXPORT=ON -DENABLE_ARES=ON
@ -288,16 +307,17 @@ jobs:
LDFLAGS: -fsanitize=memory
LIBS: -ldl
configure: CC=clang --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug
tflags: '--min=1480'
- name: 'event-based'
install_packages: libssh-dev
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
tflags: -n --test-event '!TLS-SRP'
tflags: '-n --test-event --min=1350'
- name: 'duphandle'
install_packages: libssh-dev
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
tflags: -n --test-duphandle '!TLS-SRP'
tflags: '-n --test-duphandle'
- name: 'rustls valgrind'
install_packages: libnghttp2-dev libldap-dev valgrind
@ -314,10 +334,10 @@ jobs:
install_steps: intel
configure: CC=icc --enable-debug --with-openssl
- name: 'Slackware openssl gssapi gcc'
# These are essentially the same flags used to build the curl Slackware package
- name: 'Slackware !ssl gssapi gcc'
# Flags used to build the curl Slackware package, except OpenSSL 1.1.0:
# https://ftpmirror.infania.net/slackware/slackware64-current/source/n/curl/curl.SlackBuild
configure: --enable-debug --with-openssl --with-libssh2 --with-gssapi --enable-ares --enable-static=no --without-ca-bundle --with-ca-path=/etc/ssl/certs
configure: --enable-debug --without-ssl --with-libssh2 --with-gssapi --enable-ares --enable-static=no --without-ca-bundle --with-ca-path=/etc/ssl/certs
# Docker Hub image that `container-job` executes in
container: 'andy5995/slackware-build-essential:15.0'
@ -351,7 +371,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install ${INSTALL_PACKAGES_BREW}
fi
- name: 'install prereqs'
- name: 'install prereqs (i686)'
if: ${{ contains(matrix.build.name, 'i686') }}
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
@ -363,7 +383,7 @@ jobs:
libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 \
${MATRIX_INSTALL_PACKAGES}
- name: 'install dependencies'
- name: 'install prereqs (alpine)'
if: ${{ startsWith(matrix.build.container, 'alpine') }}
run: |
apk add --no-cache build-base autoconf automake libtool perl openssl-dev \
@ -372,9 +392,19 @@ jobs:
py3-impacket py3-asn1 py3-six py3-pycryptodomex \
perl-time-hires openssh stunnel sudo git openssl
- name: 'install Fil-C'
if: ${{ contains(matrix.build.install_steps, 'filc') }}
run: |
cd /home/runner
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
--location "https://github.com/pizlonator/fil-c/releases/download/v${FIL_C_VERSION}/filc-${FIL_C_VERSION}-linux-x86_64.tar.xz" | tar -xJ
mv "filc-${FIL_C_VERSION}-linux-x86_64" filc
cd filc
./setup.sh
- name: 'cache libressl'
if: ${{ contains(matrix.build.install_steps, 'libressl') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-libressl
env:
cache-name: cache-libressl
@ -392,9 +422,52 @@ jobs:
cmake --build .
cmake --install .
- name: 'cache libressl (filc)'
if: ${{ contains(matrix.build.install_steps, 'libressl-filc') }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-libressl-filc
env:
cache-name: cache-libressl-filc
with:
path: ~/libressl
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}-${{ env.FIL_C_VERSION }}
- name: 'build libressl (filc)'
if: ${{ contains(matrix.build.install_steps, 'libressl-filc') && steps.cache-libressl-filc.outputs.cache-hit != 'true' }}
run: |
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
--location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" | tar -xz
cd "libressl-${LIBRESSL_VERSION}"
cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl \
-DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc -DENABLE_ASM=OFF
cmake --build .
cmake --install .
- name: 'cache nghttp2 (filc)'
if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') }}
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-nghttp2-filc
env:
cache-name: cache-nghttp2-filc
with:
path: ~/nghttp2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.FIL_C_VERSION }}
- name: 'build nghttp2 (filc)'
if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') && steps.cache-nghttp2-filc.outputs.cache-hit != 'true' }}
run: |
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
--location "https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2_VERSION}/nghttp2-${NGHTTP2_VERSION}.tar.xz" | tar -xJ
cd "nghttp2-${NGHTTP2_VERSION}"
cmake -B . -G Ninja -DENABLE_LIB_ONLY=ON -DBUILD_TESTING=OFF -DENABLE_DOC=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/nghttp2 \
-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc
cmake --build .
cmake --install .
- name: 'cache wolfssl (all)'
if: ${{ contains(matrix.build.install_steps, 'wolfssl-all') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-wolfssl-all
env:
cache-name: cache-wolfssl-all
@ -415,7 +488,7 @@ jobs:
- name: 'cache wolfssl (opensslextra)' # does support `OPENSSL_COEXIST`
if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-wolfssl-opensslextra
env:
cache-name: cache-wolfssl-opensslextra
@ -436,7 +509,7 @@ jobs:
- name: 'cache mbedtls'
if: ${{ contains(matrix.build.install_steps, 'mbedtls') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-mbedtls-threadsafe
env:
cache-name: cache-mbedtls-threadsafe
@ -459,7 +532,7 @@ jobs:
- name: 'cache mbedtls (prev)'
if: ${{ contains(matrix.build.install_steps, 'mbedtls-prev') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-mbedtls-threadsafe-prev
env:
cache-name: cache-mbedtls-threadsafe-prev
@ -482,7 +555,7 @@ jobs:
- name: 'cache openldap (static)'
if: ${{ contains(matrix.build.install_steps, 'openldap-static') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-openldap-static
env:
cache-name: cache-openldap-static
@ -501,7 +574,7 @@ jobs:
- name: 'cache openssl (thread sanitizer)'
if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-openssl-tsan
env:
cache-name: cache-openssl-tsan
@ -512,7 +585,7 @@ jobs:
- name: 'build openssl (thread sanitizer)'
if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') && steps.cache-openssl-tsan.outputs.cache-hit != 'true' }}
run: |
git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
cd openssl
CC=clang CFLAGS='-fsanitize=thread' LDFLAGS='-fsanitize=thread' ./config --prefix=/home/runner/openssl --libdir=lib no-makedepend no-apps no-docs no-tests
make
@ -520,7 +593,7 @@ jobs:
- name: 'cache awslc'
if: ${{ contains(matrix.build.install_steps, 'awslc') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-awslc
env:
cache-name: cache-awslc
@ -540,7 +613,7 @@ jobs:
- name: 'cache boringssl'
if: ${{ contains(matrix.build.install_steps, 'boringssl') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-boringssl
env:
cache-name: cache-boringssl
@ -561,7 +634,7 @@ jobs:
- name: 'cache rustls'
if: ${{ contains(matrix.build.install_steps, 'rustls') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-rustls
env:
cache-name: cache-rustls
@ -579,7 +652,7 @@ jobs:
rm ~/rustls/librustls.zip
- name: 'build rustls'
# Note: we don't check cache-hit here. If the cache is hit, we still need to dpkg install the deb.
# Note: we do not check cache-hit here. If the cache is hit, we need to dpkg install the deb.
if: ${{ contains(matrix.build.install_steps, 'rustls') }}
run: sudo dpkg -i ~/rustls/"librustls_${RUSTLS_VERSION}_amd64.deb"
@ -594,7 +667,7 @@ jobs:
source /opt/intel/oneapi/setvars.sh
printenv >> "$GITHUB_ENV"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -652,7 +725,7 @@ jobs:
fi
- name: 'single-use function check'
if: ${{ contains(matrix.build.configure, '--disable-unity') || contains(matrix.build.generate, '-DCMAKE_UNITY_BUILD=OFF') }}
if: ${{ (contains(matrix.build.configure, '--disable-unity') || contains(matrix.build.generate, '-DCMAKE_UNITY_BUILD=OFF')) && !contains(matrix.build.install_steps, 'filc') }}
run: |
git config --global --add safe.directory "*"
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
@ -691,16 +764,19 @@ jobs:
- name: 'run tests'
if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 30 || 15 }}
timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 20 || 10 }}
env:
TEST_TARGET: ${{ matrix.build.torture && 'test-torture' || 'test-ci' }}
TFLAGS: '${{ matrix.build.tflags }}'
run: |
if [ "${TEST_TARGET}" = 'test-ci' ] && [[ "${MATRIX_INSTALL_PACKAGES}" = *'valgrind'* ]]; then
TFLAGS+=' -j6'
TFLAGS+=' !776' # skip long-running flaky test
if [[ "${MATRIX_INSTALL_PACKAGES}" = *'libgss-dev'* ]]; then
TFLAGS+=' ~2077 ~2078' # memory leaks from Curl_auth_decode_spnego_message() -> gss_init_sec_context()
fi
elif [ "${TEST_TARGET}" != 'test-ci' ]; then
TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture
fi
[ -f ~/venv/bin/activate ] && source ~/venv/bin/activate
if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then

View file

@ -44,6 +44,7 @@ permissions: {}
env:
CURL_CI: github
CURL_TEST_MIN: 1700
MAKEFLAGS: -j 4
LDFLAGS: -w # suppress 'object file was built for newer macOS version than being linked' warnings
@ -54,12 +55,12 @@ jobs:
timeout-minutes: 10
env:
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
CC: ${{ matrix.build.compiler || 'clang' }}
CC: 'clang'
LDFLAGS: ''
MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
MATRIX_OPTIONS: ${{ matrix.build.options }}
# renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com
LIBRESSL_VERSION: 4.2.0
LIBRESSL_VERSION: 4.2.1
strategy:
fail-fast: false
matrix:
@ -81,6 +82,7 @@ jobs:
- name: 'libressl'
install_steps: libressl
generator: Xcode
xcode: '' # default Xcode. Set it once to silence actionlint.
options: --config Debug
generate: >-
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=OFF
@ -93,6 +95,7 @@ jobs:
steps:
- name: 'brew install'
if: ${{ matrix.build.configure }}
timeout-minutes: 5
run: |
# shellcheck disable=SC2181,SC2034
while [[ $? == 0 ]]; do for i in 1 2 3; do if brew update && brew install automake libtool; then break 2; else echo Error: wait to try again; sleep 10; fi; done; false Too many retries; done
@ -110,7 +113,7 @@ jobs:
- name: 'cache libressl'
if: ${{ contains(matrix.build.install_steps, 'libressl') }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-libressl
env:
cache-name: cache-libressl
@ -134,7 +137,7 @@ jobs:
cmake --build .
cmake --install . --verbose
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -183,7 +186,7 @@ jobs:
fi
- name: 'curl info'
run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file '{}' \;
run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
run: |
@ -204,7 +207,7 @@ jobs:
macos:
name: "${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.build.name }}"
runs-on: 'macos-15'
timeout-minutes: 45
timeout-minutes: 25
env:
DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
CC: '${{ matrix.compiler }}'
@ -216,22 +219,27 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [clang, llvm@18, gcc-12]
compiler: [clang, llvm@18, gcc-13]
build:
# autotools
- name: '!ssl !debug brotli zstd'
compiler: clang
install: brotli zstd
configure: --without-ssl --with-brotli --with-zstd
tflags: '--min=1450'
xcode: '' # default Xcode. Set it once to silence actionlint.
- name: '!ssl !debug'
compiler: gcc-12
compiler: gcc-13
configure: --without-ssl
tflags: '--min=950'
- name: '!ssl'
compiler: clang
configure: --enable-debug --without-ssl
tflags: '--min=1500'
- name: '!ssl libssh2 AppleIDN'
compiler: clang
configure: --enable-debug --with-libssh2=/opt/homebrew/opt/libssh2 --without-ssl --with-apple-idn
tflags: '--min=1550'
- name: 'OpenSSL libssh c-ares'
compiler: clang
install: libssh
@ -243,8 +251,10 @@ jobs:
- name: '!ssl c-ares'
compiler: clang
configure: --enable-debug --enable-ares --without-ssl
tflags: '--min=1500'
- name: '!ssl HTTP-only'
compiler: clang
tflags: '--min=950'
configure: >-
--enable-debug
--disable-alt-svc --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap
@ -274,7 +284,7 @@ jobs:
- name: 'OpenSSL event-based'
compiler: clang
configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl
tflags: --test-event
tflags: '--test-event --min=1300'
# cmake
- name: 'OpenSSL gsasl rtmp AppleIDN SecTrust +examples'
install: libnghttp3 libngtcp2 gsasl rtmpdump
@ -318,36 +328,38 @@ jobs:
install: gnutls nettle krb5
generate: -DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON
- name: 'aws-lc'
compiler: gcc-12
compiler: gcc-13
install: aws-lc
generate: -DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DUSE_ECH=ON -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON
- name: 'Rustls'
compiler: clang
install: rustls-ffi
generate: -DENABLE_DEBUG=ON -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DCURL_DISABLE_LDAP=ON
tflags: '--min=1650'
- name: 'OpenSSL torture !FTP'
compiler: clang
install: libnghttp3
install_steps: torture
generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_OPENSSL_QUIC=ON
tflags: -t --shallow=25 !FTP
tflags: '-t --shallow=25 !FTP --min=1450'
- name: 'OpenSSL torture FTP'
compiler: clang
install: libnghttp3
install_steps: torture
generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_OPENSSL_QUIC=ON
tflags: -t --shallow=20 FTP
tflags: '-t --shallow=20 FTP --min=260'
exclude:
# opt out jobs from combinations that have the compiler set manually
- { compiler: llvm@18, build: { compiler: 'clang' } }
- { compiler: llvm@18, build: { compiler: 'gcc-12' } }
- { compiler: gcc-12, build: { compiler: 'clang' } }
- { compiler: gcc-12, build: { compiler: 'llvm@18' } }
- { compiler: clang, build: { compiler: 'gcc-12' } }
- { compiler: llvm@18, build: { compiler: 'gcc-13' } }
- { compiler: gcc-13, build: { compiler: 'clang' } }
- { compiler: gcc-13, build: { compiler: 'llvm@18' } }
- { compiler: clang, build: { compiler: 'gcc-13' } }
- { compiler: clang, build: { compiler: 'llvm@18' } }
steps:
- name: 'brew install'
timeout-minutes: 5
# Run this command with retries because of spurious failures seen
# while running the tests, for example
# https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
@ -381,7 +393,7 @@ jobs:
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
echo '::group::brew packages installed'; ls -l /opt/homebrew/opt; echo '::endgroup::'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -495,6 +507,9 @@ jobs:
TFLAGS: '${{ matrix.build.tflags }}'
run: |
TFLAGS="-j20 ${TFLAGS}"
if [ "${TEST_TARGET}" != 'test-ci' ]; then
TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture
fi
source ~/venv/bin/activate
if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then
locale || true
@ -538,7 +553,7 @@ jobs:
fi
combinations: # Test buildability with host OS, Xcode / SDK, compiler, target-OS, built tool, combinations
name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }} ${{ matrix.config }}"
name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }}"
runs-on: ${{ matrix.image }}
timeout-minutes: 10
env:
@ -555,7 +570,7 @@ jobs:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
# https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
compiler: [gcc-12, gcc-13, gcc-15, llvm@15, llvm@18, llvm@20, clang]
compiler: [gcc-13, gcc-14, gcc-15, llvm@15, llvm@18, llvm@20, clang]
# Xcode support matrix as of 2025-10, with default macOS SDK versions and OS names, years:
# * = default Xcode on the runner.
# macos-14: 15.0.1, 15.1, 15.2, 15.3,*15.4
@ -566,47 +581,20 @@ jobs:
# https://github.com/actions/runner-images/tree/main/images/macos
# https://en.wikipedia.org/wiki/MacOS_version_history
image: [macos-14, macos-15, macos-26]
# Can skip these to reduce jobs:
# 15.1 has the same default macOS SDK as 15.2 and identical test results.
# 15.4 not revealing new fallouts.
#xcode: ['15.0.1', '15.1', '15.2', '15.3', '15.4', '16.0', '16.1'] # all Xcode
#xcode: ['15.0.1' , '15.2', '15.3', '15.4', '16.0', '16.1'] # all SDK
#xcode: ['15.0.1' , '15.2', '15.3' , '16.0' ] # coverage
xcode: [''] # default Xcodes
macos-version-min: ['']
build: [autotools, cmake]
exclude:
# Combinations not covered by runner images:
- { image: macos-14, xcode: '16.0' }
- { image: macos-14, xcode: '16.1' }
- { image: macos-14, xcode: '16.2' }
- { image: macos-14, xcode: '16.3' }
- { image: macos-14, xcode: '16.4' }
- { image: macos-14, xcode: '26.0' }
- { image: macos-15, xcode: '15.0.1' }
- { image: macos-15, xcode: '15.1' }
- { image: macos-15, xcode: '15.2' }
- { image: macos-15, xcode: '15.3' }
- { image: macos-15, xcode: '15.4' }
- { image: macos-26, xcode: '15.0.1' }
- { image: macos-26, xcode: '15.1' }
- { image: macos-26, xcode: '15.2' }
- { image: macos-26, xcode: '15.3' }
- { image: macos-26, xcode: '15.4' }
- { image: macos-26, xcode: '16.0' }
- { image: macos-26, xcode: '16.1' }
- { image: macos-26, xcode: '16.2' }
- { image: macos-26, xcode: '16.3' }
- { image: macos-14, compiler: 'llvm@18' }
- { image: macos-14, compiler: 'llvm@20' }
- { image: macos-15, compiler: 'llvm@15' }
- { image: macos-15, compiler: 'llvm@20' }
- { image: macos-26, compiler: 'llvm@15' }
- { image: macos-26, compiler: 'llvm@18' }
- { image: macos-26, compiler: 'gcc-12' }
# Reduce build combinations, by dropping less interesting ones
- { compiler: gcc-13, build: cmake }
- { compiler: gcc-14, build: autotools }
- { image: macos-26, compiler: 'gcc-13' }
- { compiler: gcc-14, build: cmake }
- { compiler: gcc-15, build: autotools }
steps:
- name: 'install autotools'
@ -628,7 +616,7 @@ jobs:
echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
echo '::group::brew packages preinstalled'; ls -l /opt/homebrew/opt; echo '::endgroup::'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -638,7 +626,7 @@ jobs:
- name: 'configure / ${{ matrix.build }}'
run: |
if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ] ; then
if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then
# Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409
/opt/homebrew/opt/gcc@13/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders
fi

View file

@ -37,6 +37,7 @@ permissions: {}
env:
CURL_CI: github
CURL_TEST_MIN: 1750
jobs:
netbsd:
@ -47,15 +48,15 @@ jobs:
matrix:
arch: ['x86_64']
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'cmake'
uses: cross-platform-actions/action@e8a7b572196ff79ded1979dc2bb9ee67d1ddb252 # v0.29.0
uses: cross-platform-actions/action@46e8d7fb25520a8d6c64fd2b7a1192611da98eda # v0.30.0
env:
MATRIX_ARCH: '${{ matrix.arch }}'
with:
environment_variables: MATRIX_ARCH
environment_variables: CURL_CI CURL_TEST_MIN MATRIX_ARCH
operating_system: 'netbsd'
version: '10.1'
architecture: ${{ matrix.arch }}
@ -92,15 +93,15 @@ jobs:
matrix:
arch: ['x86_64']
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: 'cmake'
uses: cross-platform-actions/action@e8a7b572196ff79ded1979dc2bb9ee67d1ddb252 # v0.29.0
uses: cross-platform-actions/action@46e8d7fb25520a8d6c64fd2b7a1192611da98eda # v0.30.0
env:
MATRIX_ARCH: '${{ matrix.arch }}'
with:
environment_variables: MATRIX_ARCH
environment_variables: CURL_CI CURL_TEST_MIN MATRIX_ARCH
operating_system: 'openbsd'
version: '7.7'
architecture: ${{ matrix.arch }}
@ -142,19 +143,20 @@ jobs:
- { build: 'cmake' , arch: 'arm64' , compiler: 'clang' }
fail-fast: false
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: '${{ matrix.build }}'
uses: cross-platform-actions/action@e8a7b572196ff79ded1979dc2bb9ee67d1ddb252 # v0.29.0
uses: cross-platform-actions/action@46e8d7fb25520a8d6c64fd2b7a1192611da98eda # v0.30.0
env:
CC: '${{ matrix.compiler }}'
CURL_TEST_MIN: 1800
MATRIX_ARCH: '${{ matrix.arch }}'
MATRIX_BUILD: '${{ matrix.build }}'
MATRIX_DESC: '${{ matrix.desc }}'
MATRIX_OPTIONS: '${{ matrix.options }}'
with:
environment_variables: CC MATRIX_ARCH MATRIX_BUILD MATRIX_DESC MATRIX_OPTIONS
environment_variables: CC CURL_CI CURL_TEST_MIN MATRIX_ARCH MATRIX_BUILD MATRIX_DESC MATRIX_OPTIONS
operating_system: 'freebsd'
version: '14.3'
architecture: ${{ matrix.arch }}
@ -261,7 +263,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -310,7 +312,7 @@ jobs:
fi
- name: 'curl info'
run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file '{}' \;
run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
run: |

View file

@ -37,6 +37,7 @@ permissions: {}
env:
CURL_CI: github
CURL_TEST_MIN: 1700
jobs:
cygwin:
@ -74,7 +75,7 @@ jobs:
libnghttp2-devel
${{ matrix.install }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -132,7 +133,7 @@ jobs:
timeout-minutes: 1
run: |
PATH=/usr/bin
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
PATH="$PWD/bld/lib:$PATH"
fi
@ -197,28 +198,30 @@ jobs:
matrix:
include:
# MSYS
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-proxy', install: 'openssl-devel libssh2-devel', name: '!proxy' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun', config: '--enable-debug --with-openssl --disable-threaded-resolver', install: 'openssl-devel libssh2-devel', name: 'default' }
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', install: 'openssl-devel libssh2-devel', name: 'default' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '' , config: '--with-openssl', install: 'openssl-devel libssh2-devel', name: 'default R' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '--min=1550', config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-proxy', install: 'openssl-devel libssh2-devel', name: '!proxy' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver', install: 'openssl-devel libssh2-devel', name: 'default' }
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', install: 'openssl-devel libssh2-devel', name: 'default' }
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '' , config: '--with-openssl', install: 'openssl-devel libssh2-devel', name: 'default R' }
# MinGW
- { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun', config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib CPPFLAGS=-D_WIN32_WINNT=0x0501', install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-libssh2', name: 'default XP' }
- { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares --with-openssl-quic --enable-shared=no', install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-nghttp3 mingw-w64-x86_64-libssh2', name: 'c-ares U' }
- { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', install: 'mingw-w64-x86_64-libssh2', type: 'Debug', name: 'schannel c-ares U' }
- { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib CPPFLAGS=-D_WIN32_WINNT=0x0501', install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-libssh2', name: 'default XP' }
- { build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares --with-openssl-quic --enable-shared=no', install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-openssl mingw-w64-x86_64-nghttp3 mingw-w64-x86_64-libssh2', name: 'c-ares U' }
- { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: '--min=1650', config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-libssh2', type: 'Debug', name: 'schannel c-ares U' }
# MinGW torture
- { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: '-t --shallow=13 !FTP --min=1300', config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-libssh2', type: 'Debug', name: 'schannel U torture' }
# WARNING: libssh uses hard-coded world-writable paths (/etc/..., ~/.ssh/) to
# read its configuration from, making it vulnerable to attacks on
# Windows. Do not use this component till there is a fix for these.
# https://github.com/curl/curl-for-win/blob/3951808deb04df9489ee17430f236ed54436f81a/libssh.sh#L6-L8
- { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_GNUTLS=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON', install: 'mingw-w64-clang-x86_64-gnutls mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh', type: 'Debug', name: 'gnutls libssh' }
- { build: 'cmake' , sys: 'clangarm64', env: 'clang-aarch64', tflags: 'skiprun', config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', install: 'mingw-w64-clang-aarch64-libssh2', type: 'Release', name: 'schannel R TrackMemory', image: 'windows-11-arm' }
- { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: 'skiprun', config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON', install: 'mingw-w64-clang-x86_64-openssl mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh2', type: 'Release', name: 'openssl', chkprefill: '_chkprefill' }
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun', config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_OPENSSL=ON', install: 'mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' }
# { build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun', config: '--without-debug --with-schannel --enable-shared', install: 'mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' }
- { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun', config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCMAKE_VERBOSE_MAKEFILE=ON', install: 'mingw-w64-x86_64-libssh2', type: 'Debug', cflags: '-DCURL_SCHANNEL_DEV_DEBUG', name: 'schannel dev debug', image: 'windows-2025' }
- { build: 'cmake' , sys: 'mingw32' , env: 'i686' , tflags: 'skiprun', config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', install: 'mingw-w64-i686-libssh2', type: 'Release', name: 'schannel R' }
- { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_GNUTLS=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON', install: 'mingw-w64-clang-x86_64-gnutls mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh', type: 'Debug', name: 'gnutls libssh' }
- { build: 'cmake' , sys: 'clangarm64', env: 'clang-aarch64', tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', install: 'mingw-w64-clang-aarch64-libssh2', type: 'Release', name: 'schannel R TrackMemory', image: 'windows-11-arm' }
- { build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON', install: 'mingw-w64-clang-x86_64-openssl mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh2', type: 'Release', name: 'openssl', chkprefill: '_chkprefill' }
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_OPENSSL=ON', install: 'mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' }
# { build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '--without-debug --with-schannel --enable-shared', install: 'mingw-w64-ucrt-x86_64-libssh2', type: 'Release', test: 'uwp', name: 'schannel' }
- { build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCMAKE_VERBOSE_MAKEFILE=ON', install: 'mingw-w64-x86_64-libssh2', type: 'Debug', cflags: '-DCURL_SCHANNEL_DEV_DEBUG', name: 'schannel dev debug', image: 'windows-2025' }
- { build: 'cmake' , sys: 'mingw32' , env: 'i686' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', install: 'mingw-w64-i686-libssh2', type: 'Release', name: 'schannel R' }
fail-fast: false
steps:
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
if: ${{ matrix.sys == 'msys' }}
with:
msystem: ${{ matrix.sys }}
@ -234,7 +237,7 @@ jobs:
libpsl-devel
${{ matrix.install }}
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
if: ${{ matrix.sys != 'msys' }}
with:
msystem: ${{ matrix.sys }}
@ -243,10 +246,9 @@ jobs:
mingw-w64-${{ matrix.env }}-${{ matrix.build }} ${{ matrix.build == 'autotools' && 'make' || '' }}
mingw-w64-${{ matrix.env }}-diffutils
mingw-w64-${{ matrix.env }}-libpsl
mingw-w64-${{ matrix.env }}-c-ares
${{ matrix.install }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -336,7 +338,7 @@ jobs:
# avoid libtool's curl.exe wrapper for shared builds
mv bld/src/.libs/curl.exe bld/src/curl.exe || true
fi
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
if [ "${MATRIX_TEST}" != 'uwp' ]; then # curl: error initializing curl library
bld/src/curl.exe --disable --version
fi
@ -367,7 +369,7 @@ jobs:
- name: 'run tests'
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
timeout-minutes: 10
timeout-minutes: ${{ contains(matrix.tflags, '-t') && 15 || 10 }}
env:
MATRIX_INSTALL: '${{ matrix.install }}'
TFLAGS: '${{ matrix.tflags }}'
@ -378,6 +380,9 @@ jobs:
if [[ "${MATRIX_INSTALL}" = *'libssh2-wincng'* ]]; then
TFLAGS+=' ~SCP ~SFTP' # Flaky: `-8, Unable to exchange encryption keys`. https://github.com/libssh2/libssh2/issues/804
fi
if [[ "${TFLAGS}" = *'-t'* ]]; then
TFLAGS+=' !2300' # Leaks memory and file handle via tool_doswin.c / win32_stdin_read_thread()
fi
fi
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
@ -412,27 +417,31 @@ jobs:
run:
shell: msys2 {0}
env:
CURL_TEST_MIN: 1550
MAKEFLAGS: -j 5
MATRIX_DIR: '${{ matrix.dir }}'
strategy:
matrix:
include:
- name: 'schannel' # mingw-w64 12.0
dir: 'mingw64'
sys: 'mingw64'
dir: 'w64devkit'
env: 'x86_64'
ver: '15.0.1'
url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/15.0.1-snapshot20250406posix-12.0.0-ucrt-r1/winlibs-x86_64-posix-seh-gcc-15.0.1-snapshot20250406-mingw-w64ucrt-12.0.0-r1.7z'
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF'
ver: '15.1.0'
url: 'https://github.com/skeeto/w64devkit/releases/download/v2.2.0/w64devkit-x64-2.2.0.7z.exe'
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DENABLE_UNIX_SOCKETS=OFF'
type: 'Release'
tflags: 'skiprun'
- name: 'schannel' # mingw-w64 10.0
sys: 'mingw64'
dir: 'mingw64'
env: 'x86_64'
ver: '9.5.0'
url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z'
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF'
type: 'Release'
tflags: 'skiprun'
- name: 'schannel mbedtls U' # mingw-w64 6.0
sys: 'mingw64'
dir: 'mingw64'
env: 'x86_64'
ver: '7.3.0'
@ -442,6 +451,7 @@ jobs:
type: 'Release'
tflags: 'skiprun'
- name: 'schannel !unity' # mingw-w64 5.0
sys: 'mingw32'
dir: 'mingw32'
env: 'i686'
ver: '6.4.0'
@ -450,6 +460,7 @@ jobs:
type: 'Debug'
tflags: 'skiprun'
- name: 'schannel !examples' # mingw-w64 3.0
sys: 'mingw64'
dir: 'mingw64'
env: 'x86_64'
ver: '4.8.1'
@ -457,11 +468,12 @@ jobs:
config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON'
type: 'Debug'
tflags: 'skipall'
chkprefill: '' # Set it once to silence actionlint
fail-fast: false
steps:
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
msystem: ${{ matrix.dir }}
msystem: ${{ matrix.sys }}
release: false
update: false
cache: false
@ -471,7 +483,7 @@ jobs:
${{ matrix.install }}
- name: 'cache compiler (gcc ${{ matrix.ver }}-${{ matrix.env }})'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
id: cache-compiler
with:
path: D:\my-cache
@ -493,7 +505,7 @@ jobs:
rm -r -f pack.bin
ls -l
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -541,7 +553,7 @@ jobs:
- name: 'curl -V'
timeout-minutes: 1
run: |
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
PATH="$PWD/bld/lib:$PATH"
bld/src/curl.exe --disable --version
@ -606,7 +618,7 @@ jobs:
sudo rm -f /var/lib/man-db/auto-update
sudo apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -660,7 +672,7 @@ jobs:
fi
- name: 'curl info'
run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \;
run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \;
- name: 'build tests'
if: ${{ matrix.build == 'cmake' && matrix.compiler != 'clang-tidy' }} # Save time by skipping this for autotools and clang-tidy
@ -766,6 +778,7 @@ jobs:
type: 'Debug'
image: 'windows-11-arm'
openssh: 'OpenSSH-Windows'
tflags: '--min=1650'
config: >-
-DENABLE_DEBUG=ON
-DCURL_USE_SCHANNEL=ON
@ -773,7 +786,7 @@ jobs:
fail-fast: false
steps:
- uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
with:
msystem: ${{ matrix.arch == 'arm64' && 'clangarm64' || 'ucrt64' }}
release: ${{ contains(matrix.image, 'arm') }}
@ -795,7 +808,7 @@ jobs:
timeout-minutes: 45
run: vcpkg x-set-installed ${MATRIX_INSTALL_VCPKG} --triplet="${MATRIX_ARCH}-${MATRIX_PLAT}"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
@ -900,7 +913,7 @@ jobs:
- name: 'curl -V'
timeout-minutes: 1
run: |
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
/usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
if [ "${MATRIX_PLAT}" != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll
PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH"
"bld/src/${MATRIX_TYPE}/curl.exe" --disable --version

View file

@ -1,3 +1,7 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
Guenter Knauf <lists@gknw.net> <gk@gknw.de>
Gisle Vanem <gvanem@yahoo.no> <gisle.vanem@gmail.com>
Gisle Vanem <gvanem@yahoo.no> <gvanem@broadpark.no>

View file

@ -1,24 +0,0 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
@CMAKE_CONFIGURABLE_FILE_CONTENT@

View file

@ -29,7 +29,7 @@ if(WIN32 AND (ENABLE_DEBUG OR ENABLE_CURLDEBUG))
# e.g. curl_easy_perform_ev() or curl_dbg_*(),
# so disable symbol hiding for debug builds and for memory tracking.
set(CURL_HIDDEN_SYMBOLS OFF)
elseif(DOS OR AMIGA OR MINGW32CE)
elseif(DOS OR AMIGA)
set(CURL_HIDDEN_SYMBOLS OFF)
endif()

View file

@ -29,7 +29,7 @@
#include <fcntl.h>
/* */
#if defined(sun) || defined(__sun__) || \
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
# define PLATFORM_SOLARIS
# else
@ -119,7 +119,10 @@ int main(void)
#include <stdarg.h>
#include <string.h>
#include <float.h>
int main(void) { return 0; }
int main(void)
{
return 0;
}
#endif
#ifdef HAVE_FILE_OFFSET_BITS
@ -128,7 +131,7 @@ int main(void) { return 0; }
We cannot simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T (((off_t)1 << 62) - 1 + ((off_t)1 << 62))
static int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 &&
LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@ -272,7 +275,10 @@ int main(void)
#include <string.h>
#include <errno.h>
static void check(char c) { (void)c; }
static void check(char c)
{
(void)c;
}
int main(void)
{
@ -289,7 +295,10 @@ int main(void)
#include <errno.h>
/* Float, because a pointer cannot be implicitly cast to float */
static void check(float f) { (void)f; }
static void check(float f)
{
(void)f;
}
int main(void)
{

View file

@ -29,31 +29,27 @@
# - `BROTLICOMMON_LIBRARY`: Absolute path to `brotlicommon` library.
# - `BROTLIDEC_LIBRARY`: Absolute path to `brotlidec` library.
#
# Result variables:
# Defines:
#
# - `BROTLI_FOUND`: System has brotli.
# - `BROTLI_INCLUDE_DIRS`: The brotli include directories.
# - `BROTLI_LIBRARIES`: The brotli library names.
# - `BROTLI_LIBRARY_DIRS`: The brotli library directories.
# - `BROTLI_PC_REQUIRES`: The brotli pkg-config packages.
# - `BROTLI_CFLAGS`: Required compiler flags.
# - `BROTLI_VERSION`: Version of brotli.
# - `CURL::brotli`: brotli library target.
set(BROTLI_PC_REQUIRES "libbrotlidec" "libbrotlicommon") # order is significant: brotlidec then brotlicommon
set(_brotli_pc_requires "libbrotlidec" "libbrotlicommon") # order is significant: brotlidec then brotlicommon
if(CURL_USE_PKGCONFIG AND
NOT DEFINED BROTLI_INCLUDE_DIR AND
NOT DEFINED BROTLICOMMON_LIBRARY AND
NOT DEFINED BROTLIDEC_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(BROTLI ${BROTLI_PC_REQUIRES})
pkg_check_modules(_brotli ${_brotli_pc_requires})
endif()
if(BROTLI_FOUND)
if(_brotli_FOUND)
set(Brotli_FOUND TRUE)
set(BROTLI_VERSION ${BROTLI_libbrotlicommon_VERSION})
string(REPLACE ";" " " BROTLI_CFLAGS "${BROTLI_CFLAGS}")
message(STATUS "Found Brotli (via pkg-config): ${BROTLI_INCLUDE_DIRS} (found version \"${BROTLI_VERSION}\")")
set(BROTLI_FOUND TRUE)
set(BROTLI_VERSION ${_brotli_libbrotlicommon_VERSION})
message(STATUS "Found Brotli (via pkg-config): ${_brotli_INCLUDE_DIRS} (found version \"${BROTLI_VERSION}\")")
else()
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
find_library(BROTLICOMMON_LIBRARY NAMES "brotlicommon")
@ -68,9 +64,25 @@ else()
)
if(BROTLI_FOUND)
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(BROTLI_LIBRARIES ${BROTLIDEC_LIBRARY} ${BROTLICOMMON_LIBRARY})
set(_brotli_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(_brotli_LIBRARIES ${BROTLIDEC_LIBRARY} ${BROTLICOMMON_LIBRARY})
endif()
mark_as_advanced(BROTLI_INCLUDE_DIR BROTLIDEC_LIBRARY BROTLICOMMON_LIBRARY)
endif()
if(BROTLI_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_brotli_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::brotli)
add_library(CURL::brotli INTERFACE IMPORTED)
set_target_properties(CURL::brotli PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_brotli_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_brotli_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_brotli_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_brotli_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_brotli_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `CARES_INCLUDE_DIR`: Absolute path to c-ares include directory.
# - `CARES_LIBRARY`: Absolute path to `cares` library.
# - `CARES_INCLUDE_DIR`: Absolute path to c-ares include directory.
# - `CARES_LIBRARY`: Absolute path to `cares` library.
#
# Result variables:
# Defines:
#
# - `CARES_FOUND`: System has c-ares.
# - `CARES_INCLUDE_DIRS`: The c-ares include directories.
# - `CARES_LIBRARIES`: The c-ares library names.
# - `CARES_LIBRARY_DIRS`: The c-ares library directories.
# - `CARES_PC_REQUIRES`: The c-ares pkg-config packages.
# - `CARES_CFLAGS`: Required compiler flags.
# - `CARES_VERSION`: Version of c-ares.
# - `CARES_FOUND`: System has c-ares.
# - `CARES_VERSION`: Version of c-ares.
# - `CURL::cares`: c-ares library target.
set(CARES_PC_REQUIRES "libcares")
set(_cares_pc_requires "libcares")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED CARES_INCLUDE_DIR AND
NOT DEFINED CARES_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(CARES ${CARES_PC_REQUIRES})
pkg_check_modules(_cares ${_cares_pc_requires})
endif()
if(CARES_FOUND)
if(_cares_FOUND)
set(Cares_FOUND TRUE)
string(REPLACE ";" " " CARES_CFLAGS "${CARES_CFLAGS}")
message(STATUS "Found Cares (via pkg-config): ${CARES_INCLUDE_DIRS} (found version \"${CARES_VERSION}\")")
set(CARES_FOUND TRUE)
set(CARES_VERSION ${_cares_VERSION})
message(STATUS "Found Cares (via pkg-config): ${_cares_INCLUDE_DIRS} (found version \"${CARES_VERSION}\")")
else()
find_path(CARES_INCLUDE_DIR NAMES "ares.h")
find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
@ -85,13 +82,29 @@ else()
)
if(CARES_FOUND)
set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
set(CARES_LIBRARIES ${CARES_LIBRARY})
set(_cares_INCLUDE_DIRS ${CARES_INCLUDE_DIR})
set(_cares_LIBRARIES ${CARES_LIBRARY})
endif()
mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY)
endif()
if(CARES_FOUND AND WIN32)
list(APPEND CARES_LIBRARIES "iphlpapi") # for if_indextoname and others
if(CARES_FOUND)
if(WIN32)
list(APPEND _cares_LIBRARIES "iphlpapi") # for if_indextoname and others
endif()
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_cares_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::cares)
add_library(CURL::cares INTERFACE IMPORTED)
set_target_properties(CURL::cares PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_cares_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_cares_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_cares_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_cares_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_cares_LIBRARIES}")
endif()
endif()

View file

@ -25,19 +25,15 @@
#
# Input variables:
#
# - `GSS_ROOT_DIR`: Absolute path to the root installation of GSS. (also supported as environment)
# - `GSS_ROOT_DIR`: Absolute path to the root installation of GSS. (also supported as environment)
#
# Result variables:
# Defines:
#
# - `GSS_FOUND`: System has a GSS library.
# - `GSS_FLAVOUR`: "GNU" or "MIT" if anything found.
# - `GSS_INCLUDE_DIRS`: The GSS include directories.
# - `GSS_LIBRARIES`: The GSS library names.
# - `GSS_LIBRARY_DIRS`: The GSS library directories.
# - `GSS_PC_REQUIRES`: The GSS pkg-config packages.
# - `GSS_CFLAGS`: Required compiler flags.
# - `GSS_VERSION`: This is set to version advertised by pkg-config or read from manifest.
# In case the library is found but no version info available it is set to "unknown"
# - `GSS_FOUND`: System has a GSS library.
# - `GSS_VERSION`: This is set to version advertised by pkg-config or read from manifest.
# In case the library is found but no version info available it is set to "unknown"
# - `CURL::gss`: GSS library target.
# - CURL_GSS_FLAVOUR`: Custom property. "GNU" or "MIT" if detected.
set(_gnu_modname "gss")
set(_mit_modname "mit-krb5-gssapi")
@ -140,7 +136,7 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr
# Older versions may not have the "--vendor" parameter. In this case we just do not care.
if(NOT _gss_configure_failed AND NOT _gss_vendor MATCHES "Heimdal|heimdal")
set(GSS_FLAVOUR "MIT") # assume a default, should not really matter
set(_gss_flavour "MIT") # assume a default, should not really matter
endif()
else() # Either there is no config script or we are on a platform that does not provide one (Windows?)
@ -156,7 +152,7 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr
cmake_pop_check_state()
if(_gss_have_mit_headers)
set(GSS_FLAVOUR "MIT")
set(_gss_flavour "MIT")
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND _gss_libdir_suffixes "lib/AMD64")
@ -174,14 +170,14 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr
find_path(_gss_INCLUDE_DIRS NAMES "gss.h" HINTS ${_gss_root_hints} PATH_SUFFIXES "include")
if(_gss_INCLUDE_DIRS)
set(GSS_FLAVOUR "GNU")
set(GSS_PC_REQUIRES ${_gnu_modname})
set(_gss_flavour "GNU")
set(_gss_pc_requires ${_gnu_modname})
set(_gss_libname "gss")
endif()
endif()
# If we have headers, look up libraries
if(GSS_FLAVOUR)
if(_gss_flavour)
set(_gss_libdir_hints ${_gss_root_hints})
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
cmake_path(GET _gss_INCLUDE_DIRS PARENT_PATH _gss_calculated_potential_root)
@ -193,34 +189,28 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr
find_library(_gss_LIBRARIES NAMES ${_gss_libname} HINTS ${_gss_libdir_hints} PATH_SUFFIXES ${_gss_libdir_suffixes})
endif()
endif()
if(NOT GSS_FLAVOUR)
if(NOT _gss_flavour)
message(FATAL_ERROR "GNU or MIT GSS is required")
endif()
else()
# _gss_MODULE_NAME set since CMake 3.16.
# _pkg_check_modules_pkg_name is undocumented and used as a fallback for CMake <3.16 versions.
if(_gss_MODULE_NAME STREQUAL _gnu_modname OR _pkg_check_modules_pkg_name STREQUAL _gnu_modname)
set(GSS_FLAVOUR "GNU")
set(GSS_PC_REQUIRES ${_gnu_modname})
set(_gss_flavour "GNU")
set(_gss_pc_requires ${_gnu_modname})
elseif(_gss_MODULE_NAME STREQUAL _mit_modname OR _pkg_check_modules_pkg_name STREQUAL _mit_modname)
set(GSS_FLAVOUR "MIT")
set(GSS_PC_REQUIRES ${_mit_modname})
set(_gss_flavour "MIT")
set(_gss_pc_requires ${_mit_modname})
else()
message(FATAL_ERROR "GNU or MIT GSS is required")
endif()
message(STATUS "Found GSS/${GSS_FLAVOUR} (via pkg-config): ${_gss_INCLUDE_DIRS} (found version \"${_gss_version}\")")
message(STATUS "Found GSS/${_gss_flavour} (via pkg-config): ${_gss_INCLUDE_DIRS} (found version \"${_gss_version}\")")
endif()
string(REPLACE ";" " " _gss_CFLAGS "${_gss_CFLAGS}")
set(GSS_INCLUDE_DIRS ${_gss_INCLUDE_DIRS})
set(GSS_LIBRARIES ${_gss_LIBRARIES})
set(GSS_LIBRARY_DIRS ${_gss_LIBRARY_DIRS})
set(GSS_CFLAGS ${_gss_CFLAGS})
set(GSS_VERSION ${_gss_version})
if(NOT GSS_VERSION)
if(GSS_FLAVOUR STREQUAL "MIT")
if(_gss_flavour STREQUAL "MIT")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
cmake_host_system_information(RESULT _mit_version QUERY WINDOWS_REGISTRY
"HKLM/SOFTWARE/MIT/Kerberos/SDK/CurrentVersion" VALUE "VersionString")
@ -234,9 +224,9 @@ if(NOT GSS_VERSION)
set(GSS_VERSION "MIT Unknown")
endif()
else() # GNU
if(GSS_INCLUDE_DIRS AND EXISTS "${GSS_INCLUDE_DIRS}/gss.h")
if(_gss_INCLUDE_DIRS AND EXISTS "${_gss_INCLUDE_DIRS}/gss.h")
set(_version_regex "#[\t ]*define[\t ]+GSS_VERSION[\t ]+\"([^\"]*)\"")
file(STRINGS "${GSS_INCLUDE_DIRS}/gss.h" _version_str REGEX "${_version_regex}")
file(STRINGS "${_gss_INCLUDE_DIRS}/gss.h" _version_str REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
set(GSS_VERSION "${_version_str}")
unset(_version_regex)
@ -248,8 +238,8 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GSS
REQUIRED_VARS
GSS_FLAVOUR
GSS_LIBRARIES
_gss_flavour
_gss_LIBRARIES
VERSION_VAR
GSS_VERSION
FAIL_MESSAGE
@ -266,3 +256,20 @@ mark_as_advanced(
_gss_PREFIX
_gss_version
)
if(GSS_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_gss_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::gss)
add_library(CURL::gss INTERFACE IMPORTED)
set_target_properties(CURL::gss PROPERTIES
INTERFACE_CURL_GSS_FLAVOUR "${_gss_flavour}"
INTERFACE_LIBCURL_PC_MODULES "${_gss_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_gss_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_gss_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_gss_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_gss_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `GNUTLS_INCLUDE_DIR`: Absolute path to GnuTLS include directory.
# - `GNUTLS_LIBRARY`: Absolute path to `gnutls` library.
# - `GNUTLS_INCLUDE_DIR`: Absolute path to GnuTLS include directory.
# - `GNUTLS_LIBRARY`: Absolute path to `gnutls` library.
#
# Result variables:
# Defines:
#
# - `GNUTLS_FOUND`: System has GnuTLS.
# - `GNUTLS_INCLUDE_DIRS`: The GnuTLS include directories.
# - `GNUTLS_LIBRARIES`: The GnuTLS library names.
# - `GNUTLS_LIBRARY_DIRS`: The GnuTLS library directories.
# - `GNUTLS_PC_REQUIRES`: The GnuTLS pkg-config packages.
# - `GNUTLS_CFLAGS`: Required compiler flags.
# - `GNUTLS_VERSION`: Version of GnuTLS.
# - `GNUTLS_FOUND`: System has GnuTLS.
# - `GNUTLS_VERSION`: Version of GnuTLS.
# - `CURL::gnutls`: GnuTLS library target.
set(GNUTLS_PC_REQUIRES "gnutls")
set(_gnutls_pc_requires "gnutls")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED GNUTLS_INCLUDE_DIR AND
NOT DEFINED GNUTLS_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(GNUTLS ${GNUTLS_PC_REQUIRES})
pkg_check_modules(_gnutls ${_gnutls_pc_requires})
endif()
if(GNUTLS_FOUND)
if(_gnutls_FOUND)
set(GnuTLS_FOUND TRUE)
string(REPLACE ";" " " GNUTLS_CFLAGS "${GNUTLS_CFLAGS}")
message(STATUS "Found GnuTLS (via pkg-config): ${GNUTLS_INCLUDE_DIRS} (found version \"${GNUTLS_VERSION}\")")
set(GNUTLS_FOUND TRUE)
set(GNUTLS_VERSION ${_gnutls_VERSION})
message(STATUS "Found GnuTLS (via pkg-config): ${_gnutls_INCLUDE_DIRS} (found version \"${GNUTLS_VERSION}\")")
else()
find_path(GNUTLS_INCLUDE_DIR NAMES "gnutls/gnutls.h")
find_library(GNUTLS_LIBRARY NAMES "gnutls" "libgnutls")
@ -75,9 +72,25 @@ else()
)
if(GNUTLS_FOUND)
set(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
set(_gnutls_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
set(_gnutls_LIBRARIES ${GNUTLS_LIBRARY})
endif()
mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
endif()
if(GNUTLS_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_gnutls_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::gnutls)
add_library(CURL::gnutls INTERFACE IMPORTED)
set_target_properties(CURL::gnutls PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_gnutls_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_gnutls_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_gnutls_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_gnutls_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_gnutls_LIBRARIES}")
endif()
endif()

View file

@ -29,32 +29,28 @@
# - `LDAP_LIBRARY`: Absolute path to `ldap` library.
# - `LDAP_LBER_LIBRARY`: Absolute path to `lber` library.
#
# Result variables:
# Defines:
#
# - `LDAP_FOUND`: System has ldap.
# - `LDAP_INCLUDE_DIRS`: The ldap include directories.
# - `LDAP_LIBRARIES`: The ldap library names.
# - `LDAP_LIBRARY_DIRS`: The ldap library directories.
# - `LDAP_PC_REQUIRES`: The ldap pkg-config packages.
# - `LDAP_CFLAGS`: Required compiler flags.
# - `LDAP_VERSION`: Version of ldap.
# - `CURL::ldap`: ldap library target.
set(LDAP_PC_REQUIRES "ldap" "lber")
set(_ldap_pc_requires "ldap" "lber")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LDAP_INCLUDE_DIR AND
NOT DEFINED LDAP_LIBRARY AND
NOT DEFINED LDAP_LBER_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LDAP ${LDAP_PC_REQUIRES})
pkg_check_modules(_ldap ${_ldap_pc_requires})
endif()
if(LDAP_FOUND)
set(LDAP_VERSION ${LDAP_ldap_VERSION})
string(REPLACE ";" " " LDAP_CFLAGS "${LDAP_CFLAGS}")
message(STATUS "Found LDAP (via pkg-config): ${LDAP_INCLUDE_DIRS} (found version \"${LDAP_VERSION}\")")
if(_ldap_FOUND)
set(LDAP_FOUND TRUE)
set(LDAP_VERSION ${_ldap_ldap_VERSION})
message(STATUS "Found LDAP (via pkg-config): ${_ldap_INCLUDE_DIRS} (found version \"${LDAP_VERSION}\")")
else()
set(LDAP_PC_REQUIRES "") # Depend on pkg-config only when found via pkg-config
set(_ldap_pc_requires "") # Depend on pkg-config only when found via pkg-config
# On Apple the SDK LDAP gets picked up from
# 'MacOSX.sdk/System/Library/Frameworks/LDAP.framework/Headers', which contains
@ -99,9 +95,25 @@ else()
)
if(LDAP_FOUND)
set(LDAP_INCLUDE_DIRS ${LDAP_INCLUDE_DIR})
set(LDAP_LIBRARIES ${LDAP_LIBRARY} ${LDAP_LBER_LIBRARY})
set(_ldap_INCLUDE_DIRS ${LDAP_INCLUDE_DIR})
set(_ldap_LIBRARIES ${LDAP_LIBRARY} ${LDAP_LBER_LIBRARY})
endif()
mark_as_advanced(LDAP_INCLUDE_DIR LDAP_LIBRARY LDAP_LBER_LIBRARY)
endif()
if(LDAP_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_ldap_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::ldap)
add_library(CURL::ldap INTERFACE IMPORTED)
set_target_properties(CURL::ldap PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_ldap_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_ldap_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_ldap_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_ldap_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_ldap_LIBRARIES}")
endif()
endif()

View file

@ -0,0 +1,65 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Find the libbacktrace library
#
# Input variables:
#
# - `LIBBACKTRACE_INCLUDE_DIR`: Absolute path to libbacktrace include directory.
# - `LIBBACKTRACE_LIBRARY`: Absolute path to `libbacktrace` library.
#
# Defines:
#
# - `LIBBACKTRACE_FOUND`: System has libbacktrace.
# - `CURL::libbacktrace`: libbacktrace library target.
find_path(LIBBACKTRACE_INCLUDE_DIR NAMES "backtrace.h")
find_library(LIBBACKTRACE_LIBRARY NAMES "backtrace" "libbacktrace")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libbacktrace
REQUIRED_VARS
LIBBACKTRACE_INCLUDE_DIR
LIBBACKTRACE_LIBRARY
)
if(LIBBACKTRACE_FOUND)
set(_libbacktrace_INCLUDE_DIRS ${LIBBACKTRACE_INCLUDE_DIR})
set(_libbacktrace_LIBRARIES ${LIBBACKTRACE_LIBRARY})
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libbacktrace_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libbacktrace)
add_library(CURL::libbacktrace INTERFACE IMPORTED)
set_target_properties(CURL::libbacktrace PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libbacktrace_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libbacktrace_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libbacktrace_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libbacktrace_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libbacktrace_LIBRARIES}")
endif()
endif()
mark_as_advanced(LIBBACKTRACE_INCLUDE_DIR LIBBACKTRACE_LIBRARY)

View file

@ -25,32 +25,28 @@
#
# Input variables:
#
# - `LIBGSASL_INCLUDE_DIR`: Absolute path to libgsasl include directory.
# - `LIBGSASL_LIBRARY`: Absolute path to `libgsasl` library.
# - `LIBGSASL_INCLUDE_DIR`: Absolute path to libgsasl include directory.
# - `LIBGSASL_LIBRARY`: Absolute path to `libgsasl` library.
#
# Result variables:
# Defines:
#
# - `LIBGSASL_FOUND`: System has libgsasl.
# - `LIBGSASL_INCLUDE_DIRS`: The libgsasl include directories.
# - `LIBGSASL_LIBRARIES`: The libgsasl library names.
# - `LIBGSASL_LIBRARY_DIRS`: The libgsasl library directories.
# - `LIBGSASL_PC_REQUIRES`: The libgsasl pkg-config packages.
# - `LIBGSASL_CFLAGS`: Required compiler flags.
# - `LIBGSASL_VERSION`: Version of libgsasl.
# - `LIBGSASL_FOUND`: System has libgsasl.
# - `LIBGSASL_VERSION`: Version of libgsasl.
# - `CURL::libgsasl`: libgsasl library target.
set(LIBGSASL_PC_REQUIRES "libgsasl")
set(_libgsasl_pc_requires "libgsasl")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBGSASL_INCLUDE_DIR AND
NOT DEFINED LIBGSASL_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBGSASL ${LIBGSASL_PC_REQUIRES})
pkg_check_modules(_libgsasl ${_libgsasl_pc_requires})
endif()
if(LIBGSASL_FOUND)
if(_libgsasl_FOUND)
set(Libgsasl_FOUND TRUE)
string(REPLACE ";" " " LIBGSASL_CFLAGS "${LIBGSASL_CFLAGS}")
message(STATUS "Found Libgsasl (via pkg-config): ${LIBGSASL_INCLUDE_DIRS} (found version \"${LIBGSASL_VERSION}\")")
set(LIBGSASL_FOUND TRUE)
message(STATUS "Found Libgsasl (via pkg-config): ${_libgsasl_INCLUDE_DIRS} (found version \"${LIBGSASL_VERSION}\")")
else()
find_path(LIBGSASL_INCLUDE_DIR NAMES "gsasl.h")
find_library(LIBGSASL_LIBRARY NAMES "gsasl" "libgsasl")
@ -75,9 +71,25 @@ else()
)
if(LIBGSASL_FOUND)
set(LIBGSASL_INCLUDE_DIRS ${LIBGSASL_INCLUDE_DIR})
set(LIBGSASL_LIBRARIES ${LIBGSASL_LIBRARY})
set(_libgsasl_INCLUDE_DIRS ${LIBGSASL_INCLUDE_DIR})
set(_libgsasl_LIBRARIES ${LIBGSASL_LIBRARY})
endif()
mark_as_advanced(LIBGSASL_INCLUDE_DIR LIBGSASL_LIBRARY)
endif()
if(LIBGSASL_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libgsasl_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libgsasl)
add_library(CURL::libgsasl INTERFACE IMPORTED)
set_target_properties(CURL::libgsasl PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libgsasl_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libgsasl_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libgsasl_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libgsasl_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libgsasl_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBIDN2_INCLUDE_DIR`: Absolute path to libidn2 include directory.
# - `LIBIDN2_LIBRARY`: Absolute path to `libidn2` library.
# - `LIBIDN2_INCLUDE_DIR`: Absolute path to libidn2 include directory.
# - `LIBIDN2_LIBRARY`: Absolute path to `libidn2` library.
#
# Result variables:
# Defines:
#
# - `LIBIDN2_FOUND`: System has libidn2.
# - `LIBIDN2_INCLUDE_DIRS`: The libidn2 include directories.
# - `LIBIDN2_LIBRARIES`: The libidn2 library names.
# - `LIBIDN2_LIBRARY_DIRS`: The libidn2 library directories.
# - `LIBIDN2_PC_REQUIRES`: The libidn2 pkg-config packages.
# - `LIBIDN2_CFLAGS`: Required compiler flags.
# - `LIBIDN2_VERSION`: Version of libidn2.
# - `LIBIDN2_FOUND`: System has libidn2.
# - `LIBIDN2_VERSION`: Version of libidn2.
# - `CURL::libidn2`: libidn2 library target.
set(LIBIDN2_PC_REQUIRES "libidn2")
set(_libidn2_pc_requires "libidn2")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBIDN2_INCLUDE_DIR AND
NOT DEFINED LIBIDN2_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBIDN2 ${LIBIDN2_PC_REQUIRES})
pkg_check_modules(_libidn2 ${_libidn2_pc_requires})
endif()
if(LIBIDN2_FOUND)
if(_libidn2_FOUND)
set(Libidn2_FOUND TRUE)
string(REPLACE ";" " " LIBIDN2_CFLAGS "${LIBIDN2_CFLAGS}")
message(STATUS "Found Libidn2 (via pkg-config): ${LIBIDN2_INCLUDE_DIRS} (found version \"${LIBIDN2_VERSION}\")")
set(LIBIDN2_FOUND TRUE)
set(LIBIDN2_VERSION ${_libidn2_VERSION})
message(STATUS "Found Libidn2 (via pkg-config): ${_libidn2_INCLUDE_DIRS} (found version \"${LIBIDN2_VERSION}\")")
else()
find_path(LIBIDN2_INCLUDE_DIR NAMES "idn2.h")
find_library(LIBIDN2_LIBRARY NAMES "idn2" "libidn2")
@ -75,9 +72,25 @@ else()
)
if(LIBIDN2_FOUND)
set(LIBIDN2_INCLUDE_DIRS ${LIBIDN2_INCLUDE_DIR})
set(LIBIDN2_LIBRARIES ${LIBIDN2_LIBRARY})
set(_libidn2_INCLUDE_DIRS ${LIBIDN2_INCLUDE_DIR})
set(_libidn2_LIBRARIES ${LIBIDN2_LIBRARY})
endif()
mark_as_advanced(LIBIDN2_INCLUDE_DIR LIBIDN2_LIBRARY)
endif()
if(LIBIDN2_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libidn2_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libidn2)
add_library(CURL::libidn2 INTERFACE IMPORTED)
set_target_properties(CURL::libidn2 PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libidn2_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libidn2_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libidn2_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libidn2_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libidn2_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBPSL_INCLUDE_DIR`: Absolute path to libpsl include directory.
# - `LIBPSL_LIBRARY`: Absolute path to `libpsl` library.
# - `LIBPSL_INCLUDE_DIR`: Absolute path to libpsl include directory.
# - `LIBPSL_LIBRARY`: Absolute path to `libpsl` library.
#
# Result variables:
# Defines:
#
# - `LIBPSL_FOUND`: System has libpsl.
# - `LIBPSL_INCLUDE_DIRS`: The libpsl include directories.
# - `LIBPSL_LIBRARIES`: The libpsl library names.
# - `LIBPSL_LIBRARY_DIRS`: The libpsl library directories.
# - `LIBPSL_PC_REQUIRES`: The libpsl pkg-config packages.
# - `LIBPSL_CFLAGS`: Required compiler flags.
# - `LIBPSL_VERSION`: Version of libpsl.
# - `LIBPSL_FOUND`: System has libpsl.
# - `LIBPSL_VERSION`: Version of libpsl.
# - `CURL::libpsl`: libpsl library target.
set(LIBPSL_PC_REQUIRES "libpsl")
set(_libpsl_pc_requires "libpsl")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBPSL_INCLUDE_DIR AND
NOT DEFINED LIBPSL_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBPSL ${LIBPSL_PC_REQUIRES})
pkg_check_modules(_libpsl ${_libpsl_pc_requires})
endif()
if(LIBPSL_FOUND AND LIBPSL_INCLUDE_DIRS)
if(_libpsl_FOUND AND _libpsl_INCLUDE_DIRS)
set(Libpsl_FOUND TRUE)
string(REPLACE ";" " " LIBPSL_CFLAGS "${LIBPSL_CFLAGS}")
message(STATUS "Found Libpsl (via pkg-config): ${LIBPSL_INCLUDE_DIRS} (found version \"${LIBPSL_VERSION}\")")
set(LIBPSL_FOUND TRUE)
set(LIBPSL_VERSION ${_libpsl_VERSION})
message(STATUS "Found Libpsl (via pkg-config): ${_libpsl_INCLUDE_DIRS} (found version \"${LIBPSL_VERSION}\")")
else()
find_path(LIBPSL_INCLUDE_DIR NAMES "libpsl.h")
find_library(LIBPSL_LIBRARY NAMES "psl" "libpsl")
@ -75,9 +72,25 @@ else()
)
if(LIBPSL_FOUND)
set(LIBPSL_INCLUDE_DIRS ${LIBPSL_INCLUDE_DIR})
set(LIBPSL_LIBRARIES ${LIBPSL_LIBRARY})
set(_libpsl_INCLUDE_DIRS ${LIBPSL_INCLUDE_DIR})
set(_libpsl_LIBRARIES ${LIBPSL_LIBRARY})
endif()
mark_as_advanced(LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
endif()
if(LIBPSL_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libpsl_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libpsl)
add_library(CURL::libpsl INTERFACE IMPORTED)
set_target_properties(CURL::libpsl PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libpsl_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libpsl_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libpsl_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libpsl_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libpsl_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBRTMP_INCLUDE_DIR`: Absolute path to librtmp include directory.
# - `LIBRTMP_LIBRARY`: Absolute path to `librtmp` library.
# - `LIBRTMP_INCLUDE_DIR`: Absolute path to librtmp include directory.
# - `LIBRTMP_LIBRARY`: Absolute path to `librtmp` library.
#
# Result variables:
# Defines:
#
# - `LIBRTMP_FOUND`: System has librtmp.
# - `LIBRTMP_INCLUDE_DIRS`: The librtmp include directories.
# - `LIBRTMP_LIBRARIES`: The librtmp library names.
# - `LIBRTMP_LIBRARY_DIRS`: The librtmp library directories.
# - `LIBRTMP_PC_REQUIRES`: The librtmp pkg-config packages.
# - `LIBRTMP_CFLAGS`: Required compiler flags.
# - `LIBRTMP_VERSION`: Version of librtmp.
# - `LIBRTMP_FOUND`: System has librtmp.
# - `LIBRTMP_VERSION`: Version of librtmp.
# - `CURL::librtmp`: librtmp library target.
set(LIBRTMP_PC_REQUIRES "librtmp")
set(_librtmp_pc_requires "librtmp")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBRTMP_INCLUDE_DIR AND
NOT DEFINED LIBRTMP_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBRTMP ${LIBRTMP_PC_REQUIRES})
pkg_check_modules(_librtmp ${_librtmp_pc_requires})
endif()
if(LIBRTMP_FOUND AND LIBRTMP_INCLUDE_DIRS)
if(_librtmp_FOUND AND _librtmp_INCLUDE_DIRS)
set(Librtmp_FOUND TRUE)
string(REPLACE ";" " " LIBRTMP_CFLAGS "${LIBRTMP_CFLAGS}")
message(STATUS "Found Librtmp (via pkg-config): ${LIBRTMP_INCLUDE_DIRS} (found version \"${LIBRTMP_VERSION}\")")
set(LIBRTMP_FOUND TRUE)
set(LIBRTMP_VERSION ${_librtmp_VERSION})
message(STATUS "Found Librtmp (via pkg-config): ${_librtmp_INCLUDE_DIRS} (found version \"${LIBRTMP_VERSION}\")")
else()
find_path(LIBRTMP_INCLUDE_DIR NAMES "librtmp/rtmp.h")
find_library(LIBRTMP_LIBRARY NAMES "rtmp")
@ -85,19 +82,35 @@ else()
)
if(LIBRTMP_FOUND)
set(LIBRTMP_INCLUDE_DIRS ${LIBRTMP_INCLUDE_DIR})
set(LIBRTMP_LIBRARIES ${LIBRTMP_LIBRARY})
set(_librtmp_INCLUDE_DIRS ${LIBRTMP_INCLUDE_DIR})
set(_librtmp_LIBRARIES ${LIBRTMP_LIBRARY})
endif()
mark_as_advanced(LIBRTMP_INCLUDE_DIR LIBRTMP_LIBRARY)
# Necessary when linking a static librtmp
find_package(OpenSSL)
if(OPENSSL_FOUND)
list(APPEND LIBRTMP_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
if(OpenSSL_FOUND)
list(APPEND _librtmp_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
endif()
endif()
if(LIBRTMP_FOUND AND WIN32)
list(APPEND LIBRTMP_LIBRARIES "winmm")
if(LIBRTMP_FOUND)
if(WIN32)
list(APPEND _librtmp_LIBRARIES "winmm")
endif()
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_librtmp_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::librtmp)
add_library(CURL::librtmp INTERFACE IMPORTED)
set_target_properties(CURL::librtmp PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_librtmp_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_librtmp_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_librtmp_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_librtmp_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_librtmp_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBSSH_INCLUDE_DIR`: Absolute path to libssh include directory.
# - `LIBSSH_LIBRARY`: Absolute path to `libssh` library.
# - `LIBSSH_INCLUDE_DIR`: Absolute path to libssh include directory.
# - `LIBSSH_LIBRARY`: Absolute path to `libssh` library.
#
# Result variables:
# Defines:
#
# - `LIBSSH_FOUND`: System has libssh.
# - `LIBSSH_INCLUDE_DIRS`: The libssh include directories.
# - `LIBSSH_LIBRARIES`: The libssh library names.
# - `LIBSSH_LIBRARY_DIRS`: The libssh library directories.
# - `LIBSSH_PC_REQUIRES`: The libssh pkg-config packages.
# - `LIBSSH_CFLAGS`: Required compiler flags.
# - `LIBSSH_VERSION`: Version of libssh.
# - `LIBSSH_FOUND`: System has libssh.
# - `LIBSSH_VERSION`: Version of libssh.
# - `CURL::libssh`: libssh library target.
set(LIBSSH_PC_REQUIRES "libssh")
set(_libssh_pc_requires "libssh")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBSSH_INCLUDE_DIR AND
NOT DEFINED LIBSSH_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBSSH ${LIBSSH_PC_REQUIRES})
pkg_check_modules(_libssh ${_libssh_pc_requires})
endif()
if(LIBSSH_FOUND)
if(_libssh_FOUND)
set(Libssh_FOUND TRUE)
string(REPLACE ";" " " LIBSSH_CFLAGS "${LIBSSH_CFLAGS}")
message(STATUS "Found Libssh (via pkg-config): ${LIBSSH_INCLUDE_DIRS} (found version \"${LIBSSH_VERSION}\")")
set(LIBSSH_FOUND TRUE)
set(LIBSSH_VERSION ${_libssh_VERSION})
message(STATUS "Found Libssh (via pkg-config): ${_libssh_INCLUDE_DIRS} (found version \"${LIBSSH_VERSION}\")")
else()
find_path(LIBSSH_INCLUDE_DIR NAMES "libssh/libssh.h")
find_library(LIBSSH_LIBRARY NAMES "ssh" "libssh")
@ -85,13 +82,29 @@ else()
)
if(LIBSSH_FOUND)
set(LIBSSH_INCLUDE_DIRS ${LIBSSH_INCLUDE_DIR})
set(LIBSSH_LIBRARIES ${LIBSSH_LIBRARY})
set(_libssh_INCLUDE_DIRS ${LIBSSH_INCLUDE_DIR})
set(_libssh_LIBRARIES ${LIBSSH_LIBRARY})
endif()
mark_as_advanced(LIBSSH_INCLUDE_DIR LIBSSH_LIBRARY)
endif()
if(LIBSSH_FOUND AND WIN32)
list(APPEND LIBSSH_LIBRARIES "iphlpapi") # for if_nametoindex
if(LIBSSH_FOUND)
if(WIN32)
list(APPEND _libssh_LIBRARIES "iphlpapi") # for if_nametoindex
endif()
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libssh_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libssh)
add_library(CURL::libssh INTERFACE IMPORTED)
set_target_properties(CURL::libssh PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libssh_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libssh_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libssh_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libssh_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libssh_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBSSH2_INCLUDE_DIR`: Absolute path to libssh2 include directory.
# - `LIBSSH2_LIBRARY`: Absolute path to `libssh2` library.
# - `LIBSSH2_INCLUDE_DIR`: Absolute path to libssh2 include directory.
# - `LIBSSH2_LIBRARY`: Absolute path to `libssh2` library.
#
# Result variables:
# Defines:
#
# - `LIBSSH2_FOUND`: System has libssh2.
# - `LIBSSH2_INCLUDE_DIRS`: The libssh2 include directories.
# - `LIBSSH2_LIBRARIES`: The libssh2 library names.
# - `LIBSSH2_LIBRARY_DIRS`: The libssh2 library directories.
# - `LIBSSH2_PC_REQUIRES`: The libssh2 pkg-config packages.
# - `LIBSSH2_CFLAGS`: Required compiler flags.
# - `LIBSSH2_VERSION`: Version of libssh2.
# - `LIBSSH2_FOUND`: System has libssh2.
# - `LIBSSH2_VERSION`: Version of libssh2.
# - `CURL::libssh2`: libssh2 library target.
set(LIBSSH2_PC_REQUIRES "libssh2")
set(_libssh2_pc_requires "libssh2")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBSSH2_INCLUDE_DIR AND
NOT DEFINED LIBSSH2_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBSSH2 ${LIBSSH2_PC_REQUIRES})
pkg_check_modules(_libssh2 ${_libssh2_pc_requires})
endif()
if(LIBSSH2_FOUND AND LIBSSH2_INCLUDE_DIRS)
if(_libssh2_FOUND AND _libssh2_INCLUDE_DIRS)
set(Libssh2_FOUND TRUE)
string(REPLACE ";" " " LIBSSH2_CFLAGS "${LIBSSH2_CFLAGS}")
message(STATUS "Found Libssh2 (via pkg-config): ${LIBSSH2_INCLUDE_DIRS} (found version \"${LIBSSH2_VERSION}\")")
set(LIBSSH2_FOUND TRUE)
set(LIBSSH2_VERSION ${_libssh2_VERSION})
message(STATUS "Found Libssh2 (via pkg-config): ${_libssh2_INCLUDE_DIRS} (found version \"${LIBSSH2_VERSION}\")")
else()
find_path(LIBSSH2_INCLUDE_DIR NAMES "libssh2.h")
find_library(LIBSSH2_LIBRARY NAMES "ssh2" "libssh2")
@ -75,9 +72,25 @@ else()
)
if(LIBSSH2_FOUND)
set(LIBSSH2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR})
set(LIBSSH2_LIBRARIES ${LIBSSH2_LIBRARY})
set(_libssh2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR})
set(_libssh2_LIBRARIES ${LIBSSH2_LIBRARY})
endif()
mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
endif()
if(LIBSSH2_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libssh2_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libssh2)
add_library(CURL::libssh2 INTERFACE IMPORTED)
set_target_properties(CURL::libssh2 PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libssh2_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libssh2_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libssh2_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libssh2_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libssh2_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `LIBUV_INCLUDE_DIR`: Absolute path to libuv include directory.
# - `LIBUV_LIBRARY`: Absolute path to `libuv` library.
# - `LIBUV_INCLUDE_DIR`: Absolute path to libuv include directory.
# - `LIBUV_LIBRARY`: Absolute path to `libuv` library.
#
# Result variables:
# Defines:
#
# - `LIBUV_FOUND`: System has libuv.
# - `LIBUV_INCLUDE_DIRS`: The libuv include directories.
# - `LIBUV_LIBRARIES`: The libuv library names.
# - `LIBUV_LIBRARY_DIRS`: The libuv library directories.
# - `LIBUV_PC_REQUIRES`: The libuv pkg-config packages.
# - `LIBUV_CFLAGS`: Required compiler flags.
# - `LIBUV_VERSION`: Version of libuv.
# - `LIBUV_FOUND`: System has libuv.
# - `LIBUV_VERSION`: Version of libuv.
# - `CURL::libuv`: libuv library target.
set(LIBUV_PC_REQUIRES "libuv")
set(_libuv_pc_requires "libuv")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED LIBUV_INCLUDE_DIR AND
NOT DEFINED LIBUV_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(LIBUV ${LIBUV_PC_REQUIRES})
pkg_check_modules(_libuv ${_libuv_pc_requires})
endif()
if(LIBUV_FOUND)
if(_libuv_FOUND)
set(Libuv_FOUND TRUE)
string(REPLACE ";" " " LIBUV_CFLAGS "${LIBUV_CFLAGS}")
message(STATUS "Found Libuv (via pkg-config): ${LIBUV_INCLUDE_DIRS} (found version \"${LIBUV_VERSION}\")")
set(LIBUV_FOUND TRUE)
set(LIBUV_VERSION ${_libuv_VERSION})
message(STATUS "Found Libuv (via pkg-config): ${_libuv_INCLUDE_DIRS} (found version \"${LIBUV_VERSION}\")")
else()
find_path(LIBUV_INCLUDE_DIR NAMES "uv.h")
find_library(LIBUV_LIBRARY NAMES "uv" "libuv")
@ -85,9 +82,25 @@ else()
)
if(LIBUV_FOUND)
set(LIBUV_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR})
set(LIBUV_LIBRARIES ${LIBUV_LIBRARY})
set(_libuv_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR})
set(_libuv_LIBRARIES ${LIBUV_LIBRARY})
endif()
mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY)
endif()
if(LIBUV_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_libuv_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::libuv)
add_library(CURL::libuv INTERFACE IMPORTED)
set_target_properties(CURL::libuv PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_libuv_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_libuv_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_libuv_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_libuv_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_libuv_LIBRARIES}")
endif()
endif()

View file

@ -25,20 +25,16 @@
#
# Input variables:
#
# - `MBEDTLS_INCLUDE_DIR`: Absolute path to mbedTLS include directory.
# - `MBEDTLS_LIBRARY`: Absolute path to `mbedtls` library.
# - `MBEDX509_LIBRARY`: Absolute path to `mbedx509` library.
# - `MBEDCRYPTO_LIBRARY`: Absolute path to `mbedcrypto` library.
# - `MBEDTLS_INCLUDE_DIR`: Absolute path to mbedTLS include directory.
# - `MBEDTLS_LIBRARY`: Absolute path to `mbedtls` library.
# - `MBEDX509_LIBRARY`: Absolute path to `mbedx509` library.
# - `MBEDCRYPTO_LIBRARY`: Absolute path to `mbedcrypto` library.
#
# Result variables:
# Defines:
#
# - `MBEDTLS_FOUND`: System has mbedTLS.
# - `MBEDTLS_INCLUDE_DIRS`: The mbedTLS include directories.
# - `MBEDTLS_LIBRARIES`: The mbedTLS library names.
# - `MBEDTLS_LIBRARY_DIRS`: The mbedTLS library directories.
# - `MBEDTLS_PC_REQUIRES`: The mbedTLS pkg-config packages.
# - `MBEDTLS_CFLAGS`: Required compiler flags.
# - `MBEDTLS_VERSION`: Version of mbedTLS.
# - `MBEDTLS_FOUND`: System has mbedTLS.
# - `MBEDTLS_VERSION`: Version of mbedTLS.
# - `CURL::mbedtls`: mbedTLS library target.
if(DEFINED MBEDTLS_INCLUDE_DIRS AND NOT DEFINED MBEDTLS_INCLUDE_DIR)
message(WARNING "MBEDTLS_INCLUDE_DIRS is deprecated, use MBEDTLS_INCLUDE_DIR instead.")
@ -46,7 +42,7 @@ if(DEFINED MBEDTLS_INCLUDE_DIRS AND NOT DEFINED MBEDTLS_INCLUDE_DIR)
unset(MBEDTLS_INCLUDE_DIRS)
endif()
set(MBEDTLS_PC_REQUIRES "mbedtls" "mbedx509" "mbedcrypto")
set(_mbedtls_pc_requires "mbedtls" "mbedx509" "mbedcrypto")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED MBEDTLS_INCLUDE_DIR AND
@ -54,16 +50,16 @@ if(CURL_USE_PKGCONFIG AND
NOT DEFINED MBEDX509_LIBRARY AND
NOT DEFINED MBEDCRYPTO_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(MBEDTLS ${MBEDTLS_PC_REQUIRES})
pkg_check_modules(_mbedtls ${_mbedtls_pc_requires})
endif()
if(MBEDTLS_FOUND)
if(_mbedtls_FOUND)
set(MbedTLS_FOUND TRUE)
set(MBEDTLS_VERSION ${MBEDTLS_mbedtls_VERSION})
string(REPLACE ";" " " MBEDTLS_CFLAGS "${MBEDTLS_CFLAGS}")
message(STATUS "Found MbedTLS (via pkg-config): ${MBEDTLS_INCLUDE_DIRS} (found version \"${MBEDTLS_VERSION}\")")
set(MBEDTLS_FOUND TRUE)
set(MBEDTLS_VERSION ${_mbedtls_mbedtls_VERSION})
message(STATUS "Found MbedTLS (via pkg-config): ${_mbedtls_INCLUDE_DIRS} (found version \"${MBEDTLS_VERSION}\")")
else()
set(MBEDTLS_PC_REQUIRES "") # Depend on pkg-config only when found via pkg-config
set(_mbedtls_pc_requires "") # Depend on pkg-config only when found via pkg-config
find_path(MBEDTLS_INCLUDE_DIR NAMES "mbedtls/ssl.h")
find_library(MBEDTLS_LIBRARY NAMES "mbedtls" "libmbedtls")
@ -92,9 +88,25 @@ else()
)
if(MBEDTLS_FOUND)
set(MBEDTLS_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
set(_mbedtls_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
set(_mbedtls_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
endif()
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
endif()
if(MBEDTLS_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_mbedtls_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::mbedtls)
add_library(CURL::mbedtls INTERFACE IMPORTED)
set_target_properties(CURL::mbedtls PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_mbedtls_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_mbedtls_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_mbedtls_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_mbedtls_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_mbedtls_LIBRARIES}")
endif()
endif()

View file

@ -25,31 +25,28 @@
#
# Input variables:
#
# - `NGHTTP2_INCLUDE_DIR`: Absolute path to nghttp2 include directory.
# - `NGHTTP2_LIBRARY`: Absolute path to `nghttp2` library.
# - `NGHTTP2_INCLUDE_DIR`: Absolute path to nghttp2 include directory.
# - `NGHTTP2_LIBRARY`: Absolute path to `nghttp2` library.
#
# Result variables:
# Defines:
#
# - `NGHTTP2_FOUND`: System has nghttp2.
# - `NGHTTP2_INCLUDE_DIRS`: The nghttp2 include directories.
# - `NGHTTP2_LIBRARIES`: The nghttp2 library names.
# - `NGHTTP2_LIBRARY_DIRS`: The nghttp2 library directories.
# - `NGHTTP2_PC_REQUIRES`: The nghttp2 pkg-config packages.
# - `NGHTTP2_CFLAGS`: Required compiler flags.
# - `NGHTTP2_VERSION`: Version of nghttp2.
# - `NGHTTP2_FOUND`: System has nghttp2.
# - `NGHTTP2_VERSION`: Version of nghttp2.
# - `CURL::nghttp2`: nghttp2 library target.
set(NGHTTP2_PC_REQUIRES "libnghttp2")
set(_nghttp2_pc_requires "libnghttp2")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED NGHTTP2_INCLUDE_DIR AND
NOT DEFINED NGHTTP2_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(NGHTTP2 ${NGHTTP2_PC_REQUIRES})
pkg_check_modules(_nghttp2 ${_nghttp2_pc_requires})
endif()
if(NGHTTP2_FOUND)
string(REPLACE ";" " " NGHTTP2_CFLAGS "${NGHTTP2_CFLAGS}")
message(STATUS "Found NGHTTP2 (via pkg-config): ${NGHTTP2_INCLUDE_DIRS} (found version \"${NGHTTP2_VERSION}\")")
if(_nghttp2_FOUND)
set(NGHTTP2_FOUND TRUE)
set(NGHTTP2_VERSION ${_nghttp2_VERSION})
message(STATUS "Found NGHTTP2 (via pkg-config): ${_nghttp2_INCLUDE_DIRS} (found version \"${NGHTTP2_VERSION}\")")
else()
find_path(NGHTTP2_INCLUDE_DIR NAMES "nghttp2/nghttp2.h")
find_library(NGHTTP2_LIBRARY NAMES "nghttp2" "nghttp2_static")
@ -74,9 +71,25 @@ else()
)
if(NGHTTP2_FOUND)
set(NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR})
set(NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY})
set(_nghttp2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR})
set(_nghttp2_LIBRARIES ${NGHTTP2_LIBRARY})
endif()
mark_as_advanced(NGHTTP2_INCLUDE_DIR NGHTTP2_LIBRARY)
endif()
if(NGHTTP2_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_nghttp2_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::nghttp2)
add_library(CURL::nghttp2 INTERFACE IMPORTED)
set_target_properties(CURL::nghttp2 PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_nghttp2_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_nghttp2_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_nghttp2_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_nghttp2_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_nghttp2_LIBRARIES}")
endif()
endif()

View file

@ -25,31 +25,28 @@
#
# Input variables:
#
# - `NGHTTP3_INCLUDE_DIR`: Absolute path to nghttp3 include directory.
# - `NGHTTP3_LIBRARY`: Absolute path to `nghttp3` library.
# - `NGHTTP3_INCLUDE_DIR`: Absolute path to nghttp3 include directory.
# - `NGHTTP3_LIBRARY`: Absolute path to `nghttp3` library.
#
# Result variables:
# Defines:
#
# - `NGHTTP3_FOUND`: System has nghttp3.
# - `NGHTTP3_INCLUDE_DIRS`: The nghttp3 include directories.
# - `NGHTTP3_LIBRARIES`: The nghttp3 library names.
# - `NGHTTP3_LIBRARY_DIRS`: The nghttp3 library directories.
# - `NGHTTP3_PC_REQUIRES`: The nghttp3 pkg-config packages.
# - `NGHTTP3_CFLAGS`: Required compiler flags.
# - `NGHTTP3_VERSION`: Version of nghttp3.
# - `NGHTTP3_FOUND`: System has nghttp3.
# - `NGHTTP3_VERSION`: Version of nghttp3.
# - `CURL::nghttp3`: nghttp3 library target.
set(NGHTTP3_PC_REQUIRES "libnghttp3")
set(_nghttp3_pc_requires "libnghttp3")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED NGHTTP3_INCLUDE_DIR AND
NOT DEFINED NGHTTP3_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(NGHTTP3 ${NGHTTP3_PC_REQUIRES})
pkg_check_modules(_nghttp3 ${_nghttp3_pc_requires})
endif()
if(NGHTTP3_FOUND)
string(REPLACE ";" " " NGHTTP3_CFLAGS "${NGHTTP3_CFLAGS}")
message(STATUS "Found NGHTTP3 (via pkg-config): ${NGHTTP3_INCLUDE_DIRS} (found version \"${NGHTTP3_VERSION}\")")
if(_nghttp3_FOUND)
set(NGHTTP3_FOUND TRUE)
set(NGHTTP3_VERSION ${_nghttp3_VERSION})
message(STATUS "Found NGHTTP3 (via pkg-config): ${_nghttp3_INCLUDE_DIRS} (found version \"${NGHTTP3_VERSION}\")")
else()
find_path(NGHTTP3_INCLUDE_DIR NAMES "nghttp3/nghttp3.h")
find_library(NGHTTP3_LIBRARY NAMES "nghttp3")
@ -74,9 +71,25 @@ else()
)
if(NGHTTP3_FOUND)
set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY})
set(_nghttp3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
set(_nghttp3_LIBRARIES ${NGHTTP3_LIBRARY})
endif()
mark_as_advanced(NGHTTP3_INCLUDE_DIR NGHTTP3_LIBRARY)
endif()
if(NGHTTP3_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_nghttp3_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::nghttp3)
add_library(CURL::nghttp3 INTERFACE IMPORTED)
set_target_properties(CURL::nghttp3 PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_nghttp3_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_nghttp3_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_nghttp3_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_nghttp3_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_nghttp3_LIBRARIES}")
endif()
endif()

View file

@ -44,15 +44,11 @@
# - `NGTCP2_CRYPTO_QUICTLS_LIBRARY`: Absolute path to `ngtcp2_crypto_quictls` library.
# - `NGTCP2_CRYPTO_WOLFSSL_LIBRARY`: Absolute path to `ngtcp2_crypto_wolfssl` library.
#
# Result variables:
# Defines:
#
# - `NGTCP2_FOUND`: System has ngtcp2.
# - `NGTCP2_INCLUDE_DIRS`: The ngtcp2 include directories.
# - `NGTCP2_LIBRARIES`: The ngtcp2 library names.
# - `NGTCP2_LIBRARY_DIRS`: The ngtcp2 library directories.
# - `NGTCP2_PC_REQUIRES`: The ngtcp2 pkg-config packages.
# - `NGTCP2_CFLAGS`: Required compiler flags.
# - `NGTCP2_VERSION`: Version of ngtcp2.
# - `CURL::ngtcp2`: ngtcp2 library target.
if(NGTCP2_FIND_COMPONENTS)
set(_ngtcp2_crypto_backend "")
@ -71,9 +67,9 @@ if(NGTCP2_FIND_COMPONENTS)
endif()
endif()
set(NGTCP2_PC_REQUIRES "libngtcp2")
set(_ngtcp2_pc_requires "libngtcp2")
if(_ngtcp2_crypto_backend)
list(APPEND NGTCP2_PC_REQUIRES "lib${_crypto_library_lower}")
list(APPEND _ngtcp2_pc_requires "lib${_crypto_library_lower}")
endif()
set(_tried_pkgconfig FALSE)
@ -81,14 +77,14 @@ if(CURL_USE_PKGCONFIG AND
NOT DEFINED NGTCP2_INCLUDE_DIR AND
NOT DEFINED NGTCP2_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(NGTCP2 ${NGTCP2_PC_REQUIRES})
pkg_check_modules(_ngtcp2 ${_ngtcp2_pc_requires})
set(_tried_pkgconfig TRUE)
endif()
if(NGTCP2_FOUND)
set(NGTCP2_VERSION ${NGTCP2_libngtcp2_VERSION})
string(REPLACE ";" " " NGTCP2_CFLAGS "${NGTCP2_CFLAGS}")
message(STATUS "Found NGTCP2 (via pkg-config): ${NGTCP2_INCLUDE_DIRS} (found version \"${NGTCP2_VERSION}\")")
if(_ngtcp2_FOUND)
set(NGTCP2_FOUND TRUE)
set(NGTCP2_VERSION ${_ngtcp2_libngtcp2_VERSION})
message(STATUS "Found NGTCP2 (via pkg-config): ${_ngtcp2_INCLUDE_DIRS} (found version \"${NGTCP2_VERSION}\")")
else()
find_path(NGTCP2_INCLUDE_DIR NAMES "ngtcp2/ngtcp2.h")
find_library(NGTCP2_LIBRARY NAMES "ngtcp2")
@ -128,8 +124,8 @@ else()
)
if(NGTCP2_FOUND)
set(NGTCP2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR})
set(NGTCP2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY})
set(_ngtcp2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR})
set(_ngtcp2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY})
endif()
mark_as_advanced(NGTCP2_INCLUDE_DIR NGTCP2_LIBRARY NGTCP2_CRYPTO_LIBRARY)
@ -139,3 +135,19 @@ else()
unset(NGTCP2_LIBRARY CACHE)
endif()
endif()
if(NGTCP2_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_ngtcp2_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::ngtcp2)
add_library(CURL::ngtcp2 INTERFACE IMPORTED)
set_target_properties(CURL::ngtcp2 PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_ngtcp2_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_ngtcp2_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_ngtcp2_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_ngtcp2_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_ngtcp2_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `NETTLE_INCLUDE_DIR`: Absolute path to nettle include directory.
# - `NETTLE_LIBRARY`: Absolute path to `nettle` library.
# - `NETTLE_INCLUDE_DIR`: Absolute path to nettle include directory.
# - `NETTLE_LIBRARY`: Absolute path to `nettle` library.
#
# Result variables:
# Defines:
#
# - `NETTLE_FOUND`: System has nettle.
# - `NETTLE_INCLUDE_DIRS`: The nettle include directories.
# - `NETTLE_LIBRARIES`: The nettle library names.
# - `NETTLE_LIBRARY_DIRS`: The nettle library directories.
# - `NETTLE_PC_REQUIRES`: The nettle pkg-config packages.
# - `NETTLE_CFLAGS`: Required compiler flags.
# - `NETTLE_VERSION`: Version of nettle.
# - `NETTLE_FOUND`: System has nettle.
# - `NETTLE_VERSION`: Version of nettle.
# - `CURL::nettle`: nettle library target.
set(NETTLE_PC_REQUIRES "nettle")
set(_nettle_pc_requires "nettle")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED NETTLE_INCLUDE_DIR AND
NOT DEFINED NETTLE_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(NETTLE ${NETTLE_PC_REQUIRES})
pkg_check_modules(_nettle ${_nettle_pc_requires})
endif()
if(NETTLE_FOUND)
if(_nettle_FOUND)
set(Nettle_FOUND TRUE)
string(REPLACE ";" " " NETTLE_CFLAGS "${NETTLE_CFLAGS}")
message(STATUS "Found Nettle (via pkg-config): ${NETTLE_INCLUDE_DIRS} (found version \"${NETTLE_VERSION}\")")
set(NETTLE_FOUND TRUE)
set(NETTLE_VERSION ${_nettle_VERSION})
message(STATUS "Found Nettle (via pkg-config): ${_nettle_INCLUDE_DIRS} (found version \"${NETTLE_VERSION}\")")
else()
find_path(NETTLE_INCLUDE_DIR NAMES "nettle/sha2.h")
find_library(NETTLE_LIBRARY NAMES "nettle")
@ -80,9 +77,25 @@ else()
)
if(NETTLE_FOUND)
set(NETTLE_INCLUDE_DIRS ${NETTLE_INCLUDE_DIR})
set(NETTLE_LIBRARIES ${NETTLE_LIBRARY})
set(_nettle_INCLUDE_DIRS ${NETTLE_INCLUDE_DIR})
set(_nettle_LIBRARIES ${NETTLE_LIBRARY})
endif()
mark_as_advanced(NETTLE_INCLUDE_DIR NETTLE_LIBRARY)
endif()
if(NETTLE_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_nettle_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::nettle)
add_library(CURL::nettle INTERFACE IMPORTED)
set_target_properties(CURL::nettle PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_nettle_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_nettle_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_nettle_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_nettle_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_nettle_LIBRARIES}")
endif()
endif()

View file

@ -25,32 +25,29 @@
#
# Input variables:
#
# - `QUICHE_INCLUDE_DIR`: Absolute path to quiche include directory.
# - `QUICHE_LIBRARY`: Absolute path to `quiche` library.
# - `QUICHE_INCLUDE_DIR`: Absolute path to quiche include directory.
# - `QUICHE_LIBRARY`: Absolute path to `quiche` library.
#
# Result variables:
# Defines:
#
# - `QUICHE_FOUND`: System has quiche.
# - `QUICHE_INCLUDE_DIRS`: The quiche include directories.
# - `QUICHE_LIBRARIES`: The quiche library names.
# - `QUICHE_LIBRARY_DIRS`: The quiche library directories.
# - `QUICHE_PC_REQUIRES`: The quiche pkg-config packages.
# - `QUICHE_CFLAGS`: Required compiler flags.
# - `QUICHE_VERSION`: Version of quiche.
# - `QUICHE_FOUND`: System has quiche.
# - `QUICHE_VERSION`: Version of quiche.
# - `CURL::quiche`: quiche library target.
set(QUICHE_PC_REQUIRES "quiche")
set(_quiche_pc_requires "quiche")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED QUICHE_INCLUDE_DIR AND
NOT DEFINED QUICHE_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(QUICHE ${QUICHE_PC_REQUIRES})
pkg_check_modules(_quiche ${_quiche_pc_requires})
endif()
if(QUICHE_FOUND)
if(_quiche_FOUND)
set(Quiche_FOUND TRUE)
string(REPLACE ";" " " QUICHE_CFLAGS "${QUICHE_CFLAGS}")
message(STATUS "Found Quiche (via pkg-config): ${QUICHE_INCLUDE_DIRS} (found version \"${QUICHE_VERSION}\")")
set(QUICHE_FOUND TRUE)
set(QUICHE_VERSION ${_quiche_VERSION})
message(STATUS "Found Quiche (via pkg-config): ${_quiche_INCLUDE_DIRS} (found version \"${QUICHE_VERSION}\")")
else()
find_path(QUICHE_INCLUDE_DIR NAMES "quiche.h")
find_library(QUICHE_LIBRARY NAMES "quiche")
@ -63,9 +60,25 @@ else()
)
if(QUICHE_FOUND)
set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR})
set(QUICHE_LIBRARIES ${QUICHE_LIBRARY})
set(_quiche_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR})
set(_quiche_LIBRARIES ${QUICHE_LIBRARY})
endif()
mark_as_advanced(QUICHE_INCLUDE_DIR QUICHE_LIBRARY)
endif()
if(QUICHE_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_quiche_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::quiche)
add_library(CURL::quiche INTERFACE IMPORTED)
set_target_properties(CURL::quiche PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_quiche_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_quiche_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_quiche_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_quiche_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_quiche_LIBRARIES}")
endif()
endif()

View file

@ -25,34 +25,31 @@
#
# Input variables:
#
# - `RUSTLS_INCLUDE_DIR`: Absolute path to Rustls include directory.
# - `RUSTLS_LIBRARY`: Absolute path to `rustls` library.
# - `RUSTLS_INCLUDE_DIR`: Absolute path to Rustls include directory.
# - `RUSTLS_LIBRARY`: Absolute path to `rustls` library.
#
# Result variables:
# Defines:
#
# - `RUSTLS_FOUND`: System has Rustls.
# - `RUSTLS_INCLUDE_DIRS`: The Rustls include directories.
# - `RUSTLS_LIBRARIES`: The Rustls library names.
# - `RUSTLS_LIBRARY_DIRS`: The Rustls library directories.
# - `RUSTLS_PC_REQUIRES`: The Rustls pkg-config packages.
# - `RUSTLS_CFLAGS`: Required compiler flags.
# - `RUSTLS_VERSION`: Version of Rustls.
# - `RUSTLS_FOUND`: System has Rustls.
# - `RUSTLS_VERSION`: Version of Rustls.
# - `CURL::rustls`: Rustls library target.
set(RUSTLS_PC_REQUIRES "rustls")
set(_rustls_pc_requires "rustls")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED RUSTLS_INCLUDE_DIR AND
NOT DEFINED RUSTLS_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(RUSTLS ${RUSTLS_PC_REQUIRES})
pkg_check_modules(_rustls ${_rustls_pc_requires})
endif()
if(RUSTLS_FOUND)
if(_rustls_FOUND)
set(Rustls_FOUND TRUE)
string(REPLACE ";" " " RUSTLS_CFLAGS "${RUSTLS_CFLAGS}")
message(STATUS "Found Rustls (via pkg-config): ${RUSTLS_INCLUDE_DIRS} (found version \"${RUSTLS_VERSION}\")")
set(RUSTLS_FOUND TRUE)
set(RUSTLS_VERSION ${_rustls_VERSION})
message(STATUS "Found Rustls (via pkg-config): ${_rustls_INCLUDE_DIRS} (found version \"${RUSTLS_VERSION}\")")
else()
set(RUSTLS_PC_REQUIRES "") # Depend on pkg-config only when found via pkg-config
set(_rustls_pc_requires "") # Depend on pkg-config only when found via pkg-config
find_path(RUSTLS_INCLUDE_DIR NAMES "rustls.h")
find_library(RUSTLS_LIBRARY NAMES "rustls")
@ -65,8 +62,8 @@ else()
)
if(RUSTLS_FOUND)
set(RUSTLS_INCLUDE_DIRS ${RUSTLS_INCLUDE_DIR})
set(RUSTLS_LIBRARIES ${RUSTLS_LIBRARY})
set(_rustls_INCLUDE_DIRS ${RUSTLS_INCLUDE_DIR})
set(_rustls_LIBRARIES ${RUSTLS_LIBRARY})
endif()
mark_as_advanced(RUSTLS_INCLUDE_DIR RUSTLS_LIBRARY)
@ -79,31 +76,45 @@ if(RUSTLS_FOUND)
if(NOT SECURITY_FRAMEWORK)
message(FATAL_ERROR "Security framework not found")
endif()
list(APPEND RUSTLS_LIBRARIES "-framework Security")
list(APPEND _rustls_LIBRARIES "-framework Security")
find_library(FOUNDATION_FRAMEWORK NAMES "Foundation")
mark_as_advanced(FOUNDATION_FRAMEWORK)
if(NOT FOUNDATION_FRAMEWORK)
message(FATAL_ERROR "Foundation framework not found")
endif()
list(APPEND RUSTLS_LIBRARIES "-framework Foundation")
list(APPEND _rustls_LIBRARIES "-framework Foundation")
elseif(NOT WIN32)
find_library(PTHREAD_LIBRARY NAMES "pthread")
if(PTHREAD_LIBRARY)
list(APPEND RUSTLS_LIBRARIES ${PTHREAD_LIBRARY})
list(APPEND _rustls_LIBRARIES ${PTHREAD_LIBRARY})
endif()
mark_as_advanced(PTHREAD_LIBRARY)
find_library(DL_LIBRARY NAMES "dl")
if(DL_LIBRARY)
list(APPEND RUSTLS_LIBRARIES ${DL_LIBRARY})
list(APPEND _rustls_LIBRARIES ${DL_LIBRARY})
endif()
mark_as_advanced(DL_LIBRARY)
find_library(MATH_LIBRARY NAMES "m")
if(MATH_LIBRARY)
list(APPEND RUSTLS_LIBRARIES ${MATH_LIBRARY})
list(APPEND _rustls_LIBRARIES ${MATH_LIBRARY})
endif()
mark_as_advanced(MATH_LIBRARY)
endif()
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_rustls_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::rustls)
add_library(CURL::rustls INTERFACE IMPORTED)
set_target_properties(CURL::rustls PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_rustls_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_rustls_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_rustls_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_rustls_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_rustls_LIBRARIES}")
endif()
endif()

View file

@ -25,18 +25,14 @@
#
# Input variables:
#
# - `WOLFSSL_INCLUDE_DIR`: Absolute path to wolfSSL include directory.
# - `WOLFSSL_LIBRARY`: Absolute path to `wolfssl` library.
# - `WOLFSSL_INCLUDE_DIR`: Absolute path to wolfSSL include directory.
# - `WOLFSSL_LIBRARY`: Absolute path to `wolfssl` library.
#
# Result variables:
# Defines:
#
# - `WOLFSSL_FOUND`: System has wolfSSL.
# - `WOLFSSL_INCLUDE_DIRS`: The wolfSSL include directories.
# - `WOLFSSL_LIBRARIES`: The wolfSSL library names.
# - `WOLFSSL_LIBRARY_DIRS`: The wolfSSL library directories.
# - `WOLFSSL_PC_REQUIRES`: The wolfSSL pkg-config packages.
# - `WOLFSSL_CFLAGS`: Required compiler flags.
# - `WOLFSSL_VERSION`: Version of wolfSSL.
# - `WOLFSSL_FOUND`: System has wolfSSL.
# - `WOLFSSL_VERSION`: Version of wolfSSL.
# - `CURL::wolfssl`: wolfSSL library target.
if(DEFINED WolfSSL_INCLUDE_DIR AND NOT DEFINED WOLFSSL_INCLUDE_DIR)
message(WARNING "WolfSSL_INCLUDE_DIR is deprecated, use WOLFSSL_INCLUDE_DIR instead.")
@ -47,19 +43,20 @@ if(DEFINED WolfSSL_LIBRARY AND NOT DEFINED WOLFSSL_LIBRARY)
set(WOLFSSL_LIBRARY "${WolfSSL_LIBRARY}")
endif()
set(WOLFSSL_PC_REQUIRES "wolfssl")
set(_wolfssl_pc_requires "wolfssl")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED WOLFSSL_INCLUDE_DIR AND
NOT DEFINED WOLFSSL_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(WOLFSSL ${WOLFSSL_PC_REQUIRES})
pkg_check_modules(_wolfssl ${_wolfssl_pc_requires})
endif()
if(WOLFSSL_FOUND)
if(_wolfssl_FOUND)
set(WolfSSL_FOUND TRUE)
string(REPLACE ";" " " WOLFSSL_CFLAGS "${WOLFSSL_CFLAGS}")
message(STATUS "Found WolfSSL (via pkg-config): ${WOLFSSL_INCLUDE_DIRS} (found version \"${WOLFSSL_VERSION}\")")
set(WOLFSSL_FOUND TRUE)
set(WOLFSSL_VERSION ${_wolfssl_VERSION})
message(STATUS "Found WolfSSL (via pkg-config): ${_wolfssl_INCLUDE_DIRS} (found version \"${WOLFSSL_VERSION}\")")
else()
find_path(WOLFSSL_INCLUDE_DIR NAMES "wolfssl/ssl.h")
find_library(WOLFSSL_LIBRARY NAMES "wolfssl")
@ -84,8 +81,8 @@ else()
)
if(WOLFSSL_FOUND)
set(WOLFSSL_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR})
set(WOLFSSL_LIBRARIES ${WOLFSSL_LIBRARY})
set(_wolfssl_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR})
set(_wolfssl_LIBRARIES ${WOLFSSL_LIBRARY})
endif()
mark_as_advanced(WOLFSSL_INCLUDE_DIR WOLFSSL_LIBRARY)
@ -98,19 +95,35 @@ if(WOLFSSL_FOUND)
if(NOT SECURITY_FRAMEWORK)
message(FATAL_ERROR "Security framework not found")
endif()
list(APPEND WOLFSSL_LIBRARIES "-framework Security")
list(APPEND _wolfssl_LIBRARIES "-framework Security")
find_library(COREFOUNDATION_FRAMEWORK NAMES "CoreFoundation")
mark_as_advanced(COREFOUNDATION_FRAMEWORK)
if(NOT COREFOUNDATION_FRAMEWORK)
message(FATAL_ERROR "CoreFoundation framework not found")
endif()
list(APPEND WOLFSSL_LIBRARIES "-framework CoreFoundation")
elseif(NOT WIN32)
list(APPEND _wolfssl_LIBRARIES "-framework CoreFoundation")
elseif(WIN32)
list(APPEND _wolfssl_LIBRARIES "crypt32")
else()
find_library(MATH_LIBRARY NAMES "m")
if(MATH_LIBRARY)
list(APPEND WOLFSSL_LIBRARIES ${MATH_LIBRARY}) # for log and pow
list(APPEND _wolfssl_LIBRARIES ${MATH_LIBRARY}) # for log and pow
endif()
mark_as_advanced(MATH_LIBRARY)
endif()
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_wolfssl_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::wolfssl)
add_library(CURL::wolfssl INTERFACE IMPORTED)
set_target_properties(CURL::wolfssl PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_wolfssl_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_wolfssl_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_wolfssl_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_wolfssl_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_wolfssl_LIBRARIES}")
endif()
endif()

View file

@ -25,18 +25,14 @@
#
# Input variables:
#
# - `ZSTD_INCLUDE_DIR`: Absolute path to zstd include directory.
# - `ZSTD_LIBRARY`: Absolute path to `zstd` library.
# - `ZSTD_INCLUDE_DIR`: Absolute path to zstd include directory.
# - `ZSTD_LIBRARY`: Absolute path to `zstd` library.
#
# Result variables:
# Defines:
#
# - `ZSTD_FOUND`: System has zstd.
# - `ZSTD_INCLUDE_DIRS`: The zstd include directories.
# - `ZSTD_LIBRARIES`: The zstd library names.
# - `ZSTD_LIBRARY_DIRS`: The zstd library directories.
# - `ZSTD_PC_REQUIRES`: The zstd pkg-config packages.
# - `ZSTD_CFLAGS`: Required compiler flags.
# - `ZSTD_VERSION`: Version of zstd.
# - `ZSTD_FOUND`: System has zstd.
# - `ZSTD_VERSION`: Version of zstd.
# - `CURL::zstd`: zstd library target.
if(DEFINED Zstd_INCLUDE_DIR AND NOT DEFINED ZSTD_INCLUDE_DIR)
message(WARNING "Zstd_INCLUDE_DIR is deprecated, use ZSTD_INCLUDE_DIR instead.")
@ -47,19 +43,20 @@ if(DEFINED Zstd_LIBRARY AND NOT DEFINED ZSTD_LIBRARY)
set(ZSTD_LIBRARY "${Zstd_LIBRARY}")
endif()
set(ZSTD_PC_REQUIRES "libzstd")
set(_zstd_pc_requires "libzstd")
if(CURL_USE_PKGCONFIG AND
NOT DEFINED ZSTD_INCLUDE_DIR AND
NOT DEFINED ZSTD_LIBRARY)
find_package(PkgConfig QUIET)
pkg_check_modules(ZSTD ${ZSTD_PC_REQUIRES})
pkg_check_modules(_zstd ${_zstd_pc_requires})
endif()
if(ZSTD_FOUND)
if(_zstd_FOUND)
set(Zstd_FOUND TRUE)
string(REPLACE ";" " " ZSTD_CFLAGS "${ZSTD_CFLAGS}")
message(STATUS "Found Zstd (via pkg-config): ${ZSTD_INCLUDE_DIRS} (found version \"${ZSTD_VERSION}\")")
set(ZSTD_FOUND TRUE)
set(ZSTD_VERSION ${_zstd_VERSION})
message(STATUS "Found Zstd (via pkg-config): ${_zstd_INCLUDE_DIRS} (found version \"${ZSTD_VERSION}\")")
else()
find_path(ZSTD_INCLUDE_DIR NAMES "zstd.h")
find_library(ZSTD_LIBRARY NAMES "zstd")
@ -94,9 +91,25 @@ else()
)
if(ZSTD_FOUND)
set(ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})
set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
set(_zstd_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})
set(_zstd_LIBRARIES ${ZSTD_LIBRARY})
endif()
mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
endif()
if(ZSTD_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.13)
link_directories(${_zstd_LIBRARY_DIRS})
endif()
if(NOT TARGET CURL::zstd)
add_library(CURL::zstd INTERFACE IMPORTED)
set_target_properties(CURL::zstd PROPERTIES
INTERFACE_LIBCURL_PC_MODULES "${_zstd_pc_requires}"
INTERFACE_COMPILE_OPTIONS "${_zstd_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${_zstd_INCLUDE_DIRS}"
INTERFACE_LINK_DIRECTORIES "${_zstd_LIBRARY_DIRS}"
INTERFACE_LINK_LIBRARIES "${_zstd_LIBRARIES}")
endif()
endif()

View file

@ -56,10 +56,10 @@ macro(curl_internal_test _curl_test)
"${_curl_test_add_libraries}"
OUTPUT_VARIABLE CURL_TEST_OUTPUT)
if(${_curl_test})
set(${_curl_test} 1 CACHE INTERNAL "Curl test")
set(${_curl_test} 1 CACHE INTERNAL "curl test")
message(STATUS "Performing Test ${_curl_test} - Success")
else()
set(${_curl_test} "" CACHE INTERNAL "Curl test")
set(${_curl_test} "" CACHE INTERNAL "curl test")
message(STATUS "Performing Test ${_curl_test} - Failed")
endif()
endif()

View file

@ -75,9 +75,15 @@ if(PICKY_COMPILER)
set(_picky_enable "-W")
endif()
list(APPEND _picky_enable
-Wall -pedantic
)
list(APPEND _picky_enable "-Wall")
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.2) OR
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) OR
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
list(APPEND _picky_enable "-Wpedantic") # clang 3.2 gcc 4.8 appleclang 4.2
else()
list(APPEND _picky_enable "-pedantic")
endif()
# ----------------------------------
# Add new options here, if in doubt:
@ -232,20 +238,26 @@ if(PICKY_COMPILER)
-Wcast-function-type-strict # clang 16.0 appleclang 16.0
)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 21.0)
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.1) OR
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 17.0))
list(APPEND _picky_enable
-Warray-compare # clang 20.0 gcc 12.0 appleclang ?
-Wc++-hidden-decl # clang 21.0 appleclang ?
-Wno-implicit-void-ptr-cast # clang 21.0 appleclang ?
-Wtentative-definition-compat # clang 21.0 appleclang ?
-Wno-format-signedness # clang 19.1 gcc 5.1 appleclang 17.0 # In clang-cl enums are signed ints by default
)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 21.1)
list(APPEND _picky_enable
-Warray-compare # clang 20.1 gcc 12.0 appleclang ?
-Wc++-hidden-decl # clang 21.1 appleclang ?
-Wno-implicit-void-ptr-cast # clang 21.1 appleclang ?
-Wtentative-definition-compat # clang 21.1 appleclang ?
)
if(WIN32)
list(APPEND _picky_enable
-Wno-c++-keyword # clang 21.0 appleclang ? # `wchar_t` triggers it on Windows
-Wno-c++-keyword # clang 21.1 appleclang ? # `wchar_t` triggers it on Windows
)
else()
list(APPEND _picky_enable
-Wc++-keyword # clang 21.0 appleclang ?
-Wc++-keyword # clang 21.1 appleclang ?
)
endif()
endif()
@ -282,6 +294,7 @@ if(PICKY_COMPILER)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0)
list(APPEND _picky_enable
-Warray-bounds=2 # clang 3.0 gcc 5.0 (clang default: -Warray-bounds)
-Wno-format-signedness # clang 19.1 gcc 5.1 appleclang 17.0
)
endif()
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 6.0)

View file

@ -59,6 +59,7 @@ function(curl_dumptargetprops _target)
string(REPLACE "\n" ";" _cmake_property_list "${_cmake_property_list}")
list(REMOVE_DUPLICATES _cmake_property_list)
list(REMOVE_ITEM _cmake_property_list "")
list(APPEND _cmake_property_list "INTERFACE_LIBCURL_PC_MODULES")
foreach(_prop IN LISTS _cmake_property_list)
if(_prop MATCHES "<CONFIG>")
foreach(_config IN ITEMS "DEBUG" "RELEASE" "MINSIZEREL" "RELWITHDEBINFO")

View file

@ -1,77 +0,0 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
if("@USE_OPENSSL@")
if("@OPENSSL_VERSION_MAJOR@")
find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
else()
find_dependency(OpenSSL)
endif()
endif()
if("@HAVE_LIBZ@")
find_dependency(ZLIB "@ZLIB_VERSION_MAJOR@")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
# Alias for either shared or static library
if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11 AND CMAKE_VERSION VERSION_LESS 3.18)
set_target_properties(@PROJECT_NAME@::@LIB_SELECTED@ PROPERTIES IMPORTED_GLOBAL TRUE)
endif()
add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
endif()
# For compatibility with CMake's FindCURL.cmake
set(CURL_VERSION_STRING "@CURLVERSION@")
set(CURL_LIBRARIES @PROJECT_NAME@::@LIB_NAME@)
set_and_check(CURL_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set(CURL_SUPPORTED_PROTOCOLS "@CURL_SUPPORTED_PROTOCOLS_LIST@")
set(CURL_SUPPORTED_FEATURES "@CURL_SUPPORTED_FEATURES_LIST@")
foreach(_item IN LISTS CURL_SUPPORTED_PROTOCOLS CURL_SUPPORTED_FEATURES)
set(CURL_SUPPORTS_${_item} TRUE)
endforeach()
set(_missing_req "")
foreach(_item IN LISTS CURL_FIND_COMPONENTS)
if(CURL_SUPPORTS_${_item})
set(CURL_${_item}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED_${_item})
list(APPEND _missing_req ${_item})
endif()
endforeach()
if(_missing_req)
string(REPLACE ";" " " _missing_req "${_missing_req}")
if(CURL_FIND_REQUIRED)
message(FATAL_ERROR "CURL: missing required components: ${_missing_req}")
endif()
unset(_missing_req)
endif()
check_required_components("@PROJECT_NAME@")

207
CMake/curl-config.in.cmake Normal file
View file

@ -0,0 +1,207 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
@PACKAGE_INIT@
option(CURL_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ dependencies. Default: @CURL_USE_PKGCONFIG@"
"@CURL_USE_PKGCONFIG@")
if(CMAKE_VERSION VERSION_LESS @CMAKE_MINIMUM_REQUIRED_VERSION@)
message(STATUS "@PROJECT_NAME@: @PROJECT_NAME@-specific Find modules require "
"CMake @CMAKE_MINIMUM_REQUIRED_VERSION@ or upper, found: ${CMAKE_VERSION}.")
endif()
include(CMakeFindDependencyMacro)
if("@USE_OPENSSL@")
if("@OPENSSL_VERSION_MAJOR@")
find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@")
else()
find_dependency(OpenSSL)
endif()
endif()
if("@HAVE_LIBZ@")
find_dependency(ZLIB "@ZLIB_VERSION_MAJOR@")
endif()
set(_curl_cmake_module_path_save ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
set(_curl_libs "")
if("@HAVE_BROTLI@")
find_dependency(Brotli)
list(APPEND _curl_libs CURL::brotli)
endif()
if("@USE_ARES@")
find_dependency(Cares)
list(APPEND _curl_libs CURL::cares)
endif()
if("@HAVE_GSSAPI@")
find_dependency(GSS)
list(APPEND _curl_libs CURL::gss)
endif()
if("@USE_BACKTRACE@")
find_dependency(Libbacktrace)
list(APPEND _curl_libs CURL::libbacktrace)
endif()
if("@USE_GSASL@")
find_dependency(Libgsasl)
list(APPEND _curl_libs CURL::libgsasl)
endif()
if(NOT "@USE_WIN32_LDAP@" AND NOT "@CURL_DISABLE_LDAP@")
find_dependency(LDAP)
list(APPEND _curl_libs CURL::ldap)
endif()
if("@HAVE_LIBIDN2@")
find_dependency(Libidn2)
list(APPEND _curl_libs CURL::libidn2)
endif()
if("@USE_LIBPSL@")
find_dependency(Libpsl)
list(APPEND _curl_libs CURL::libpsl)
endif()
if("@USE_LIBRTMP@")
find_dependency(Librtmp)
list(APPEND _curl_libs CURL::librtmp)
endif()
if("@USE_LIBSSH@")
find_dependency(Libssh)
list(APPEND _curl_libs CURL::libssh)
endif()
if("@USE_LIBSSH2@")
find_dependency(Libssh2)
list(APPEND _curl_libs CURL::libssh2)
endif()
if("@USE_LIBUV@")
find_dependency(Libuv)
list(APPEND _curl_libs CURL::libuv)
endif()
if("@USE_MBEDTLS@")
find_dependency(MbedTLS)
list(APPEND _curl_libs CURL::mbedtls)
endif()
if("@USE_NGHTTP2@")
find_dependency(NGHTTP2)
list(APPEND _curl_libs CURL::nghttp2)
endif()
if("@USE_NGHTTP3@")
find_dependency(NGHTTP3)
list(APPEND _curl_libs CURL::nghttp3)
endif()
if("@USE_NGTCP2@")
find_dependency(NGTCP2)
list(APPEND _curl_libs CURL::ngtcp2)
endif()
if("@USE_GNUTLS@")
find_dependency(GnuTLS)
list(APPEND _curl_libs CURL::gnutls)
find_dependency(Nettle)
list(APPEND _curl_libs CURL::nettle)
endif()
if("@USE_QUICHE@")
find_dependency(Quiche)
list(APPEND _curl_libs CURL::quiche)
endif()
if("@USE_RUSTLS@")
find_dependency(Rustls)
list(APPEND _curl_libs CURL::rustls)
endif()
if("@USE_WOLFSSL@")
find_dependency(WolfSSL)
list(APPEND _curl_libs CURL::wolfssl)
endif()
if("@HAVE_ZSTD@")
find_dependency(Zstd)
list(APPEND _curl_libs CURL::zstd)
endif()
set(CMAKE_MODULE_PATH ${_curl_cmake_module_path_save})
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND WIN32 AND NOT TARGET CURL::win32_winsock)
add_library(CURL::win32_winsock INTERFACE IMPORTED)
set_target_properties(CURL::win32_winsock PROPERTIES INTERFACE_LINK_LIBRARIES "ws2_32")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
# Alias for either shared or static library
if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11 AND CMAKE_VERSION VERSION_LESS 3.18)
set_target_properties(@PROJECT_NAME@::@LIB_SELECTED@ PROPERTIES IMPORTED_GLOBAL TRUE)
endif()
add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
endif()
if(TARGET @PROJECT_NAME@::@LIB_STATIC@)
# CMake before CMP0099 (CMake 3.17 2020-03-20) did not propagate libdirs to
# targets. It expected libs to have an absolute filename. As a workaround,
# manually apply dependency libdirs, for CMake consumers without this policy.
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
cmake_policy(GET CMP0099 _has_CMP0099) # https://cmake.org/cmake/help/latest/policy/CMP0099.html
endif()
if(NOT _has_CMP0099 AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.13 AND _curl_libs)
set(_curl_libdirs "")
foreach(_curl_lib IN LISTS _curl_libs)
get_target_property(_curl_libdir "${_curl_lib}" INTERFACE_LINK_DIRECTORIES)
if(_curl_libdir)
list(APPEND _curl_libdirs "${_curl_libdir}")
endif()
endforeach()
if(_curl_libdirs)
target_link_directories(@PROJECT_NAME@::@LIB_STATIC@ INTERFACE ${_curl_libdirs})
endif()
endif()
endif()
# For compatibility with CMake's FindCURL.cmake
set(CURL_VERSION_STRING "@CURLVERSION@")
set(CURL_LIBRARIES @PROJECT_NAME@::@LIB_NAME@)
set(CURL_LIBRARIES_PRIVATE "@LIBCURL_PC_LIBS_PRIVATE_LIST@")
set_and_check(CURL_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set(CURL_SUPPORTED_PROTOCOLS "@CURL_SUPPORTED_PROTOCOLS_LIST@")
set(CURL_SUPPORTED_FEATURES "@CURL_SUPPORTED_FEATURES_LIST@")
foreach(_curl_item IN LISTS CURL_SUPPORTED_PROTOCOLS CURL_SUPPORTED_FEATURES)
set(CURL_SUPPORTS_${_curl_item} TRUE)
endforeach()
set(_curl_missing_req "")
foreach(_curl_item IN LISTS CURL_FIND_COMPONENTS)
if(CURL_SUPPORTS_${_curl_item})
set(CURL_${_curl_item}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED_${_curl_item})
list(APPEND _curl_missing_req ${_curl_item})
endif()
endforeach()
if(_curl_missing_req)
string(REPLACE ";" " " _curl_missing_req "${_curl_missing_req}")
if(CURL_FIND_REQUIRED)
message(FATAL_ERROR "@PROJECT_NAME@: missing required components: ${_curl_missing_req}")
endif()
unset(_curl_missing_req)
endif()
check_required_components("@PROJECT_NAME@")

View file

@ -169,6 +169,7 @@ else()
set(HAVE_LINUX_TCP_H 0)
endif()
set(HAVE_LOCALE_H 1)
set(HAVE_LOCALTIME_R 1)
set(HAVE_LONGLONG 1)
if(APPLE)
set(HAVE_MACH_ABSOLUTE_TIME 1)

View file

@ -53,11 +53,7 @@ else()
if(MSVC)
set(HAVE_UNISTD_H 0)
set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size()
if(MSVC_VERSION GREATER_EQUAL 1600)
set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size()
else()
set(HAVE_STDINT_H 0) # detected by CMake internally in check_type_size()
endif()
set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size()
if(MSVC_VERSION GREATER_EQUAL 1800)
set(HAVE_STDBOOL_H 1)
else()
@ -127,6 +123,7 @@ set(HAVE_IOCTL_SIOCGIFADDR 0)
set(HAVE_IO_H 1)
set(HAVE_LINUX_TCP_H 0)
set(HAVE_LOCALE_H 1)
set(HAVE_LOCALTIME_R 0)
set(HAVE_MEMRCHR 0)
set(HAVE_MSG_NOSIGNAL 0)
set(HAVE_NETDB_H 0)
@ -193,7 +190,7 @@ if(MINGW OR MSVC)
curl_prefill_type_size("CURL_OFF_T" 8)
curl_prefill_type_size("CURL_SOCKET_T" ${CMAKE_SIZEOF_VOID_P})
curl_prefill_type_size("SIZE_T" ${CMAKE_SIZEOF_VOID_P})
# TIME_T: 8 for _WIN64 or UCRT or MSVC and not Windows CE, 4 otherwise
# TIME_T: 8 for _WIN64 or UCRT or MSVC, 4 otherwise
# Also 4 for non-UCRT 32-bit when _USE_32BIT_TIME_T is set.
# mingw-w64 sets _USE_32BIT_TIME_T unless __MINGW_USE_VC2005_COMPAT is explicit defined.
if(MSVC)
@ -206,25 +203,3 @@ if(MINGW OR MSVC)
curl_prefill_type_size("OFF_T" 8) # mingw-w64 v3+
endif()
endif()
# Windows CE exceptions
if(WINCE)
set(HAVE_FREEADDRINFO 0)
set(HAVE_GETADDRINFO 0)
set(HAVE_LOCALE_H 0)
set(HAVE_SETLOCALE 0)
set(HAVE_SETMODE 0)
set(HAVE_SIGNAL 0)
set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 0)
curl_prefill_type_size("CURL_SOCKET_T" 4)
curl_prefill_type_size("TIME_T" 4)
curl_prefill_type_size("SIZE_T" 4)
if(MINGW32CE)
set(HAVE_STRTOK_R 0)
set(HAVE__SETMODE 0)
set(HAVE_FILE_OFFSET_BITS 0)
curl_prefill_type_size("SSIZE_T" 4)
curl_prefill_type_size("OFF_T" 4)
endif()
endif()

File diff suppressed because it is too large Load diff

View file

@ -24,7 +24,7 @@
# $ ./scripts/maketgz 8.7.1
# To update, get the latest digest e.g. from https://hub.docker.com/_/debian/tags
FROM debian:bookworm-slim@sha256:78d2f66e0fec9e5a39fb2c72ea5e052b548df75602b5215ed01a17171529f706
FROM debian:bookworm-slim@sha256:e899040a73d36e2b36fa33216943539d9957cba8172b858097c2cabcdb20a3e2
RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
build-essential make autoconf automake libtool git perl zip zlib1g-dev gawk && \

View file

@ -1,3 +1,8 @@
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |

View file

@ -27,9 +27,8 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
CMAKE_DIST = \
CMake/cmake_uninstall.cmake.in \
CMake/CMakeConfigurableFile.in \
CMake/curl-config.cmake.in \
CMake/cmake_uninstall.in.cmake \
CMake/curl-config.in.cmake \
CMake/CurlSymbolHiding.cmake \
CMake/CurlTests.c \
CMake/FindBrotli.cmake \
@ -37,6 +36,7 @@ CMAKE_DIST = \
CMake/FindGnuTLS.cmake \
CMake/FindGSS.cmake \
CMake/FindLDAP.cmake \
CMake/FindLibbacktrace.cmake \
CMake/FindLibgsasl.cmake \
CMake/FindLibidn2.cmake \
CMake/FindLibpsl.cmake \
@ -91,7 +91,7 @@ pkgconfig_DATA = libcurl.pc
dist-hook:
rm -rf $(top_builddir)/tests/log
find $(distdir) -name "*.dist" -exec rm {} \;
find $(distdir) -name "*.dist" -exec rm -- {} \;
(distit=`find $(srcdir) -name "*.dist" | grep -v Makefile`; \
for file in $$distit; do \
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
@ -111,7 +111,7 @@ pytest: test
pytest-ci: test
test:
@echo "NOTICE: we can't run the tests when cross-compiling!"
@echo "NOTICE: we cannot run the tests when cross-compiling!"
else

5
README
View file

@ -15,7 +15,8 @@ README
available to be used by your software. Read the libcurl.3 man page to
learn how.
You find answers to the most frequent questions we get in the FAQ document.
You find answers to the most frequent questions we get in the FAQ.md
document.
Study the COPYING file for distribution terms.
@ -38,7 +39,7 @@ GIT
To download the latest source code off the GIT server, do this:
git clone https://github.com/curl/curl.git
git clone https://github.com/curl/curl
(you will get a directory named curl created, filled with the source code)

View file

@ -6,9 +6,13 @@ SPDX-License-Identifier: curl
# [![curl logo](https://curl.se/logo/curl-logo.svg)](https://curl.se/)
curl is a command-line tool for transferring data specified with URL syntax.
curl is a command-line tool for transferring data from or to a server using
URLs. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS,
HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP,
SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.
Learn how to use curl by reading [the
manpage](https://curl.se/docs/manpage.html) or [everything
man page](https://curl.se/docs/manpage.html) or [everything
curl](https://everything.curl.dev/).
Find out how to install curl by reading [the INSTALL
@ -16,7 +20,7 @@ document](https://curl.se/docs/install.html).
libcurl is the library curl is using to do its job. It is readily available to
be used by your software. Read [the libcurl
manpage](https://curl.se/libcurl/c/libcurl.html) to learn how.
man page](https://curl.se/libcurl/c/libcurl.html) to learn how.
## Open Source
@ -46,7 +50,7 @@ Visit the [curl website](https://curl.se/) for the latest news and downloads.
Download the latest source from the Git server:
git clone https://github.com/curl/curl.git
git clone https://github.com/curl/curl
## Security problems

File diff suppressed because it is too large Load diff

View file

@ -13,16 +13,11 @@ SPDX-PackageDownloadLocation = "https://curl.se/"
[[annotations]]
path = [
".mailmap",
"docs/FAQ",
"docs/INSTALL",
"docs/KNOWN_BUGS",
"docs/libcurl/symbols-in-versions",
"docs/MAIL-ETIQUETTE",
"docs/options-in-versions",
"docs/THANKS",
"docs/TODO",
"GIT-INFO.md",
"lib/libcurl.vers.in",
"lib/libcurl.def",
"packages/OS400/README.OS400",
@ -37,6 +32,7 @@ path = [
"RELEASE-NOTES",
"renovate.json",
"tests/certs/**",
"tests/data/data**",
"tests/data/test**",
"tests/valgrind.supp",
]

View file

@ -190,7 +190,7 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [
curl_cv_native_windows="no"
])
])
AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "x$curl_cv_native_windows" = xyes)
AM_CONDITIONAL(DOING_NATIVE_WINDOWS, test "$curl_cv_native_windows" = "yes")
])
@ -769,7 +769,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
#include <time.h>
]],[[
struct timeval ts;
ts.tv_sec = 0;
ts.tv_sec = 0;
ts.tv_usec = 0;
(void)ts;
]])
@ -820,7 +820,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [
])
dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed
dnl until library linking and run-time checks for clock_gettime succeed.
dnl until library linking and runtime checks for clock_gettime succeed.
])
dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
@ -910,7 +910,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
curl_func_clock_gettime="yes"
;;
*)
if test "x$dontwant_rt" = "xyes" ; then
if test "$dontwant_rt" = "yes"; then
AC_MSG_WARN([needs -lrt but asked not to use it, HAVE_CLOCK_GETTIME_MONOTONIC will not be defined])
curl_func_clock_gettime="no"
else
@ -926,7 +926,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
esac
#
dnl only do runtime verification when not cross-compiling
if test "x$cross_compiling" != "xyes" &&
if test "$cross_compiling" != "yes" &&
test "$curl_func_clock_gettime" = "yes"; then
AC_MSG_CHECKING([if monotonic clock_gettime works])
CURL_RUN_IFELSE([
@ -1082,11 +1082,11 @@ dnl macro. It must also run AFTER all lib-checking macros are complete.
AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
dnl this test is of course not sensible if we are cross-compiling!
if test "x$cross_compiling" != xyes; then
if test "$cross_compiling" != "yes"; then
dnl just run a program to verify that the libs checked for previous to this
dnl point also is available run-time!
AC_MSG_CHECKING([run-time libs availability])
dnl point also is available runtime!
AC_MSG_CHECKING([runtime libs availability])
CURL_RUN_IFELSE([
int main(void)
{
@ -1095,7 +1095,7 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
],
AC_MSG_RESULT([fine]),
AC_MSG_RESULT([failed])
AC_MSG_ERROR([one or more libs available at link-time are not available run-time. Libs used at link-time: $LIBS])
AC_MSG_ERROR([one or more libs available at link-time are not available runtime. Libs used at link-time: $LIBS])
)
dnl if this test fails, configure has already stopped
@ -1122,7 +1122,7 @@ AC_DEFUN([CURL_CHECK_CA_BUNDLE], [
AC_ARG_WITH(ca-bundle,
AS_HELP_STRING([--with-ca-bundle=FILE],
[Absolute path to a file containing CA certificates (example: /etc/ca-bundle.crt)])
AS_HELP_STRING([--without-ca-bundle], [Don't use a default CA bundle]),
AS_HELP_STRING([--without-ca-bundle], [Do not use a default CA bundle]),
[
want_ca="$withval"
if test "x$want_ca" = "xyes"; then
@ -1136,7 +1136,7 @@ AS_HELP_STRING([--with-ca-path=DIRECTORY],
their filenames in a hash format. This option can be used with the OpenSSL, \
GnuTLS, mbedTLS and wolfSSL backends. Refer to OpenSSL c_rehash for details. \
(example: /etc/certificates)])
AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
AS_HELP_STRING([--without-ca-path], [Do not use a default CA path]),
[
want_capath="$withval"
if test "x$want_capath" = "xyes"; then
@ -1149,26 +1149,26 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
capath_warning=" (warning: certs not found)"
check_capath=""
if test "x$APPLE_SECTRUST_ENABLED" = "x1"; then
if test "$APPLE_SECTRUST_ENABLED" = "1"; then
ca_native="Apple SecTrust"
else
ca_native="no"
fi
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
if test "x$want_ca" != "xno" && test "x$want_ca" != "xunset" &&
test "x$want_capath" != "xno" && test "x$want_capath" != "xunset"; then
dnl both given
ca="$want_ca"
capath="$want_capath"
elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
elif test "x$want_ca" != "xno" && test "x$want_ca" != "xunset"; then
dnl --with-ca-bundle given
ca="$want_ca"
capath="no"
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
elif test "x$want_capath" != "xno" && test "x$want_capath" != "xunset"; then
dnl --with-ca-path given
capath="$want_capath"
ca="no"
elif test "x$ca_native" != "xno"; then
elif test "$ca_native" != "no"; then
# native ca configured, do not look further
ca="no"
capath="no"
@ -1177,15 +1177,15 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
dnl Both auto-detections can be skipped by --without-ca-*
ca="no"
capath="no"
if test "x$cross_compiling" != "xyes" -a \
"x$curl_cv_native_windows" != "xyes"; then
if test "$cross_compiling" != "yes" &&
test "$curl_cv_native_windows" != "yes"; then
dnl NOT cross-compiling and...
dnl neither of the --with-ca-* options are provided
if test "x$want_ca" = "xunset"; then
dnl the path we previously would have installed the curl CA bundle
dnl to, and thus we now check for an already existing cert in that
dnl place in case we find no other
if test "x$prefix" != xNONE; then
if test "x$prefix" != "xNONE"; then
cac="${prefix}/share/curl/curl-ca-bundle.crt"
else
cac="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
@ -1221,7 +1221,7 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
check_capath="$capath"
fi
if test ! -z "$check_capath"; then
if test -n "$check_capath"; then
for a in "$check_capath"; do
if test -d "$a" && ls "$a"/[[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]].0 >/dev/null 2>/dev/null; then
if test "x$capath" = "xno"; then
@ -1255,16 +1255,16 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
AC_MSG_CHECKING([whether to use OpenSSL's built-in CA store])
AC_ARG_WITH(ca-fallback,
AS_HELP_STRING([--with-ca-fallback], [Use OpenSSL's built-in CA store])
AS_HELP_STRING([--without-ca-fallback], [Don't use OpenSSL's built-in CA store]),
AS_HELP_STRING([--without-ca-fallback], [Do not use OpenSSL's built-in CA store]),
[
if test "x$with_ca_fallback" != "xyes" -a "x$with_ca_fallback" != "xno"; then
if test "x$with_ca_fallback" != "xyes" && test "x$with_ca_fallback" != "xno"; then
AC_MSG_ERROR([--with-ca-fallback only allows yes or no as parameter])
fi
],
[ with_ca_fallback="no"])
AC_MSG_RESULT([$with_ca_fallback])
if test "x$with_ca_fallback" = "xyes"; then
if test "x$OPENSSL_ENABLED" != "x1"; then
if test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_ERROR([--with-ca-fallback only works with OpenSSL])
fi
AC_DEFINE_UNQUOTED(CURL_CA_FALLBACK, 1, [define "1" to use OpenSSL's built-in CA store])
@ -1283,7 +1283,7 @@ AC_DEFUN([CURL_CHECK_CA_EMBED], [
AC_ARG_WITH(ca-embed,
AS_HELP_STRING([--with-ca-embed=FILE],
[Absolute path to a file containing CA certificates to embed in the curl tool (example: /etc/ca-bundle.crt)])
AS_HELP_STRING([--without-ca-embed], [Don't embed a default CA bundle in the curl tool]),
AS_HELP_STRING([--without-ca-embed], [Do not embed a default CA bundle in the curl tool]),
[
want_ca_embed="$withval"
if test "x$want_ca_embed" = "xyes"; then
@ -1293,7 +1293,7 @@ AS_HELP_STRING([--without-ca-embed], [Don't embed a default CA bundle in the cur
[ want_ca_embed="unset" ])
CURL_CA_EMBED=''
if test "x$want_ca_embed" != "xno" -a "x$want_ca_embed" != "xunset" -a -f "$want_ca_embed"; then
if test "x$want_ca_embed" != "xno" && test "x$want_ca_embed" != "xunset" && test -f "$want_ca_embed"; then
if test -n "$PERL"; then
CURL_CA_EMBED="$want_ca_embed"
AC_SUBST(CURL_CA_EMBED)
@ -1307,38 +1307,6 @@ AS_HELP_STRING([--without-ca-embed], [Don't embed a default CA bundle in the cur
fi
])
dnl CURL_CHECK_WIN32_LARGEFILE
dnl -------------------------------------------------
dnl Check if curl's Win32 large file will be used
AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
if test "$curl_cv_native_windows" = 'yes'; then
AC_MSG_CHECKING([whether build target supports Win32 large files])
if test "$curl_cv_wince" = 'yes'; then
dnl Windows CE does not support large files
curl_win32_has_largefile='no'
else
dnl All mingw-w64 versions support large files
curl_win32_has_largefile='yes'
fi
case "$curl_win32_has_largefile" in
yes)
if test x"$enable_largefile" = 'xno'; then
AC_MSG_RESULT([yes (large file disabled)])
else
AC_MSG_RESULT([yes (large file enabled)])
AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
[Define to 1 if you are building a Windows target with large file support.])
fi
;;
*)
AC_MSG_RESULT([no])
;;
esac
fi
])
dnl CURL_CHECK_WIN32_CRYPTO
dnl -------------------------------------------------
dnl Check if curl's Win32 crypto lib can be used
@ -1347,7 +1315,7 @@ AC_DEFUN([CURL_CHECK_WIN32_CRYPTO], [
AC_REQUIRE([CURL_CHECK_NATIVE_WINDOWS])dnl
AC_MSG_CHECKING([whether build target supports Win32 crypto API])
curl_win32_crypto_api="no"
if test "$curl_cv_native_windows" = "yes" -a "$curl_cv_winuwp" != "yes"; then
if test "$curl_cv_native_windows" = "yes" && test "$curl_cv_winuwp" != "yes"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
@ -1414,7 +1382,7 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
[$PATH:/usr/bin:/usr/local/bin])
fi
if test "x$PKGCONFIG" != "xno"; then
if test "$PKGCONFIG" != "no"; then
AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1
itexists=`CURL_EXPORT_PCDIR([$2]) dnl
@ -1455,7 +1423,7 @@ dnl Save build info for test runner to pick up and log
AC_DEFUN([CURL_PREPARE_BUILDINFO], [
curl_pflags=""
if test "$curl_cv_apple" = 'yes'; then
if test "$curl_cv_apple" = "yes"; then
curl_pflags="${curl_pflags} APPLE"
fi
case $host in
@ -1475,23 +1443,20 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
fi
;;
esac
if test "$curl_cv_native_windows" = 'yes'; then
if test "$curl_cv_native_windows" = "yes"; then
curl_pflags="${curl_pflags} WIN32"
fi
if test "$curl_cv_wince" = 'yes'; then
curl_pflags="${curl_pflags} WINCE"
fi
if test "$curl_cv_winuwp" = 'yes'; then
if test "$curl_cv_winuwp" = "yes"; then
curl_pflags="${curl_pflags} UWP"
fi
if test "$curl_cv_cygwin" = 'yes'; then
if test "$curl_cv_cygwin" = "yes"; then
curl_pflags="${curl_pflags} CYGWIN"
fi
case $host_os in
msdos*) curl_pflags="${curl_pflags} DOS";;
amiga*) curl_pflags="${curl_pflags} AMIGA";;
esac
if test "x$compiler_id" = 'xGNU_C'; then
if test "$compiler_id" = "GNU_C"; then
curl_pflags="${curl_pflags} GCC"
fi
if test "$compiler_id" = "APPLECLANG"; then
@ -1502,7 +1467,7 @@ AC_DEFUN([CURL_PREPARE_BUILDINFO], [
case $host_os in
mingw*) curl_pflags="${curl_pflags} MINGW";;
esac
if test "x$cross_compiling" = 'xyes'; then
if test "$cross_compiling" = "yes"; then
curl_pflags="${curl_pflags} CROSS"
fi
squeeze curl_pflags
@ -1544,7 +1509,7 @@ TEST EINVAL TEST
AC_MSG_RESULT([$cpp])
dnl we need cpp -P so check if it works then
if test "x$cpp" = "xyes"; then
if test "$cpp" = "yes"; then
AC_MSG_CHECKING([if cpp -P works])
OLDCPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -P"
@ -1554,7 +1519,7 @@ TEST EINVAL TEST
], [cpp_p=yes], [cpp_p=no])
AC_MSG_RESULT([$cpp_p])
if test "x$cpp_p" = "xno"; then
if test "$cpp_p" = "no"; then
AC_MSG_WARN([failed to figure out cpp -P alternative])
# without -P
CPPPFLAG=""
@ -1574,7 +1539,7 @@ TEST EINVAL TEST
dnl CURL_DARWIN_CFLAGS
dnl
dnl Set -Werror=partial-availability to detect possible breaking code
dnl with very low deployment targets.
dnl with low deployment targets.
dnl
AC_DEFUN([CURL_DARWIN_CFLAGS], [
@ -1591,7 +1556,7 @@ AC_DEFUN([CURL_DARWIN_CFLAGS], [
dnl CURL_SUPPORTS_BUILTIN_AVAILABLE
dnl
dnl Check to see if the compiler supports __builtin_available. This built-in
dnl compiler function first appeared in Apple LLVM 9.0.0. It's so new that, at
dnl compiler function first appeared in Apple LLVM 9.0.0. It is so new that, at
dnl the time this macro was written, the function was not yet documented. Its
dnl purpose is to return true if the code is running under a certain OS version
dnl or later.

View file

@ -35,14 +35,30 @@ esac
if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2022' ]; then
openssl_root_win="C:/OpenSSL-v35${openssl_suffix}"
openssl_root="$(cygpath "${openssl_root_win}")"
elif [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2019' ]; then
openssl_root_win="C:/OpenSSL-v30${openssl_suffix}"
else
openssl_root_win="C:/OpenSSL-v111${openssl_suffix}"
openssl_root="$(cygpath "${openssl_root_win}")"
fi
openssl_root="$(cygpath "${openssl_root_win}")"
if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
# Install custom cmake version
if [ -n "${CMAKE_VERSION:-}" ]; then
cmake_ver=$(printf '%02d%02d' \
"$(echo "${CMAKE_VERSION}" | cut -f1 -d.)" \
"$(echo "${CMAKE_VERSION}" | cut -f2 -d.)")
if [ "${cmake_ver}" -ge '0320' ]; then
fn="cmake-${CMAKE_VERSION}-windows-x86_64"
else
fn="cmake-${CMAKE_VERSION}-win64-x64"
fi
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \
--location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${fn}.zip" --output bin.zip
7z x -y bin.zip >/dev/null
rm -f bin.zip
PATH="$PWD/${fn}/bin:$PATH"
fi
# Set env CHKPREFILL to the value '_chkprefill' to compare feature detection
# results with and without the pre-fill feature. They have to match.
for _chkprefill in '' ${CHKPREFILL:-}; do
@ -76,7 +92,7 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
-DCURL_USE_OPENSSL="${OPENSSL}" \
-DCURL_USE_LIBPSL=OFF \
${options} \
|| { cat ${root}/_bld/CMakeFiles/CMake* 2>/dev/null; false; }
|| { cat "${root}"/_bld/CMakeFiles/CMake* 2>/dev/null; false; }
[ "${APPVEYOR_BUILD_WORKER_IMAGE}" = 'Visual Studio 2013' ] && cd ..
done
if [ -d _bld_chkprefill ] && ! diff -u _bld/lib/curl_config.h _bld_chkprefill/lib/curl_config.h; then
@ -93,12 +109,14 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
(
cd projects
./generate.bat "${VC_VERSION}"
msbuild.exe -maxcpucount "-property:Configuration=${PRJ_CFG}" "Windows/${VC_VERSION}/curl-all.sln"
msbuild.exe -maxcpucount "-property:Configuration=${PRJ_CFG}" "-property:Platform=${PLAT}" "Windows/${VC_VERSION}/curl-all.sln"
)
curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe"
[ "${PLAT}" = 'x64' ] && platdir='Win64' || platdir='Win32'
[[ "${PRJ_CFG}" = *'Debug'* ]] && binsuffix='d' || binsuffix=''
curl="build/${platdir}/${VC_VERSION}/${PRJ_CFG}/curl${binsuffix}.exe"
fi
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \;
find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \;
if [ -z "${SKIP_RUN:-}" ]; then
"${curl}" --disable --version
else

View file

@ -46,14 +46,14 @@ environment:
# generated CMake-based Visual Studio builds
- job_name: 'CMake, VS2022, Release, x64, OpenSSL 3.5, Shared, Build-tests'
- job_name: 'CM VS2022, Release, x64, OpenSSL 3.5, Shared, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
PRJ_CFG: Release
OPENSSL: 'ON'
SHARED: 'ON'
- job_name: 'CMake, VS2022, Release, arm64, Schannel, Static, Build-tests'
- job_name: 'CM VS2022, Release, arm64, Schannel, Static, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A ARM64'
@ -61,7 +61,7 @@ environment:
SCHANNEL: 'ON'
DEBUG: 'OFF'
CURLDEBUG: 'ON'
- job_name: 'CMake, VS2010, Debug, x64, Schannel, Shared, Build-tests & examples, XP'
- job_name: 'CM VS2010, Debug, x64, Schannel, Shared, Build-tests & examples, XP'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013'
PRJ_GEN: 'Visual Studio 10 2010'
TARGET: '-A x64'
@ -70,38 +70,40 @@ environment:
SCHANNEL: 'ON'
SHARED: 'ON'
EXAMPLES: 'ON'
- job_name: 'CMake, VS2012, Release, x86, OpenSSL 1.1.1 + Schannel, Shared, Build-tests'
- job_name: 'CM VS2012, Release, x86, Schannel, Shared, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
PRJ_GEN: 'Visual Studio 11 2012'
TARGET: '-A Win32'
PRJ_CFG: Release
OPENSSL: 'ON'
SCHANNEL: 'ON'
SHARED: 'ON'
- job_name: 'CMake, VS2013, Debug, x64, OpenSSL 1.1.1, Shared, Build-only'
- job_name: 'CM VS2013, Debug, x64, Schannel, Shared, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: '3.18.4'
PRJ_GEN: 'Visual Studio 12 2013'
TARGET: '-A x64'
PRJ_CFG: Debug
OPENSSL: 'ON'
SCHANNEL: 'ON'
SHARED: 'ON'
TFLAGS: 'skipall'
- job_name: 'CMake, VS2015, Debug, x64, OpenSSL 1.1.1, Static, Build-only'
- job_name: 'CM VS2015, Debug, x64, Schannel, Static, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: '3.19.8'
PRJ_GEN: 'Visual Studio 14 2015'
TARGET: '-A x64'
PRJ_CFG: Debug
OPENSSL: 'ON'
SCHANNEL: 'ON'
TFLAGS: 'skipall'
- job_name: 'CMake, VS2017, Debug, x64, OpenSSL 1.1.1, Shared, Build-only'
- job_name: 'CM VS2017, Debug, x64, Schannel, Shared, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017'
CMAKE_VERSION: '3.20.6'
PRJ_GEN: 'Visual Studio 15 2017'
TARGET: '-A x64'
PRJ_CFG: Debug
OPENSSL: 'ON'
SCHANNEL: 'ON'
SHARED: 'ON'
TFLAGS: 'skipall'
- job_name: 'CMake, VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, Build-tests'
- job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
PRJ_GEN: 'Visual Studio 16 2019'
TARGET: '-A x64'
@ -109,7 +111,7 @@ environment:
OPENSSL: 'ON'
SCHANNEL: 'ON'
SHARED: 'ON'
- job_name: 'CMake, VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
- job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
@ -119,14 +121,14 @@ environment:
ENABLE_UNICODE: 'ON'
EXAMPLES: 'ON'
TOOLSET: 'ClangCl'
- job_name: 'CMake, VS2022, Debug, x64, Schannel, Static, Unicode, Build-tests'
- job_name: 'CM VS2022, Debug, x64, Schannel, Static, Unicode, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
PRJ_CFG: Debug
SCHANNEL: 'ON'
ENABLE_UNICODE: 'ON'
- job_name: 'CMake, VS2022, Release, x64, Schannel, Shared, Unicode, DEBUGBUILD, no-CURLDEBUG, Build-tests'
- job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, DEBUGBUILD, no-CURLDEBUG, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
@ -135,12 +137,12 @@ environment:
ENABLE_UNICODE: 'ON'
SHARED: 'ON'
CURLDEBUG: 'OFF'
- job_name: 'CMake, VS2022, Debug, x64, no SSL, Static, Build-tests'
- job_name: 'CM VS2022, Debug, x64, no SSL, Static, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
PRJ_CFG: Debug
- job_name: 'CMake, VS2022, Debug, x64, no SSL, Static, HTTP only, Build-tests'
- job_name: 'CM VS2022, Debug, x64, no SSL, Static, HTTP only, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
PRJ_GEN: 'Visual Studio 17 2022'
TARGET: '-A x64'
@ -149,10 +151,17 @@ environment:
# generated VisualStudioSolution-based builds
- job_name: 'VisualStudioSolution, VS2013, Debug, x86, Schannel, Build-only'
- job_name: 'VisualStudioSolution VS2010, Release, x86, Schannel, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013'
BUILD_SYSTEM: VisualStudioSolution
PRJ_CFG: 'DLL Release - DLL Windows SSPI - DLL WinIDN'
PLAT: 'Win32'
VC_VERSION: VC10
- job_name: 'VisualStudioSolution VS2013, Debug, x64, Schannel, Build-only'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
BUILD_SYSTEM: VisualStudioSolution
PRJ_CFG: 'DLL Debug - DLL Windows SSPI - DLL WinIDN'
PLAT: 'x64'
VC_VERSION: VC12
install:

File diff suppressed because it is too large Load diff

View file

@ -149,7 +149,7 @@ while test "$#" -gt 0; do
;;
--libs)
if test "@libdir@" != '/usr/lib' -a "@libdir@" != '/usr/lib64'; then
if test "@libdir@" != '/usr/lib' && test "@libdir@" != '/usr/lib64'; then
curllibdir="-L@libdir@ "
else
curllibdir=''

View file

@ -35,7 +35,8 @@ space separated fields.
4. The ALPN id for the destination host
5. The hostname for the destination host
6. The port number for the destination host
7. The expiration date and time of this entry within double quotes. The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT.
7. The expiration date and time of this entry within double quotes.
The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT.
8. Boolean (1 or 0) if "persist" was set for this entry
9. Integer priority value (not currently used)

View file

@ -49,7 +49,7 @@ Clojure: [clj-curl](https://github.com/lsevero/clj-curl) by Lucas Severo
[Fortran](https://github.com/interkosmos/fortran-curl) Written by Philipp Engel
[Gambas](https://gambas.sourceforge.net/)
[Gambas](https://gambaswiki.org/website/en/main.html)
[glib/GTK+](https://web.archive.org/web/20100526203452/atterer.net/glibcurl) Written by Richard Atterer
@ -61,7 +61,7 @@ Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang
[Haskell](https://hackage.haskell.org/package/curl) Written by Galois, Inc
[Hollywood](https://www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn
[Hollywood](https://web.archive.org/web/20250116185836/www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn
[Java](https://github.com/covers1624/curl4j)
@ -73,7 +73,7 @@ Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang
[LibQurl](https://github.com/Qriist/LibQurl) a feature rich AutoHotKey v2 (AHKv2) wrapper around libcurl.
Lua: [luacurl](https://web.archive.org/web/20201205052437/luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel
Lua: [luacurl](https://web.archive.org/web/20201205052437/luacurl.luaforge.net/) by Alexander Marinov, [Lua-curl](https://github.com/Lua-cURL) by Jürgen Hötzel
[Mono](https://web.archive.org/web/20070606064500/forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips
@ -98,11 +98,11 @@ Bailiff and Bálint Szilakszi,
[PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL
[PostgreSQL](https://github.com/RekGRpth/pg_curl) - cURL client for PostgreSQL
[PostgreSQL](https://github.com/RekGRpth/pg_curl) - curl client for PostgreSQL
[PureBasic](https://www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem
[PureBasic](https://web.archive.org/web/20250325015028/www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem
[Python](http://pycurl.io/) PycURL by Kjetil Jacobsen
[Python](https://github.com/pycurl/pycurl) PycURL by Kjetil Jacobsen
[Python](https://pypi.org/project/pymcurl/) mcurl by Ganesh Viswanathan
@ -112,7 +112,7 @@ Bailiff and Bálint Szilakszi,
[Rexx](https://rexxcurl.sourceforge.net/) Written Mark Hessling
[Ring](https://ring-lang.sourceforge.io/doc1.3/libcurl.html) RingLibCurl by Mahmoud Fayed
[Ring](https://ring-lang.github.io/doc1.24/libcurl.html) RingLibCurl by Mahmoud Fayed
RPG, support for ILE/RPG on OS/400 is included in source distribution

View file

@ -111,8 +111,8 @@ projects but someone's gotta do it. It makes things a lot easier if you submit
a small description of your fix or your new features with every contribution
so that it can be swiftly added to the package documentation.
Documentation is mostly provided as manpages or plain ASCII files. The
manpages are rendered from their source files that are usually written using
Documentation is mostly provided as man pages or plain ASCII files. The
man pages are rendered from their source files that are usually written using
markdown. Most HTML files on the website and in the release archives are
generated from corresponding markdown and ASCII files.
@ -289,7 +289,7 @@ Just ask if this is what you would want. You are required to have posted
several high quality patches first, before you can be granted push access.
## Useful resources
- [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI)
- [Webinar on getting code into curl](https://youtu.be/QmZ3W1d6LQI)
# Update copyright and license information

View file

@ -68,8 +68,8 @@ Disable the FTP (and FTPS) protocol
## `CURL_DISABLE_GETOPTIONS`
Disable the `curl_easy_options` API calls that lets users get information
about existing options to `curl_easy_setopt`.
Disable the `curl_easy_options()` API calls that lets users get information
about existing options to `curl_easy_setopt()`.
## `CURL_DISABLE_GOPHER`
@ -182,6 +182,12 @@ Disable the TELNET protocol
Disable the TFTP protocol
## `CURL_DISABLE_TYPECHECK`
Disable `curl_easy_setopt()`/`curl_easy_getinfo()` type checking.
Useful to improve build performance for the `tests/libtest` test tool.
## `CURL_DISABLE_VERBOSE_STRINGS`
Disable verbose strings and error messages.

View file

@ -12,24 +12,6 @@ email the
as soon as possible and explain to us why this is a problem for you and
how your use case cannot be satisfied properly using a workaround.
## Windows CE
Windows CE "mainstream support" ended on October 9, 2018, and "Extended
Support" ended on October 10, 2023.
curl drops all support in November 2025.
## VS2008
curl drops support for getting built with Microsoft Visual Studio 2008 in
November 2025.
The only reason we kept support for this version is for Windows CE - and we
intend to remove support for that Operating System in this time frame as well.
Bumping the minimum to VS2010. VS2008 is a pain to support.
Previous discussion and details: https://github.com/curl/curl/discussions/15972
## Windows XP
In January 2026, curl drops support for Windows XP and Server 2003. Their
@ -41,20 +23,6 @@ Making the new minimum target Windows version Vista / Server 2008.
In March 2026, we drop support for all c-ares versions before 1.16.0.
## OpenSSL 1.0.2
OpenSSL and others only ship fixes for this version to paying customers,
meaning users of the free version risk being vulnerable.
We remove support for this OpenSSL version from curl in December 2025.
## OpenSSL 1.1.1
OpenSSL and others only ship fixes to paying customers, meaning users of the
free version risk being vulnerable.
We remove support for this OpenSSL version from curl in December 2025.
## OpenSSL-QUIC
OpenSSL-QUIC is what we call the curl QUIC backend that uses the OpenSSL QUIC
@ -68,7 +36,25 @@ stack.
- curl users building with vanilla OpenSSL can still use QUIC through the
means of ngtcp2
We remove the OpenSSL-QUIC backend in March 2026.
We remove the OpenSSL-QUIC backend in January 2026.
## RTMP
RTMP in curl is powered by the 3rd party library librtmp.
- RTMP is barely used by curl users (2.2% in the 2025 survey)
- librtmp has no test cases, makes no proper releases and has not had a single
commit within the last year
- librtmp parses the URL itself and requires non-compliant URLs for this
- we have no RTMP tests
Support for RTMP in libcurl gets removed in April 2026.
## CMake 3.17 and earlier
We remove support for CMake <3.18 in April 2026.
CMake 3.18 was released on 2020-07-15.
## Past removals
@ -88,3 +74,6 @@ We remove the OpenSSL-QUIC backend in March 2026.
- BearSSL (removed in 8.15.0)
- msh3 (removed in 8.16.0)
- winbuild build system (removed in 8.17.0)
- Windows CE (removed in 8.18.0)
- Support for Visual Studio 2008 (removed in 8.18.0)
- OpenSSL 1.1.1 and older (removed in 8.18.0)

View file

@ -49,8 +49,8 @@ archives](https://curl.se/mail/list.cgi?list=curl-distros)).
*Rolling Release*
- curl package source and patches: https://git.buildroot.net/buildroot/tree/package/libcurl
- curl issues: https://bugs.buildroot.org/buglist.cgi?quicksearch=curl
- curl package source and patches: **missing URL**
- curl issues: **missing URL**
## Chimera
@ -165,7 +165,7 @@ unless it is specific to Homebrew's way of packaging software.
- curl: https://svnweb.mageia.org/packages/cauldron/curl/current/SPECS/curl.spec?view=markup
- curl issues: https://bugs.mageia.org/buglist.cgi?bug_status=NEW&bug_status=UNCONFIRMED&bug_status=NEEDINFO&bug_status=UPSTREAM&bug_status=ASSIGNED&component=RPM%20Packages&f1=cf_rpmpkg&list_id=176576&o1=casesubstring&product=Mageia&query_format=advanced&v1=curl
- curl patches: https://svnweb.mageia.org/packages/cauldron/curl/current/SOURCES/
- curl patches in stable distro releases: https://svnweb.mageia.org/packages/updates/<STABLE_VERSION>/curl/current/SOURCES/
- curl patches in stable distro releases: https://svnweb.mageia.org/packages/updates/9/curl/current/SOURCES/
- curl security: https://advisories.mageia.org/src_curl.html
## MSYS2
@ -188,9 +188,9 @@ unless it is specific to Homebrew's way of packaging software.
*Rolling Release*
- curl: https://github.com/lordmulder/cURL-build-win32
- curl issues: https://github.com/lordmulder/cURL-build-win32/issues
- curl patches: https://github.com/lordmulder/cURL-build-win32/tree/master/patch
- curl: https://github.com/lordmulder/curl-build-win32
- curl issues: https://github.com/lordmulder/curl-build-win32/issues
- curl patches: https://github.com/lordmulder/curl-build-win32/tree/master/patch
## NixOS
@ -222,6 +222,12 @@ can also be used on other distributions
- curl issues: https://support.oracle.com/ (requires support contract)
- curl patches: https://github.com/oracle/solaris-userland/tree/master/components/curl/patches
## OpenBSD
- curl: https://github.com/openbsd/ports/tree/master/net/curl
- curl issues: https://www.openbsd.org/mail.html (ports mailing list)
- curl patches: https://github.com/openbsd/ports/tree/master/net/curl/patches
## OpenEmbedded / Yocto Project
*Rolling Release*
@ -250,7 +256,7 @@ can also be used on other distributions
## Rocky Linux
- curl: https://git.rockylinux.org/staging/rpms/curl/-/blob/r9/SPECS/curl.spec
- curl issues: https://bugs.rockylinux.org
- curl issues: https://bugs.rockylinux.org/
- curl patches: https://git.rockylinux.org/staging/rpms/curl/-/tree/r9/SOURCES
## SerenityOS

View file

@ -76,10 +76,8 @@ The above works for these test sites:
```sh
https://defo.ie/ech-check.php
https://draft-13.esni.defo.ie:8413/stats
https://draft-13.esni.defo.ie:8414/stats
https://crypto.cloudflare.com/cdn-cgi/trace
https://tls-ech.dev
https://tls-ech.dev/
```
The list above has 4 different server technologies, implemented by 3 different

1559
docs/FAQ

File diff suppressed because it is too large Load diff

1431
docs/FAQ.md Normal file

File diff suppressed because it is too large Load diff

View file

@ -223,6 +223,9 @@ March: security vulnerability: libcurl TFTP Packet Buffer Overflow
September: The major SONAME number for libcurl was bumped to 4 due to the
removal of ftp third party transfer support.
October: we started to offer the Mozilla CA cert bundle as a PEM file on the
curl website.
November: Added SCP and SFTP support
2007
@ -326,6 +329,10 @@ April: added the cyassl backend (later renamed to wolfSSL)
August: support for HTTP/2 server push
September: started "everything curl". A separate stand-alone book documenting
curl and related info in perhaps a more tutorial style rather than just a
reference,
December: Public Suffix List
2016
@ -340,6 +347,8 @@ April: added the cyassl backend (later renamed to wolfSSL)
2017
----
May: Fastly starts hosting the curl website
July: OSS-Fuzz started fuzzing libcurl
September: Added MultiSSL support
@ -390,6 +399,8 @@ April: added the cyassl backend (later renamed to wolfSSL)
2019
----
January: Daniel started working full-time on curl, employed by wolfSSL
March: added experimental alt-svc support
August: the first HTTP/3 requests with curl.
@ -404,7 +415,8 @@ April: added the cyassl backend (later renamed to wolfSSL)
January: added BearSSL support
March: removed support for PolarSSL, added wolfSSH support
March: removed support for PolarSSL, added wolfSSH support. Created the first
dashboard on the website.
April: experimental MQTT support
@ -437,6 +449,8 @@ March: added --json, removed mesalink support
The curl.se website serves 16,500 GB/month over 462M requests, the
official docker image has been pulled 4,098,015,431 times.
April: added support for msh3 as another HTTP/3 backend
October: initial WebSocket support
2023
@ -447,7 +461,8 @@ March: remove support for curl_off_t < 8 bytes
March 31: we started working on a new command line tool for URL parsing and
manipulations: trurl.
May: added support for HTTP/2 over HTTPS proxy. Refuse to resolve .onion.
May: added support for HTTP/2 over HTTPS proxy. Refuse to resolve .onion. The
curl GitHub repository reaches 30,000 stars.
August: Dropped support for the NSS library
@ -482,5 +497,27 @@ February 5: first 0RTT for QUIC, ssl session import/export
February: experimental HTTPS RR support
February 22: The website served 62.95 TB/month; 12.43 billion requests
The docker image has been pulled 6373501745 times.
February 22: The website served 62.95 TB/month; 12.43 billion requests. The
docker image has been pulled 6373501745 times.
June: we removed support for BearSSL, Secure Transport and msh3
October: Daniel gets awarded a gold medal by the Swedish Royal Academy of
Engineering Sciences for his work on curl.
We counted curl having been installed on 110 operating systems and 28 CPU
architectures.
November:
Public curl releases: 271
Command line options: 273
curl_easy_setopt() options: 308
Public functions in libcurl: 100
Contributors: 3534
We drop support for krb-ftp, Heimdal, wolfSSH and the winbuild build system.
Add support for Apple SecTrust, native CA certs on Apple systems.
December 15: the website served 78 TB over the last month.

View file

@ -54,7 +54,7 @@ versions do not work.
Build OpenSSL (version 3.5.0 or newer):
% git clone --quiet --depth=1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl
% git clone --depth 1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl
% cd openssl
% ./config --prefix=<somewhere1> --libdir=lib
% make
@ -140,7 +140,7 @@ Build curl:
Build GnuTLS:
% git clone --depth 1 https://gitlab.com/gnutls/gnutls.git
% git clone --depth 1 https://gitlab.com/gnutls/gnutls
% cd gnutls
% ./bootstrap
% ./configure --prefix=<somewhere1>
@ -182,7 +182,7 @@ Build curl:
Build wolfSSL:
% git clone https://github.com/wolfSSL/wolfssl.git
% git clone https://github.com/wolfSSL/wolfssl
% cd wolfssl
% autoreconf -fi
% ./configure --prefix=<somewhere1> --enable-quic --enable-session-ticket --enable-earlydata --enable-psk --enable-harden --enable-altcertchains
@ -317,7 +317,7 @@ See this [list of public HTTP/3 servers](https://bagder.github.io/HTTP3-test/)
### HTTPS eyeballing
With option `--http3` curl attempts earlier HTTP versions as well should the
connect attempt via HTTP/3 not succeed "fast enough". This strategy is similar
connect attempt via HTTP/3 fail "fast enough". This strategy is similar
to IPv4/6 happy eyeballing where the alternate address family is used in
parallel after a short delay.
@ -386,7 +386,7 @@ above.
Get, build and install nghttp2:
% git clone https://github.com/nghttp2/nghttp2.git
% git clone https://github.com/nghttp2/nghttp2
% cd nghttp2
% autoreconf -fi
% PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/home/daniel/build-quictls/lib/pkgconfig:/home/daniel/build-nghttp3/lib/pkgconfig:/home/daniel/build-ngtcp2/lib/pkgconfig LDFLAGS=-L/home/daniel/build-quictls/lib CFLAGS=-I/home/daniel/build-quictls/include ./configure --enable-maintainer-mode --prefix=/home/daniel/build-nghttp2 --disable-shared --enable-app --enable-http3 --without-jemalloc --without-libxml2 --without-systemd

View file

@ -60,7 +60,7 @@ account.
We regularly run our code through the [Coverity static code
analyzer](https://scan.coverity.com/) thanks to them offering this service to
us for free.
us free of charge.
## CodeSonar
@ -76,7 +76,7 @@ domain names, including `curl.se` and `curl.dev`. Daniel Stenberg owns these
domain names.
Until a few years ago, the curl website was present at `curl.haxx.se`. The
`haxx.se` domain is owned by Haxx AB, administrated by Daniel Stenberg. The
`haxx.se` domain is owned by Haxx AB, administered by Daniel Stenberg. The
curl.haxx.se name is meant to keep working and be redirecting to curl.se for
the foreseeable future.
@ -100,11 +100,11 @@ company). The machine is physically located in Sweden.
curl release tarballs are hosted on https://curl.se/download.html. They are
uploaded there at release-time by the release manager.
curl-for-win downloads are hosted on https://curl.se/windows and are uploaded
curl-for-win downloads are hosted on https://curl.se/windows/ and are uploaded
to the server by Viktor Szakats.
curl-for-QNX downloads are hosted on <https://curl.se/qnx> and are uploaded to
the server by Daniel Stenberg.
curl-for-QNX downloads are hosted on <https://curl.se/qnx/> and are uploaded
to the server by Daniel Stenberg.
Daily release tarball-like snapshots are generated automatically and are
provided for download at <https://curl.se/snapshots/>.

View file

@ -221,11 +221,12 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `BUILD_EXAMPLES`: Build libcurl examples. Default: `ON`
- `BUILD_LIBCURL_DOCS`: Build libcurl man pages. Default: `ON`
- `BUILD_MISC_DOCS`: Build misc man pages (e.g. `curl-config` and `mk-ca-bundle`). Default: `ON`
- `BUILD_SHARED_LIBS`: Build shared libraries. Default: `ON`
- `BUILD_STATIC_CURL`: Build curl executable with static libcurl. Default: `OFF`
- `BUILD_STATIC_LIBS`: Build static libraries. Default: `OFF`
- `BUILD_SHARED_LIBS`: Build shared libraries. Default: `ON` (if target platform supports shared libs, otherwise `OFF`)
- `BUILD_STATIC_CURL`: Build curl executable with static libcurl. Default: `OFF` (turns to `ON`, when building static libcurl only)
- `BUILD_STATIC_LIBS`: Build static libraries. Default: `OFF` (turns to `ON` if `BUILD_SHARED_LIBS` is `OFF`)
- `BUILD_TESTING`: Build tests. Default: `ON`
- `CURL_CLANG_TIDY`: Run the build through `clang-tidy`. Default: `OFF`
If enabled, it implies `CMAKE_UNITY_BUILD=OFF` and `CURL_DISABLE_TYPECHECK=ON`.
- `CURL_CLANG_TIDYFLAGS`: Custom options to pass to `clang-tidy`. Default: (empty)
- `CURL_CODE_COVERAGE`: Enable code coverage build options. Default: `OFF`
- `CURL_COMPLETION_FISH`: Install fish completions. Default: `OFF`
@ -317,10 +318,11 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
- `CURL_DISABLE_SHUFFLE_DNS`: Disable shuffle DNS feature. Default: `OFF`
- `CURL_DISABLE_SMB`: Disable SMB. Default: `OFF`
- `CURL_DISABLE_SMTP`: Disable SMTP. Default: `OFF`
- `CURL_DISABLE_SOCKETPAIR`: Disable use of socketpair for curl_multi_poll. Default: `OFF`
- `CURL_DISABLE_SOCKETPAIR`: Disable use of socketpair for curl_multi_poll(). Default: `OFF`
- `CURL_DISABLE_SRP`: Disable TLS-SRP support. Default: `OFF`
- `CURL_DISABLE_TELNET`: Disable Telnet. Default: `OFF`
- `CURL_DISABLE_TFTP`: Disable TFTP. Default: `OFF`
- `CURL_DISABLE_TYPECHECK`: Disable curl_easy_setopt()/curl_easy_getinfo() type checking. Default: `OFF`
- `CURL_DISABLE_VERBOSE_STRINGS`: Disable verbose strings. Default: `OFF`
- `CURL_DISABLE_WEBSOCKETS`: Disable WebSocket. Default: `OFF`
- `HTTP_ONLY`: Disable all protocols except HTTP (This overrides all `CURL_DISABLE_*` options). Default: `OFF`
@ -354,6 +356,7 @@ Details via CMake
- `CURL_USE_GNUTLS`: Enable GnuTLS for SSL/TLS. Default: `OFF`
- `CURL_USE_GSASL`: Use libgsasl. Default: `OFF`
- `CURL_USE_GSSAPI`: Use GSSAPI implementation. Default: `OFF`
- `CURL_USE_LIBBACKTRACE`: Use [libbacktrace](https://github.com/ianlancetaylor/libbacktrace). Requires build with TrackMemory and DWARF debug information. Default: `OFF`
- `CURL_USE_LIBPSL`: Use libpsl. Default: `ON`
- `CURL_USE_LIBSSH2`: Use libssh2. Default: `ON`
- `CURL_USE_LIBSSH`: Use libssh. Default: `OFF`
@ -386,7 +389,7 @@ Details via CMake
- `OPENSSL_USE_STATIC_LIBS`: Look for static OpenSSL libraries.
- `ZLIB_INCLUDE_DIR`: Absolute path to zlib include directory.
- `ZLIB_LIBRARY`: Absolute path to `zlib` library.
- `ZLIB_USE_STATIC_LIBS`: Look for static ZLIB library (requires CMake v3.24).
- `ZLIB_USE_STATIC_LIBS`: Look for static `zlib` library (requires CMake v3.24).
## Dependency options (tools)
@ -410,6 +413,8 @@ Details via CMake
- `LDAP_INCLUDE_DIR`: Absolute path to LDAP include directory.
- `LDAP_LIBRARY`: Absolute path to `ldap` library.
- `LDAP_LBER_LIBRARY`: Absolute path to `lber` library.
- `LIBBACKTRACE_INCLUDE_DIR`: Absolute path to libbacktrace include directory (https://github.com/ianlancetaylor/libbacktrace).
- `LIBBACKTRACE_LIBRARY`: Absolute path to `libbacktrace` library.
- `LIBGSASL_INCLUDE_DIR`: Absolute path to libgsasl include directory.
- `LIBGSASL_LIBRARY`: Absolute path to `libgsasl` library.
- `LIBIDN2_INCLUDE_DIR`: Absolute path to libidn2 include directory.
@ -479,6 +484,8 @@ Examples:
- `DANTED`: Default: `danted`
- `TEST_NGHTTPX`: Default: `nghttpx`
- `VSFTPD`: Default: `vsftps`
- `SSHD`: Default: `sshd`
- `SFTPD`: Default: `sftp-server`
## Feature detection variables
@ -537,6 +544,9 @@ Note: These variables are internal and subject to change.
- `curl-completion-zsh`: Build shell completions for zsh (built by default if enabled)
- `curl-ca-bundle`: Build the CA bundle via `scripts/mk-ca-bundle.pl`
- `curl-ca-firefox`: Build the CA bundle via `scripts/firefox-db2pem.sh`
- `curl-listcats`: Generate help category constants for `src/tool_help.h` from documentation.
- `curl-listhelp`: Generate `src/tool_listhelp.c` from documentation.
- `curl-optiontable`: Generate `lib/easyoptions.c` from documentation.
# Migrating from Visual Studio IDE Project Files

View file

@ -18,7 +18,7 @@ libcurl from [source code](https://curl.se/download.html).
You can download and install curl and libcurl using
the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
@ -141,7 +141,7 @@ These options are provided to select the TLS backend to use.
- GnuTLS: `--with-gnutls`.
- mbedTLS: `--with-mbedtls`
- OpenSSL: `--with-openssl` (also for BoringSSL, AWS-LC, LibreSSL, and quictls)
- rustls: `--with-rustls`
- Rustls: `--with-rustls`
- Schannel: `--with-schannel`
- wolfSSL: `--with-wolfssl`
@ -200,7 +200,7 @@ Building for Windows XP is required as a minimum.
You can build curl with:
- Microsoft Visual Studio 2008 v9.0 or later (`_MSC_VER >= 1500`)
- Microsoft Visual Studio 2010 v10.0 or later (`_MSC_VER >= 1600`)
- MinGW-w64 3.0 or later (`__MINGW64_VERSION_MAJOR >= 3`)
## Building Windows DLLs and C runtime (CRT) linkage issues
@ -244,7 +244,7 @@ Either run setup-x86_64.exe, then search and select packages individually, or tr
setup-x86_64.exe -P binutils -P gcc-core -P libpsl-devel -P libtool -P perl -P make
If the latter, matching packages should appear in the install rows (*is fickle though*) after selecting
the download site i.e. `https://mirrors.kernel.org`. In either case, follow the GUI prompts
the download site i.e. `https://mirrors.kernel.org/`. In either case, follow the GUI prompts
until you reach the "Select Packages" window; then select packages, click next, and finish
the `cygwin` package installation.
@ -650,7 +650,7 @@ This is a probably incomplete list of known CPU architectures and operating
systems that curl has been compiled for. If you know a system curl compiles
and runs on, that is not listed, please let us know.
## 109 Operating Systems
## 108 Operating Systems
AIX, AmigaOS, Android, ArcaOS, Aros, Atari FreeMiNT, Azure Sphere, BeOS,
Blackberry 10, Blackberry Tablet OS, Cell OS, Cesium, CheriBSD, Chrome OS,
@ -665,7 +665,7 @@ and runs on, that is not listed, please let us know.
SINIX-Z, SkyOS, SmartOS, Solaris, Sortix, SunOS, Syllable OS, Symbian,
Tizen, TPF, Tru64, tvOS, ucLinux, Ultrix, UNICOS, UnixWare, visionOS, VMS,
vxWorks, watchOS, Wear OS, WebOS, Wii System Software, Wii U, Windows,
Windows CE, Xbox System, Xenix, z/OS, z/TPF, z/VM, z/VSE, Zephyr
Xbox System, Xenix, z/OS, z/TPF, z/VM, z/VSE, Zephyr
## 28 CPU Architectures

View file

@ -24,19 +24,22 @@ versions of libs and build tools.
We aim to support these or later versions.
- OpenSSL 1.0.2a
- LibreSSL 2.9.1
- GnuTLS 3.1.10
- mbedTLS 3.2.0
- zlib 1.2.5.2
- libssh2 1.9.0
- c-ares 1.6.0
- libssh 0.9.0
- libidn2 2.0.0
- wolfSSL 3.4.6
- OpenLDAP 2.0
- MIT Kerberos 1.3
- nghttp2 1.15.0
- brotli 1.0.0 (2017-09-21)
- c-ares 1.6.0 (2008-12-09)
- GnuTLS 3.6.5 (2018-12-01)
- libidn2 2.0.0 (2017-03-29)
- LibreSSL 2.9.1 (2019-04-22)
- libssh 0.9.0 (2019-06-28)
- libssh2 1.9.0 (2019-06-20)
- mbedTLS 3.2.0 (2022-07-11)
- MIT Kerberos 1.3 (2003-07-31)
- nghttp2 1.15.0 (2016-09-25)
- OpenLDAP 2.0 (2000-08-01)
- OpenSSL 3.0.0 (2021-09-07)
- Windows XP 5.1 (2001-08-24 - 2009-04-14)
- wolfSSL 3.4.6 (2017-09-22)
- zlib 1.2.5.2 (2011-12-11)
- zstd 1.0 (2016-08-31)
## Build tools
@ -44,13 +47,14 @@ versions of libs and build tools.
we use a few "build tools" and we make sure that we remain functional with
these versions:
- GNU Libtool 1.4.2
- GNU Autoconf 2.59
- GNU Automake 1.7
- GNU M4 1.4
- perl 5.8
- roffit 0.5
- cmake 3.7
- cmake 3.7 (2016-11-11)
- GNU autoconf 2.59 (2003-11-06)
- GNU automake 1.7 (2002-09-25)
- GNU libtool 1.4.2 (2001-09-11)
- GNU m4 1.4 (2007-09-21)
- mingw-w64 3.0 (2013-09-20)
- perl 5.8 (2002-07-19), on Windows: 5.22 (2015-06-01)
- Visual Studio 2010 10.0 (2010-04-12 - 2020-07-14)
Library Symbols
===============

View file

@ -7,22 +7,38 @@ SPDX-License-Identifier: curl
# IPFS
For an overview about IPFS, visit the [IPFS project site](https://ipfs.tech/).
In IPFS there are two protocols. IPFS and IPNS (their workings are explained in detail [here](https://docs.ipfs.tech/concepts/)). The ideal way to access data on the IPFS network is through those protocols. For example to access the Big Buck Bunny video the ideal way to access it is like: `ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi`
In IPFS there are two protocols. IPFS and IPNS (their workings are explained
in detail [here](https://docs.ipfs.tech/concepts/)). The ideal way to access
data on the IPFS network is through those protocols. For example to access
the Big Buck Bunny video the ideal way to access it is like:
`ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi`
## IPFS Gateways
IPFS Gateway acts as a bridge between traditional HTTP clients and IPFS.
IPFS Gateway specifications of HTTP semantics can be found [here](https://specs.ipfs.tech/http-gateways/).
IPFS Gateway specifications of HTTP semantics can be found
[here](https://specs.ipfs.tech/http-gateways/).
### Deserialized responses
By default, a gateway acts as a bridge between traditional HTTP clients and IPFS and performs necessary hash verification and deserialization. Through such gateway, users can download files, directories, and other content-addressed data stored with IPFS or IPNS as if they were stored in a traditional web server.
By default, a gateway acts as a bridge between traditional HTTP clients and
IPFS and performs necessary hash verification and deserialization. Through such
gateway, users can download files, directories, and other content-addressed
data stored with IPFS or IPNS as if they were stored in a traditional web
server.
### Verifiable responses
By explicitly requesting [application/vnd.ipld.raw](https://www.iana.org/assignments/media-types/application/vnd.ipld.raw) or [application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car) responses, by means defined in [Trustless Gateway Specification](https://specs.ipfs.tech/http-gateways/trustless-gateway/), the user is able to fetch raw content-addressed data and [perform hash verification themselves](https://docs.ipfs.tech/reference/http/gateway/#trustless-verifiable-retrieval).
By explicitly requesting
[application/vnd.ipld.raw](https://www.iana.org/assignments/media-types/application/vnd.ipld.raw) or
[application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car)
responses, by means defined in
[Trustless Gateway Specification](https://specs.ipfs.tech/http-gateways/trustless-gateway/),
the user is able to fetch raw content-addressed data and
[perform hash verification themselves](https://docs.ipfs.tech/reference/http/gateway/#trustless-verifiable-retrieval).
This enables users to use untrusted, public gateways without worrying they might return invalid/malicious bytes.
This enables users to use untrusted, public gateways without worrying they
might return invalid/malicious bytes.
## IPFS and IPNS protocol handling
@ -43,9 +59,9 @@ in this link:
`http://127.0.0.1:8080/ipfs/bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi`
## cURL handling of the IPFS protocols
## curl handling of the IPFS protocols
The IPFS integration in cURL hides this gateway logic for you. Instead of
The IPFS integration in curl hides this gateway logic for you. Instead of
providing a full URL to a file on IPFS like this:
```
@ -57,7 +73,7 @@ You can provide it with the IPFS protocol instead:
curl ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi
```
With the IPFS protocol way of asking a file, cURL still needs to know the
With the IPFS protocol way of asking a file, curl still needs to know the
gateway. curl essentially just rewrites the IPFS based URL to a gateway URL.
### IPFS_GATEWAY environment variable
@ -67,7 +83,7 @@ gateway.
### Automatic gateway detection
When you provide no additional details to cURL then it:
When you provide no additional details to curl then it:
1. First looks for the `IPFS_GATEWAY` environment variable and use that if it
is set.
@ -75,12 +91,12 @@ When you provide no additional details to cURL then it:
means that you have a local gateway running and that file contains the URL
to your local gateway.
If cURL fails, you are presented with an error message and a link to this page
If curl fails, you are presented with an error message and a link to this page
to the option most applicable to solving the issue.
### `--ipfs-gateway` argument
You can also provide a `--ipfs-gateway` argument to cURL. This overrules any
You can also provide a `--ipfs-gateway` argument to curl. This overrules any
other gateway setting. curl does not fallback to the other options if the
provided gateway did not work.
@ -107,21 +123,21 @@ option follows the redirect.
## Error messages and hints
Depending on the arguments, cURL could present the user with an error.
Depending on the arguments, curl could present the user with an error.
### Gateway file and environment variable
cURL tried to look for the file: `~/.ipfs/gateway` but could not find it. It
curl tried to look for the file: `~/.ipfs/gateway` but could not find it. It
also tried to look for the `IPFS_GATEWAY` environment variable but could not
find that either. This happens when no extra arguments are passed to cURL and
find that either. This happens when no extra arguments are passed to curl and
letting it try to figure it out [automatically](#automatic-gateway-detection).
Any IPFS implementation that has gateway support should expose its URL in
`~/.ipfs/gateway`. If you are already running a gateway, make sure it exposes
the file where cURL expects to find it.
the file where curl expects to find it.
Alternatively you could set the `IPFS_GATEWAY` environment variable or pass
the `--ipfs-gateway` flag to the cURL command.
the `--ipfs-gateway` flag to the curl command.
### Malformed gateway URL

View file

@ -1,662 +0,0 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
Known Bugs
These are problems and bugs known to exist at the time of this release. Feel
free to join in and help us correct one or more of these. Also be sure to
check the changelog of the current development status, as one or more of these
problems may have been fixed or changed somewhat since this was written.
1. HTTP
2. TLS
2.1 IMAPS connection fails with Rustls error
2.2 Access violation sending client cert with Schannel
2.5 Client cert handling with Issuer DN differs between backends
2.7 Client cert (MTLS) issues with Schannel
2.11 Schannel TLS 1.2 handshake bug in old Windows versions
2.13 CURLOPT_CERTINFO results in CURLE_OUT_OF_MEMORY with Schannel
2.14 mbedTLS and CURLE_AGAIN handling
3. Email protocols
3.1 IMAP SEARCH ALL truncated response
3.2 No disconnect command
3.4 AUTH PLAIN for SMTP is not working on all servers
3.5 APOP authentication fails on POP3
3.6 POP3 issue when reading small chunks
4. Command line
4.1 -T /dev/stdin may upload with an incorrect content length
4.2 -T - always uploads chunked
5. Build and portability issues
5.1 OS400 port requires deprecated IBM library
5.2 curl-config --libs contains private details
5.3 LDFLAGS passed too late making libs linked incorrectly
5.6 Cygwin: make install installs curl-config.1 twice
5.12 flaky CI builds
5.13 long paths are not fully supported on Windows
5.15 Unicode on Windows
6. Authentication
6.1 Digest auth-int for PUT/POST
6.2 MIT Kerberos for Windows build
6.3 NTLM in system context uses wrong name
6.5 NTLM does not support password with Unicode 'SECTION SIGN' character
6.6 libcurl can fail to try alternatives with --proxy-any
6.7 Do not clear digest for single realm
6.9 SHA-256 digest not supported in Windows SSPI builds
6.10 curl never completes Negotiate over HTTP
6.11 Negotiate on Windows fails
6.13 Negotiate against Hadoop HDFS
7. FTP
7.4 FTP with ACCT
7.12 FTPS directory listing hangs on Windows with Schannel
9. SFTP and SCP
9.1 SFTP does not do CURLOPT_POSTQUOTE correct
9.3 Remote recursive folder creation with SFTP
9.4 libssh blocking and infinite loop problem
9.5 Cygwin: "WARNING: UNPROTECTED PRIVATE KEY FILE!"
10. Connection
10.1 --interface with link-scoped IPv6 address
10.2 Does not acknowledge getaddrinfo sorting policy
10.3 SOCKS-SSPI discards the security context
11. Internals
11.1 gssapi library name + version is missing in curl_version_info()
11.2 error buffer not set if connection to multiple addresses fails
11.4 HTTP test server 'connection-monitor' problems
11.5 Connection information when using TCP Fast Open
11.6 test cases sometimes timeout
11.7 CURLOPT_CONNECT_TO does not work for HTTPS proxy
11.8 WinIDN test failures
11.9 setting a disabled option should return CURLE_NOT_BUILT_IN
12. LDAP
12.1 OpenLDAP hangs after returning results
12.2 LDAP on Windows does authentication wrong?
12.3 LDAP on Windows does not work
12.4 LDAPS requests to ActiveDirectory server hang
13. TCP/IP
13.1 telnet code does not handle partial writes properly
13.2 Trying local ports fails on Windows
15. CMake
15.1 cmake outputs: no version information available
15.6 uses -lpthread instead of Threads::Threads
15.7 generated .pc file contains strange entries
15.13 CMake build with MIT Kerberos does not work
16. aws-sigv4
16.2 aws-sigv4 does not handle multipart/form-data correctly
17. HTTP/2
17.1 HTTP/2 prior knowledge over proxy
17.2 HTTP/2 frames while in the connection pool kill reuse
17.3 ENHANCE_YOUR_CALM causes infinite retries
17.4 HTTP/2 + TLS spends a lot of time in recv
18. HTTP/3
18.1 connection migration does not work
18.2 quiche: QUIC connection is draining
18.3 OpenSSL-QUIC problems on google.com
19. RTSP
19.1 Some methods do not support response bodies
==============================================================================
1. HTTP
2. TLS
2.1 IMAPS connection fails with Rustls error
https://github.com/curl/curl/issues/10457
2.2 Access violation sending client cert with Schannel
When using Schannel to do client certs, curl sets PKCS12_NO_PERSIST_KEY to
avoid leaking the private key into the filesystem. Unfortunately that flag
instead seems to trigger a crash.
See https://github.com/curl/curl/issues/17626
2.5 Client cert handling with Issuer DN differs between backends
When the specified client certificate does not match any of the
server-specified DNs, the OpenSSL and GnuTLS backends behave differently.
The github discussion may contain a solution.
See https://github.com/curl/curl/issues/1411
2.7 Client cert (MTLS) issues with Schannel
See https://github.com/curl/curl/issues/3145
2.11 Schannel TLS 1.2 handshake bug in old Windows versions
In old versions of Windows such as 7 and 8.1 the Schannel TLS 1.2 handshake
implementation likely has a bug that can rarely cause the key exchange to
fail, resulting in error SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED.
https://github.com/curl/curl/issues/5488
2.13 CURLOPT_CERTINFO results in CURLE_OUT_OF_MEMORY with Schannel
https://github.com/curl/curl/issues/8741
2.14 mbedTLS and CURLE_AGAIN handling
https://github.com/curl/curl/issues/15801
3. Email protocols
3.1 IMAP SEARCH ALL truncated response
IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
code reveals that pingpong.c contains some truncation code, at line 408, when
it deems the server response to be too large truncating it to 40 characters"
https://curl.se/bug/view.cgi?id=1366
3.2 No disconnect command
The disconnect commands (LOGOUT and QUIT) may not be sent by IMAP, POP3 and
SMTP if a failure occurs during the authentication phase of a connection.
3.4 AUTH PLAIN for SMTP is not working on all servers
Specifying "--login-options AUTH=PLAIN" on the command line does not seem to
work correctly.
See https://github.com/curl/curl/issues/4080
3.5 APOP authentication fails on POP3
See https://github.com/curl/curl/issues/10073
3.6 POP3 issue when reading small chunks
CURL_DBG_SOCK_RMAX=4 ./runtests.pl -v 982
See https://github.com/curl/curl/issues/12063
4. Command line
4.1 -T /dev/stdin may upload with an incorrect content length
-T stats the path to figure out its size in bytes to use it as Content-Length
if it is a regular file.
The problem with that is that, on BSDs and some other UNIXes (not Linux),
open(path) may not give you a file descriptor with a 0 offset from the start
of the file.
See https://github.com/curl/curl/issues/12177
4.2 -T - always uploads chunked
When the `<` shell operator is used. curl should realise that stdin is a
regular file in this case, and that it can do a non-chunked upload, like it
would do if you used -T file.
See https://github.com/curl/curl/issues/12171
5. Build and portability issues
5.1 OS400 port requires deprecated IBM library
curl for OS400 requires QADRT to build, which provides ASCII wrappers for
libc/POSIX functions in the ILE, but IBM no longer supports or even offers
this library to download.
See https://github.com/curl/curl/issues/5176
5.2 curl-config --libs contains private details
"curl-config --libs" include details set in LDFLAGS when configure is run
that might be needed only for building libcurl. Further, curl-config --cflags
suffers from the same effects with CFLAGS/CPPFLAGS.
5.3 LDFLAGS passed too late making libs linked incorrectly
Compiling latest curl on HP-UX and linking against a custom OpenSSL (which is
on the default loader/linker path), fails because the generated Makefile has
LDFLAGS passed on after LIBS.
See https://github.com/curl/curl/issues/14893
5.6 Cygwin: make install installs curl-config.1 twice
https://github.com/curl/curl/issues/8839
5.12 flaky CI builds
We run many CI builds for each commit and PR on github, and especially a
number of the Windows builds are flaky. This means that we rarely get all CI
builds go green and complete without errors. This is unfortunate as it makes
us sometimes miss actual build problems and it is surprising to newcomers to
the project who (rightfully) do not expect this.
See https://github.com/curl/curl/issues/6972
5.13 long paths are not fully supported on Windows
curl on Windows cannot access long paths (paths longer than 260 characters).
However, as a workaround, the Windows path prefix \\?\ which disables all
path interpretation may work to allow curl to access the path. For example:
\\?\c:\longpath.
See https://github.com/curl/curl/issues/8361
5.15 Unicode on Windows
Passing in a Unicode filename with -o:
https://github.com/curl/curl/issues/11461
Passing in Unicode character with -d:
https://github.com/curl/curl/issues/12231
Windows Unicode builds use homedir in current locale
The Windows Unicode builds of curl use the current locale, but expect Unicode
UTF-8 encoded paths for internal use such as open, access and stat. The
user's home directory is retrieved via curl_getenv in the current locale and
not as UTF-8 encoded Unicode.
See https://github.com/curl/curl/pull/7252 and
https://github.com/curl/curl/pull/7281
Cannot handle Unicode arguments in non-Unicode builds on Windows
If a URL or filename cannot be encoded using the user's current codepage then
it can only be encoded properly in the Unicode character set. Windows uses
UTF-16 encoding for Unicode and stores it in wide characters, however curl
and libcurl are not equipped for that at the moment except when built with
_UNICODE and UNICODE defined. Except for Cygwin, Windows cannot use UTF-8 as
a locale.
https://curl.se/bug/?i=345
https://curl.se/bug/?i=731
https://curl.se/bug/?i=3747
NTLM authentication and Unicode
NTLM authentication involving Unicode username or password only works
properly if built with UNICODE defined together with the Schannel backend.
The original problem was mentioned in:
https://curl.se/mail/lib-2009-10/0024.html
https://curl.se/bug/view.cgi?id=896
The Schannel version verified to work as mentioned in
https://curl.se/mail/lib-2012-07/0073.html
6. Authentication
6.1 Digest auth-int for PUT/POST
We do not support auth-int for Digest using PUT or POST
6.2 MIT Kerberos for Windows build
libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
library header files exporting symbols/macros that should be kept private to
the KfW library. See ticket #5601 at https://krbdev.mit.edu/rt/
6.3 NTLM in system context uses wrong name
NTLM authentication using SSPI (on Windows) when (lib)curl is running in
"system context" makes it use wrong(?) username - at least when compared to
what winhttp does. See https://curl.se/bug/view.cgi?id=535
6.5 NTLM does not support password with Unicode 'SECTION SIGN' character
https://en.wikipedia.org/wiki/Section_sign
https://codepoints.net/U+00A7 SECTION SIGN
https://github.com/curl/curl/issues/2120
6.6 libcurl can fail to try alternatives with --proxy-any
When connecting via a proxy using --proxy-any, a failure to establish an
authentication causes libcurl to abort trying other options if the failed
method has a higher preference than the alternatives. As an example,
--proxy-any against a proxy which advertise Negotiate and NTLM, but which
fails to set up Kerberos authentication does not proceed to try
authentication using NTLM.
https://github.com/curl/curl/issues/876
6.7 Do not clear digest for single realm
https://github.com/curl/curl/issues/3267
6.9 SHA-256 digest not supported in Windows SSPI builds
Windows builds of curl that have SSPI enabled use the native Windows API calls
to create authentication strings. The call to InitializeSecurityContext fails
with SEC_E_QOP_NOT_SUPPORTED which causes curl to fail with CURLE_AUTH_ERROR.
Microsoft does not document supported digest algorithms and that SEC_E error
code is not a documented error for InitializeSecurityContext (digest).
https://github.com/curl/curl/issues/6302
6.10 curl never completes Negotiate over HTTP
Apparently it is not working correctly...?
See https://github.com/curl/curl/issues/5235
6.11 Negotiate on Windows fails
When using --negotiate (or NTLM) with curl on Windows, SSL/TLS handshake
fails despite having a valid kerberos ticket cached. Works without any issue
in Unix/Linux.
https://github.com/curl/curl/issues/5881
6.13 Negotiate authentication against Hadoop HDFS
https://github.com/curl/curl/issues/8264
7. FTP
7.4 FTP with ACCT
When doing an operation over FTP that requires the ACCT command (but not when
logging in), the operation fails since libcurl does not detect this and thus
fails to issue the correct command: https://curl.se/bug/view.cgi?id=635
7.12 FTPS server compatibility on Windows with Schannel
FTPS is not widely used with the Schannel TLS backend and so there may be
more bugs compared to other TLS backends such as OpenSSL. In the past users
have reported hanging and failed connections. It is likely some changes to
curl since then fixed the issues. None of the reported issues can be
reproduced any longer.
If you encounter an issue connecting to your server via FTPS with the latest
curl and Schannel then please search for open issues or file a new issue.
9. SFTP and SCP
9.1 SFTP does not do CURLOPT_POSTQUOTE correct
When libcurl sends CURLOPT_POSTQUOTE commands when connected to an SFTP
server using the multi interface, the commands are not being sent correctly
and instead the connection is "cancelled" (the operation is considered done)
prematurely. There is a half-baked (busy-looping) patch provided in the bug
report but it cannot be accepted as-is. See
https://curl.se/bug/view.cgi?id=748
9.3 Remote recursive folder creation with SFTP
On this servers, the curl fails to create directories on the remote server
even when the CURLOPT_FTP_CREATE_MISSING_DIRS option is set.
See https://github.com/curl/curl/issues/5204
9.4 libssh blocking and infinite loop problem
In the SSH_SFTP_INIT state for libssh, the ssh session working mode is set to
blocking mode. If the network is suddenly disconnected during sftp
transmission, curl is stuck, even if curl is configured with a timeout.
https://github.com/curl/curl/issues/8632
9.5 Cygwin: "WARNING: UNPROTECTED PRIVATE KEY FILE!"
Running SCP and SFTP tests on Cygwin makes this warning message appear.
https://github.com/curl/curl/issues/11244
10. Connection
10.1 --interface with link-scoped IPv6 address
When you give the `--interface` option telling curl to use a specific
interface for its outgoing traffic in combination with an IPv6 address in the
URL that uses a link-local scope, curl might pick the wrong address from the
named interface and the subsequent transfer fails.
Example command line:
curl --interface eth0 'http://[fe80:928d:xxff:fexx:xxxx]/'
The fact that the given IP address is link-scoped should probably be used as
input to somehow make curl make a better choice for this.
https://github.com/curl/curl/issues/14782
10.2 Does not acknowledge getaddrinfo sorting policy
Even if a user edits /etc/gai.conf to prefer IPv4, curl still prefers and
tries IPv6 addresses first.
https://github.com/curl/curl/issues/16718
10.3 SOCKS-SSPI discards the security context
After a successful SSPI/GSS-API exchange, the function queries and logs the
authenticated username and reports the supported data-protection level, but
then immediately deletes the negotiated SSPI security context and frees the
credentials before returning. The negotiated context is not stored on the
connection and is therefore never used to protect later SOCKS5 traffic.
11. Internals
11.1 gssapi library name + version is missing in curl_version_info()
The struct needs to be expanded and code added to store this info.
See https://github.com/curl/curl/issues/13492
11.2 error buffer not set if connection to multiple addresses fails
If you ask libcurl to resolve a hostname like example.com to IPv6 addresses
when you only have IPv4 connectivity. libcurl fails with
CURLE_COULDNT_CONNECT, but the error buffer set by CURLOPT_ERRORBUFFER
remains empty. Issue: https://github.com/curl/curl/issues/544
11.4 HTTP test server 'connection-monitor' problems
The 'connection-monitor' feature of the sws HTTP test server does not work
properly if some tests are run in unexpected order. Like 1509 and then 1525.
See https://github.com/curl/curl/issues/868
11.5 Connection information when using TCP Fast Open
CURLINFO_LOCAL_PORT (and possibly a few other) fails when TCP Fast Open is
enabled.
See https://github.com/curl/curl/issues/1332 and
https://github.com/curl/curl/issues/4296
11.6 test cases sometimes timeout
Occasionally, one of the tests timeouts. Inexplicably.
See https://github.com/curl/curl/issues/13350
11.7 CURLOPT_CONNECT_TO does not work for HTTPS proxy
It is unclear if the same option should even cover the proxy connection or if
if requires a separate option.
See https://github.com/curl/curl/issues/14481
11.8 WinIDN test failures
Test 165 disabled when built with WinIDN.
11.9 setting a disabled option should return CURLE_NOT_BUILT_IN
When curl has been built with specific features or protocols disabled,
setting such options with curl_easy_setopt() should rather return
CURLE_NOT_BUILT_IN instead of CURLE_UNKNOWN_OPTION to signal the difference
to the application
See https://github.com/curl/curl/issues/15472
12. LDAP
12.1 OpenLDAP hangs after returning results
By configuration defaults, OpenLDAP automatically chase referrals on
secondary socket descriptors. The OpenLDAP backend is asynchronous and thus
should monitor all socket descriptors involved. Currently, these secondary
descriptors are not monitored, causing OpenLDAP library to never receive
data from them.
As a temporary workaround, disable referrals chasing by configuration.
The fix is not easy: proper automatic referrals chasing requires a
synchronous bind callback and monitoring an arbitrary number of socket
descriptors for a single easy handle (currently limited to 5).
Generic LDAP is synchronous: OK.
See https://github.com/curl/curl/issues/622 and
https://curl.se/mail/lib-2016-01/0101.html
12.2 LDAP on Windows does authentication wrong?
https://github.com/curl/curl/issues/3116
12.3 LDAP on Windows does not work
A simple curl command line getting "ldap://ldap.forumsys.com" returns an
error that says "no memory" !
https://github.com/curl/curl/issues/4261
12.4 LDAPS requests to ActiveDirectory server hang
https://github.com/curl/curl/issues/9580
13. TCP/IP
13.1 telnet code does not handle partial writes properly
It probably does not happen too easily because of how slow and infrequent
sends are normally performed.
13.2 Trying local ports fails on Windows
This makes '--local-port [range]' to not work since curl cannot properly
detect if a port is already in use, so it tries the first port, uses that and
then subsequently fails anyway if that was actually in use.
https://github.com/curl/curl/issues/8112
15. CMake
15.1 cmake outputs: no version information available
Something in the SONAME generation seems to be wrong in the cmake build.
https://github.com/curl/curl/issues/11158
15.6 uses -lpthread instead of Threads::Threads
See https://github.com/curl/curl/issues/6166
15.7 generated .pc file contains strange entries
The Libs.private field of the generated .pc file contains -lgcc -lgcc_s -lc
-lgcc -lgcc_s
See https://github.com/curl/curl/issues/6167
15.13 CMake build with MIT Kerberos does not work
Minimum CMake version was bumped in curl 7.71.0 (#5358) Since CMake 3.2
try_compile started respecting the CMAKE_EXE_FLAGS. The code dealing with
MIT Kerberos detection sets few variables to potentially weird mix of space,
and ;-separated flags. It had to blow up at some point. All the CMake checks
that involve compilation are doomed from that point, the configured tree
cannot be built.
https://github.com/curl/curl/issues/6904
16. aws-sigv4
16.2 aws-sigv4 does not handle multipart/form-data correctly
https://github.com/curl/curl/issues/13351
17. HTTP/2
17.1 HTTP/2 prior knowledge over proxy
https://github.com/curl/curl/issues/12641
17.2 HTTP/2 frames while in the connection pool kill reuse
If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to
curl while the connection is held in curl's connection pool, the socket is
found readable when considered for reuse and that makes curl think it is dead
and then it is closed and a new connection gets created instead.
This is *best* fixed by adding monitoring to connections while they are kept
in the pool so that pings can be responded to appropriately.
17.3 ENHANCE_YOUR_CALM causes infinite retries
Infinite retries with 2 parallel requests on one connection receiving GOAWAY
with ENHANCE_YOUR_CALM error code.
See https://github.com/curl/curl/issues/5119
17.4 HTTP/2 + TLS spends a lot of time in recv
It has been observed that by making the speed limit less accurate we could
improve this performance. (by reverting
https://github.com/curl/curl/commit/db5c9f4f9e0779b49624752b135281a0717b277b)
Can we find a golden middle ground?
See https://curl.se/mail/lib-2024-05/0026.html and
https://github.com/curl/curl/issues/13416
18. HTTP/3
18.1 connection migration does not work
https://github.com/curl/curl/issues/7695
18.2 quiche: QUIC connection is draining
The transfer ends with error "QUIC connection is draining".
https://github.com/curl/curl/issues/12037
18.3 OpenSSL-QUIC problems on google.com
With some specific Google servers, and seemingly timing dependent, the
OpenSSL-QUIC backend seems to not actually send off the HTTP/3 request which
makes the QUIC connection just sit idle until killed by the server. curl or
OpenSSL bug?
https://github.com/curl/curl/issues/18336
19. RTSP
19.1 Some methods do not support response bodies
The RTSP implementation is written to assume that a number of RTSP methods
always get responses without bodies, even though there seems to be no
indication in the RFC that this is always the case.
https://github.com/curl/curl/issues/12414

548
docs/KNOWN_BUGS.md Normal file
View file

@ -0,0 +1,548 @@
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
# Known bugs intro
These are problems and bugs known to exist at the time of this release. Feel
free to join in and help us correct one or more of these. Also be sure to
check the changelog of the current development status, as one or more of these
problems may have been fixed or changed somewhat since this was written.
# TLS
## IMAPS connection fails with Rustls error
[curl issue 10457](https://github.com/curl/curl/issues/10457)
## Access violation sending client cert with Schannel
When using Schannel to do client certs, curl sets `PKCS12_NO_PERSIST_KEY` to
avoid leaking the private key into the filesystem. Unfortunately that flag
instead seems to trigger a crash.
See [curl issue 17626](https://github.com/curl/curl/issues/17626)
## Client cert handling with Issuer `DN` differs between backends
When the specified client certificate does not match any of the
server-specified `DN` fields, the OpenSSL and GnuTLS backends behave
differently. The GitHub discussion may contain a solution.
See [curl issue 1411](https://github.com/curl/curl/issues/1411)
## Client cert (MTLS) issues with Schannel
See [curl issue 3145](https://github.com/curl/curl/issues/3145)
## Schannel TLS 1.2 handshake bug in old Windows versions
In old versions of Windows such as 7 and 8.1 the Schannel TLS 1.2 handshake
implementation likely has a bug that can rarely cause the key exchange to
fail, resulting in error SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED.
[curl issue 5488](https://github.com/curl/curl/issues/5488)
## `CURLOPT_CERTINFO` results in `CURLE_OUT_OF_MEMORY` with Schannel
[curl issue 8741](https://github.com/curl/curl/issues/8741)
## mbedTLS and CURLE_AGAIN handling
[curl issue 15801](https://github.com/curl/curl/issues/15801)
# Email protocols
## IMAP `SEARCH ALL` truncated response
IMAP `SEARCH ALL` truncates output on large boxes. "A quick search of the code
reveals that `pingpong.c` contains some truncation code, at line 408, when it
deems the server response to be too large truncating it to 40 characters"
https://curl.se/bug/view.cgi?id=1366
## No disconnect command
The disconnect commands (`LOGOUT` and `QUIT`) may not be sent by IMAP, POP3
and SMTP if a failure occurs during the authentication phase of a connection.
## `AUTH PLAIN` for SMTP is not working on all servers
Specifying `--login-options AUTH=PLAIN` on the command line does not seem to
work correctly.
See [curl issue 4080](https://github.com/curl/curl/issues/4080)
## `APOP` authentication fails on POP3
See [curl issue 10073](https://github.com/curl/curl/issues/10073)
## POP3 issue when reading small chunks
CURL_DBG_SOCK_RMAX=4 ./runtests.pl -v 982
See [curl issue 12063](https://github.com/curl/curl/issues/12063)
# Command line
## `-T /dev/stdin` may upload with an incorrect content length
`-T` stats the path to figure out its size in bytes to use it as
`Content-Length` if it is a regular file.
The problem with that is that on BSD and some other UNIX systems (not Linux),
open(path) may not give you a file descriptor with a 0 offset from the start
of the file.
See [curl issue 12177](https://github.com/curl/curl/issues/12177)
## `-T -` always uploads chunked
When the `<` shell operator is used. curl should realize that stdin is a
regular file in this case, and that it can do a non-chunked upload, like it
would do if you used `-T` file.
See [curl issue 12171](https://github.com/curl/curl/issues/12171)
# Build and portability issues
## OS400 port requires deprecated IBM library
curl for OS400 requires `QADRT` to build, which provides ASCII wrappers for
libc/POSIX functions in the ILE, but IBM no longer supports or even offers
this library to download.
See [curl issue 5176](https://github.com/curl/curl/issues/5176)
## `curl-config --libs` contains private details
`curl-config --libs` include details set in `LDFLAGS` when configure is run
that might be needed only for building libcurl. Further, `curl-config
--cflags` suffers from the same effects with `CFLAGS`/`CPPFLAGS`.
## `LDFLAGS` passed too late making libs linked incorrectly
Compiling latest curl on HP-UX and linking against a custom OpenSSL (which is
on the default loader/linker path), fails because the generated Makefile has
`LDFLAGS` passed on after `LIBS`.
See [curl issue 14893](https://github.com/curl/curl/issues/14893)
## Cygwin: make install installs curl-config.1 twice
[curl issue 8839](https://github.com/curl/curl/issues/8839)
## flaky CI builds
We run many CI builds for each commit and PR on GitHub, and especially a
number of the Windows builds are flaky. This means that we rarely get all CI
builds go green and complete without errors. This is unfortunate as it makes
us sometimes miss actual build problems and it is surprising to newcomers to
the project who (rightfully) do not expect this.
See [curl issue 6972](https://github.com/curl/curl/issues/6972)
## long paths are not fully supported on Windows
curl on Windows cannot access long paths (paths longer than 260 characters).
However, as a workaround, the Windows path prefix `\\?\` which disables all
path interpretation may work to allow curl to access the path. For example:
`\\?\c:\longpath`.
See [curl issue 8361](https://github.com/curl/curl/issues/8361)
## Unicode on Windows
Passing in a Unicode filename with -o:
[curl issue 11461](https://github.com/curl/curl/issues/11461)
Passing in Unicode character with -d:
[curl issue 12231](https://github.com/curl/curl/issues/12231)
Windows Unicode builds use the home directory in current locale.
The Windows Unicode builds of curl use the current locale, but expect Unicode
UTF-8 encoded paths for internal use such as open, access and stat. The user's
home directory is retrieved via curl_getenv in the current locale and not as
UTF-8 encoded Unicode.
See [curl pull request 7252](https://github.com/curl/curl/pull/7252) and [curl pull request 7281](https://github.com/curl/curl/pull/7281)
Cannot handle Unicode arguments in non-Unicode builds on Windows
If a URL or filename cannot be encoded using the user's current code page then
it can only be encoded properly in the Unicode character set. Windows uses
UTF-16 encoding for Unicode and stores it in wide characters, however curl and
libcurl are not equipped for that at the moment except when built with
_UNICODE and UNICODE defined. Except for Cygwin, Windows cannot use UTF-8 as a
locale.
https://curl.se/bug/?i=345
https://curl.se/bug/?i=731
https://curl.se/bug/?i=3747
NTLM authentication and Unicode
NTLM authentication involving Unicode username or password only works properly
if built with UNICODE defined together with the Schannel backend. The original
problem was mentioned in: https://curl.se/mail/lib-2009-10/0024.html and
https://curl.se/bug/view.cgi?id=896
The Schannel version verified to work as mentioned in
https://curl.se/mail/lib-2012-07/0073.html
# Authentication
## Digest `auth-int` for PUT/POST
We do not support auth-int for Digest using PUT or POST
## MIT Kerberos for Windows build
libcurl fails to build with MIT Kerberos for Windows (`KfW`) due to its
library header files exporting symbols/macros that should be kept private to
the library.
## NTLM in system context uses wrong name
NTLM authentication using SSPI (on Windows) when (lib)curl is running in
"system context" makes it use wrong(?) username - at least when compared to
what `winhttp` does. See https://curl.se/bug/view.cgi?id=535
## NTLM does not support password with Unicode 'SECTION SIGN' character
Code point: U+00A7
https://en.wikipedia.org/wiki/Section_sign
[curl issue 2120](https://github.com/curl/curl/issues/2120)
## libcurl can fail to try alternatives with `--proxy-any`
When connecting via a proxy using `--proxy-any`, a failure to establish an
authentication causes libcurl to abort trying other options if the failed
method has a higher preference than the alternatives. As an example,
`--proxy-any` against a proxy which advertise Negotiate and NTLM, but which
fails to set up Kerberos authentication does not proceed to try authentication
using NTLM.
[curl issue 876](https://github.com/curl/curl/issues/876)
## Do not clear digest for single realm
[curl issue 3267](https://github.com/curl/curl/issues/3267)
## SHA-256 digest not supported in Windows SSPI builds
Windows builds of curl that have SSPI enabled use the native Windows API calls
to create authentication strings. The call to `InitializeSecurityContext` fails
with `SEC_E_QOP_NOT_SUPPORTED` which causes curl to fail with
`CURLE_AUTH_ERROR`.
Microsoft does not document supported digest algorithms and that `SEC_E` error
code is not a documented error for `InitializeSecurityContext` (digest).
[curl issue 6302](https://github.com/curl/curl/issues/6302)
## curl never completes Negotiate over HTTP
Apparently it is not working correctly...?
See [curl issue 5235](https://github.com/curl/curl/issues/5235)
## Negotiate on Windows fails
When using `--negotiate` (or NTLM) with curl on Windows, SSL/TLS handshake
fails despite having a valid kerberos ticket cached. Works without any issue
in Unix/Linux.
[curl issue 5881](https://github.com/curl/curl/issues/5881)
## Negotiate authentication against Hadoop
[curl issue 8264](https://github.com/curl/curl/issues/8264)
# FTP
## FTP with ACCT
When doing an operation over FTP that requires the `ACCT` command (but not when
logging in), the operation fails since libcurl does not detect this and thus
fails to issue the correct command: https://curl.se/bug/view.cgi?id=635
## FTPS server compatibility on Windows with Schannel
FTPS is not widely used with the Schannel TLS backend and so there may be more
bugs compared to other TLS backends such as OpenSSL. In the past users have
reported hanging and failed connections. It is likely some changes to curl
since then fixed the issues. None of the reported issues can be reproduced any
longer.
If you encounter an issue connecting to your server via FTPS with the latest
curl and Schannel then please search for open issues or file a new issue.
# SFTP and SCP
## SFTP does not do `CURLOPT_POSTQUOTE` correct
When libcurl sends `CURLOPT_POSTQUOTE` commands when connected to an SFTP
server using the multi interface, the commands are not being sent correctly
and instead the connection is canceled (the operation is considered done)
prematurely. There is a half-baked (busy-looping) patch provided in the bug
report but it cannot be accepted as-is. See
https://curl.se/bug/view.cgi?id=748
## Remote recursive folder creation with SFTP
On this servers, the curl fails to create directories on the remote server
even when the `CURLOPT_FTP_CREATE_MISSING_DIRS` option is set.
See [curl issue 5204](https://github.com/curl/curl/issues/5204)
## libssh blocking and infinite loop problem
In the `SSH_SFTP_INIT` state for libssh, the ssh session working mode is set
to blocking mode. If the network is suddenly disconnected during sftp
transmission, curl is stuck, even if curl is configured with a timeout.
[curl issue 8632](https://github.com/curl/curl/issues/8632)
## Cygwin: "WARNING: UNPROTECTED PRIVATE KEY FILE!"
Running SCP and SFTP tests on Cygwin makes this warning message appear.
[curl issue 11244](https://github.com/curl/curl/issues/11244)
# Connection
## `--interface` with link-scoped IPv6 address
When you give the `--interface` option telling curl to use a specific
interface for its outgoing traffic in combination with an IPv6 address in the
URL that uses a link-local scope, curl might pick the wrong address from the
named interface and the subsequent transfer fails.
Example command line:
curl --interface eth0 'http://[fe80:928d:xxff:fexx:xxxx]/'
The fact that the given IP address is link-scoped should probably be used as
input to somehow make curl make a better choice for this.
[curl issue 14782](https://github.com/curl/curl/issues/14782)
## Does not acknowledge getaddrinfo sorting policy
Even if a user edits `/etc/gai.conf` to prefer IPv4, curl still prefers and
tries IPv6 addresses first.
[curl issue 16718](https://github.com/curl/curl/issues/16718)
## SOCKS-SSPI discards the security context
After a successful SSPI/GSS-API exchange, the function queries and logs the
authenticated username and reports the supported data-protection level, but
then immediately deletes the negotiated SSPI security context and frees the
credentials before returning. The negotiated context is not stored on the
connection and is therefore never used to protect later SOCKS5 traffic.
# Internals
## GSSAPI library name + version is missing in `curl_version_info()`
The struct needs to be expanded and code added to store this info.
See [curl issue 13492](https://github.com/curl/curl/issues/13492)
## error buffer not set if connection to multiple addresses fails
If you ask libcurl to resolve a hostname like example.com to IPv6 addresses
when you only have IPv4 connectivity. libcurl fails with
`CURLE_COULDNT_CONNECT`, but the error buffer set by `CURLOPT_ERRORBUFFER`
remains empty. Issue: [curl issue 544](https://github.com/curl/curl/issues/544)
## HTTP test server 'connection-monitor' problems
The `connection-monitor` feature of the HTTP test server does not work
properly if some tests are run in unexpected order. Like 1509 and then 1525.
See [curl issue 868](https://github.com/curl/curl/issues/868)
## Connection information when using TCP Fast Open
`CURLINFO_LOCAL_PORT` (and possibly a few other) fails when TCP Fast Open is
enabled.
See [curl issue 1332](https://github.com/curl/curl/issues/1332) and
[curl issue 4296](https://github.com/curl/curl/issues/4296)
## test cases sometimes timeout
Occasionally, one of the tests timeouts. Inexplicably.
See [curl issue 13350](https://github.com/curl/curl/issues/13350)
## `CURLOPT_CONNECT_TO` does not work for HTTPS proxy
It is unclear if the same option should even cover the proxy connection or if
if requires a separate option.
See [curl issue 14481](https://github.com/curl/curl/issues/14481)
## WinIDN test failures
Test 165 disabled when built with WinIDN.
## setting a disabled option should return `CURLE_NOT_BUILT_IN`
When curl has been built with specific features or protocols disabled, setting
such options with `curl_easy_setopt()` should rather return
`CURLE_NOT_BUILT_IN` instead of `CURLE_UNKNOWN_OPTION` to signal the
difference to the application
See [curl issue 15472](https://github.com/curl/curl/issues/15472)
# LDAP
## OpenLDAP hangs after returning results
By configuration defaults, OpenLDAP automatically chase referrals on secondary
socket descriptors. The OpenLDAP backend is asynchronous and thus should
monitor all socket descriptors involved. Currently, these secondary
descriptors are not monitored, causing OpenLDAP library to never receive data
from them.
As a temporary workaround, disable referrals chasing by configuration.
The fix is not easy: proper automatic referrals chasing requires a synchronous
bind callback and monitoring an arbitrary number of socket descriptors for a
single easy handle (currently limited to 5).
Generic LDAP is synchronous: OK.
See [curl issue 622](https://github.com/curl/curl/issues/622) and
https://curl.se/mail/lib-2016-01/0101.html
## LDAP on Windows does authentication wrong?
[curl issue 3116](https://github.com/curl/curl/issues/3116)
## LDAP on Windows does not work
A simple curl command line getting `ldap://ldap.forumsys.com` returns an error
that says `no memory` !
[curl issue 4261](https://github.com/curl/curl/issues/4261)
## LDAPS requests to Active Directory server hang
[curl issue 9580](https://github.com/curl/curl/issues/9580)
# TCP/IP
## telnet code does not handle partial writes properly
It probably does not happen too easily because of how slow and infrequent
sends are normally performed.
## Trying local ports fails on Windows
This makes `--local-port [range]` to not work since curl cannot properly
detect if a port is already in use, so it tries the first port, uses that and
then subsequently fails anyway if that was actually in use.
[curl issue 8112](https://github.com/curl/curl/issues/8112)
# CMake
## cmake outputs: no version information available
Something in the SONAME generation seems to be wrong in the cmake build.
[curl issue 11158](https://github.com/curl/curl/issues/11158)
## uses `-lpthread` instead of `Threads::Threads`
See [curl issue 6166](https://github.com/curl/curl/issues/6166)
## generated `.pc` file contains strange entries
The `Libs.private` field of the generated `.pc` file contains `-lgcc -lgcc_s
-lc -lgcc -lgcc_s`.
See [curl issue 6167](https://github.com/curl/curl/issues/6167)
## CMake build with MIT Kerberos does not work
Minimum CMake version was bumped in curl 7.71.0 (#5358) Since CMake 3.2
try_compile started respecting the `CMAKE_EXE_FLAGS`. The code dealing with
MIT Kerberos detection sets few variables to potentially weird mix of space,
and ;-separated flags. It had to blow up at some point. All the CMake checks
that involve compilation are doomed from that point, the configured tree
cannot be built.
[curl issue 6904](https://github.com/curl/curl/issues/6904)
# Authentication
## `--aws-sigv4` does not handle multipart/form-data correctly
[curl issue 13351](https://github.com/curl/curl/issues/13351)
# HTTP/2
## HTTP/2 prior knowledge over proxy
[curl issue 12641](https://github.com/curl/curl/issues/12641)
## HTTP/2 frames while in the connection pool kill reuse
If the server sends HTTP/2 frames (like for example an HTTP/2 PING frame) to
curl while the connection is held in curl's connection pool, the socket is
found readable when considered for reuse and that makes curl think it is dead
and then it is closed and a new connection gets created instead.
This is *best* fixed by adding monitoring to connections while they are kept
in the pool so that pings can be responded to appropriately.
## `ENHANCE_YOUR_CALM` causes infinite retries
Infinite retries with 2 parallel requests on one connection receiving `GOAWAY`
with `ENHANCE_YOUR_CALM` error code.
See [curl issue 5119](https://github.com/curl/curl/issues/5119)
## HTTP/2 + TLS spends a lot of time in recv
It has been observed that by making the speed limit less accurate we could
improve this performance. (by reverting
[db5c9f4f9e0779](https://github.com/curl/curl/commit/db5c9f4f9e0779b49624752b135281a0717b277b))
Can we find a golden middle ground?
See https://curl.se/mail/lib-2024-05/0026.html and
[curl issue 13416](https://github.com/curl/curl/issues/13416)
# HTTP/3
## connection migration does not work
[curl issue 7695](https://github.com/curl/curl/issues/7695)
## quiche: QUIC connection is draining
The transfer ends with error "QUIC connection is draining".
[curl issue 12037](https://github.com/curl/curl/issues/12037)
# RTSP
## Some methods do not support response bodies
The RTSP implementation is written to assume that a number of RTSP methods
always get responses without bodies, even though there seems to be no
indication in the RFC that this is always the case.
[curl issue 12414](https://github.com/curl/curl/issues/12414)

Some files were not shown because too many files have changed in this diff Show more