first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
*.h linguist-language=C++
|
||||||
|
|
||||||
|
curl/* linguist-vendored
|
||||||
|
jansson/* linguist-vendored
|
||||||
|
libuv/* linguist-vendored
|
||||||
|
mbedtls/* linguist-vendored
|
||||||
|
nghttp2/* linguist-vendored
|
||||||
|
zlib/* linguist-vendored
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04, windows-2022]
|
||||||
|
sourcemod-version: [master]
|
||||||
|
python-version: ['3.10']
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
target-archs: x86,x86_64
|
||||||
|
platform: linux
|
||||||
|
compiler_cc: clang
|
||||||
|
compiler_cxx: clang++
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
target-archs: x86,x86_64
|
||||||
|
platform: windows
|
||||||
|
compiler_cc: clang
|
||||||
|
compiler_cxx: clang++
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Linux packages
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -yq --no-install-recommends g++-multilib ${{ matrix.compiler_cc }}
|
||||||
|
|
||||||
|
- name: Select compiler
|
||||||
|
if: startsWith(runner.os, 'Linux')
|
||||||
|
run: |
|
||||||
|
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
|
||||||
|
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
|
||||||
|
${{ matrix.compiler_cc }} --version
|
||||||
|
${{ matrix.compiler_cxx }} --version
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: extension
|
||||||
|
|
||||||
|
- name: Checkout SourceMod ${{ matrix.sourcemod-version }}
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
repository: alliedmodders/sourcemod
|
||||||
|
ref: ${{ matrix.sourcemod-version }}
|
||||||
|
path: sourcemod
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install AMBuild
|
||||||
|
run: |
|
||||||
|
python -m pip install wheel
|
||||||
|
pip install git+https://github.com/alliedmodders/ambuild
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: extension
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
BREAKPAD_SYMBOL_SERVER: ${{ secrets.BREAKPAD_SYMBOL_SERVER }}
|
||||||
|
run: |
|
||||||
|
mkdir build && cd build
|
||||||
|
perl ../curl/lib/mk-ca-bundle.pl
|
||||||
|
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }}
|
||||||
|
ambuild
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: ${{ github.event.repository.name }}-${{ matrix.platform }}
|
||||||
|
path: extension/build/package
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
for folder in ./*; do
|
||||||
|
if [ -d "$folder" ]; then
|
||||||
|
echo "Processing folder: $folder"
|
||||||
|
cd $folder
|
||||||
|
tar -czf ../$folder.tar.gz -T <(\ls -1)
|
||||||
|
cd ..
|
||||||
|
sha256sum $folder.tar.gz > $folder.tar.gz.sha256
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: '*.tar.gz*'
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
file_glob: true
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
name: Dependabot auto-merge
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
enableAutoMerge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
||||||
|
steps:
|
||||||
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
|
env:
|
||||||
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
name: Lock threads
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
discussions: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lock:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v5
|
||||||
|
with:
|
||||||
|
issue-lock-inactive-days: 180
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
.vscode
|
||||||
|
build
|
||||||
+307
@@ -0,0 +1,307 @@
|
|||||||
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
|
import os
|
||||||
|
|
||||||
|
def ResolveEnvPath(env, folder):
|
||||||
|
if env in os.environ:
|
||||||
|
path = os.environ[env]
|
||||||
|
if os.path.isdir(path):
|
||||||
|
return path
|
||||||
|
return None
|
||||||
|
|
||||||
|
head = os.getcwd()
|
||||||
|
oldhead = None
|
||||||
|
while head != None and head != oldhead:
|
||||||
|
path = os.path.join(head, folder)
|
||||||
|
if os.path.isdir(path):
|
||||||
|
return path
|
||||||
|
oldhead = head
|
||||||
|
head, tail = os.path.split(head)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def Normalize(path):
|
||||||
|
return os.path.abspath(os.path.normpath(path))
|
||||||
|
|
||||||
|
def SetArchFlags(compiler):
|
||||||
|
if compiler.behavior == 'gcc':
|
||||||
|
if compiler.target.arch == 'x86_64':
|
||||||
|
compiler.cflags += ['-fPIC']
|
||||||
|
elif compiler.like('msvc'):
|
||||||
|
if compiler.target.arch == 'x86_64':
|
||||||
|
compiler.defines += ['WIN64']
|
||||||
|
|
||||||
|
class ExtensionConfig(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.extensions = []
|
||||||
|
self.sm_root = None
|
||||||
|
self.all_targets = []
|
||||||
|
self.target_archs = set()
|
||||||
|
|
||||||
|
if builder.options.targets:
|
||||||
|
target_archs = builder.options.targets.split(',')
|
||||||
|
else:
|
||||||
|
target_archs = ['x86']
|
||||||
|
|
||||||
|
for arch in target_archs:
|
||||||
|
try:
|
||||||
|
cxx = builder.DetectCxx(target_arch = arch)
|
||||||
|
self.target_archs.add(cxx.target.arch)
|
||||||
|
except Exception as e:
|
||||||
|
# Error if archs were manually overridden.
|
||||||
|
if builder.options.targets:
|
||||||
|
raise
|
||||||
|
print('Skipping target {}: {}'.format(arch, e))
|
||||||
|
continue
|
||||||
|
self.all_targets.append(cxx)
|
||||||
|
|
||||||
|
if not self.all_targets:
|
||||||
|
raise Exception('No suitable C/C++ compiler was found.')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def tag(self):
|
||||||
|
if builder.options.debug == '1':
|
||||||
|
return 'Debug'
|
||||||
|
return 'Release'
|
||||||
|
|
||||||
|
def detectSourceMod(self):
|
||||||
|
if builder.options.sm_path:
|
||||||
|
self.sm_root = builder.options.sm_path
|
||||||
|
else:
|
||||||
|
self.sm_root = ResolveEnvPath('SOURCEMOD18', 'sourcemod-1.8')
|
||||||
|
if not self.sm_root:
|
||||||
|
self.sm_root = ResolveEnvPath('SOURCEMOD110', 'sourcemod-1.10')
|
||||||
|
if not self.sm_root:
|
||||||
|
self.sm_root = ResolveEnvPath('SOURCEMOD', 'sourcemod')
|
||||||
|
if not self.sm_root:
|
||||||
|
self.sm_root = ResolveEnvPath('SOURCEMOD_DEV', 'sourcemod-central')
|
||||||
|
|
||||||
|
if not self.sm_root or not os.path.isdir(self.sm_root):
|
||||||
|
raise Exception('Could not find a source copy of SourceMod')
|
||||||
|
|
||||||
|
self.sm_root = Normalize(self.sm_root)
|
||||||
|
|
||||||
|
def configure(self):
|
||||||
|
for cxx in self.all_targets:
|
||||||
|
self.configure_cxx(cxx)
|
||||||
|
|
||||||
|
def configure_cxx(self, cxx):
|
||||||
|
if cxx.family == 'msvc':
|
||||||
|
if cxx.version < 1900:
|
||||||
|
raise Exception('MSVC 2015 or later is required.')
|
||||||
|
elif cxx.family == 'gcc':
|
||||||
|
if cxx.version < 'gcc-4.9':
|
||||||
|
raise Exception('GCC 4.9 or later is required.')
|
||||||
|
elif cxx.family == 'clang':
|
||||||
|
if cxx.version < 'clang-3.4':
|
||||||
|
raise Exception('Clang 3.4 or later is required.')
|
||||||
|
|
||||||
|
if cxx.like('gcc'):
|
||||||
|
self.configure_gcc(cxx)
|
||||||
|
elif cxx.family == 'msvc':
|
||||||
|
self.configure_msvc(cxx)
|
||||||
|
|
||||||
|
# Optimization
|
||||||
|
if builder.options.opt == '1':
|
||||||
|
cxx.defines += ['NDEBUG']
|
||||||
|
|
||||||
|
# Debugging
|
||||||
|
if builder.options.debug == '1':
|
||||||
|
cxx.defines += ['DEBUG', '_DEBUG']
|
||||||
|
|
||||||
|
# Platform-specifics
|
||||||
|
if cxx.target.platform == 'linux':
|
||||||
|
self.configure_linux(cxx)
|
||||||
|
elif cxx.target.platform == 'mac':
|
||||||
|
self.configure_mac(cxx)
|
||||||
|
elif cxx.target.platform == 'windows':
|
||||||
|
self.configure_windows(cxx)
|
||||||
|
|
||||||
|
# Finish up.
|
||||||
|
cxx.includes += [
|
||||||
|
os.path.join(self.sm_root, 'public'),
|
||||||
|
]
|
||||||
|
|
||||||
|
def configure_gcc(self, cxx):
|
||||||
|
cxx.defines += [
|
||||||
|
'stricmp=strcasecmp',
|
||||||
|
'_stricmp=strcasecmp',
|
||||||
|
'_snprintf=snprintf',
|
||||||
|
'_vsnprintf=vsnprintf',
|
||||||
|
'HAVE_STDINT_H',
|
||||||
|
'GNUC',
|
||||||
|
]
|
||||||
|
cxx.cflags += [
|
||||||
|
'-pipe',
|
||||||
|
'-fno-strict-aliasing',
|
||||||
|
'-Wall',
|
||||||
|
'-Werror',
|
||||||
|
'-Wno-unused',
|
||||||
|
'-Wno-switch',
|
||||||
|
'-Wno-array-bounds',
|
||||||
|
'-msse',
|
||||||
|
'-fvisibility=hidden',
|
||||||
|
]
|
||||||
|
|
||||||
|
if cxx.version == 'apple-clang-6.0' or cxx.version == 'clang-3.4':
|
||||||
|
cxx.cxxflags += ['-std=c++1y']
|
||||||
|
else:
|
||||||
|
cxx.cxxflags += ['-std=c++14']
|
||||||
|
|
||||||
|
cxx.cxxflags += [
|
||||||
|
'-fno-exceptions',
|
||||||
|
'-fno-threadsafe-statics',
|
||||||
|
'-Wno-non-virtual-dtor',
|
||||||
|
'-Wno-overloaded-virtual',
|
||||||
|
'-fvisibility-inlines-hidden',
|
||||||
|
]
|
||||||
|
|
||||||
|
have_gcc = cxx.family == 'gcc'
|
||||||
|
have_clang = cxx.family == 'clang'
|
||||||
|
if cxx.version >= 'clang-3.9' or cxx.version == 'clang-3.4' or cxx.version > 'apple-clang-6.0':
|
||||||
|
cxx.cxxflags += ['-Wno-expansion-to-defined']
|
||||||
|
if cxx.version == 'clang-3.9' or cxx.version == 'apple-clang-8.0':
|
||||||
|
cxx.cflags += ['-Wno-varargs']
|
||||||
|
if cxx.version >= 'clang-3.4' or cxx.version >= 'apple-clang-7.0':
|
||||||
|
cxx.cxxflags += ['-Wno-inconsistent-missing-override']
|
||||||
|
if cxx.version >= 'clang-2.9' or cxx.version >= 'apple-clang-3.0':
|
||||||
|
cxx.cxxflags += ['-Wno-null-dereference']
|
||||||
|
if have_clang or (cxx.version >= 'gcc-4.6'):
|
||||||
|
cxx.cflags += ['-Wno-narrowing']
|
||||||
|
if have_clang or (cxx.version >= 'gcc-4.7'):
|
||||||
|
cxx.cxxflags += ['-Wno-delete-non-virtual-dtor']
|
||||||
|
if cxx.version >= 'gcc-4.8':
|
||||||
|
cxx.cflags += ['-Wno-unused-result']
|
||||||
|
if cxx.version >= 'gcc-9.0':
|
||||||
|
cxx.cxxflags += ['-Wno-class-memaccess', '-Wno-packed-not-aligned']
|
||||||
|
|
||||||
|
if have_clang:
|
||||||
|
cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch']
|
||||||
|
if cxx.version >= 'apple-clang-5.1' or cxx.version >= 'clang-3.4':
|
||||||
|
cxx.cxxflags += ['-Wno-deprecated-register']
|
||||||
|
else:
|
||||||
|
cxx.cxxflags += ['-Wno-deprecated']
|
||||||
|
cxx.cflags += ['-Wno-sometimes-uninitialized']
|
||||||
|
|
||||||
|
if have_gcc:
|
||||||
|
cxx.cflags += ['-mfpmath=sse']
|
||||||
|
cxx.cflags += ['-Wno-maybe-uninitialized']
|
||||||
|
|
||||||
|
if builder.options.opt == '1':
|
||||||
|
cxx.cflags += ['-O3']
|
||||||
|
|
||||||
|
# This needs to be after our optimization flags which could otherwise disable it.
|
||||||
|
# Don't omit the frame pointer.
|
||||||
|
cxx.cflags += ['-fno-omit-frame-pointer']
|
||||||
|
|
||||||
|
def configure_msvc(self, cxx):
|
||||||
|
if builder.options.debug == '1':
|
||||||
|
cxx.cflags += ['/MTd']
|
||||||
|
cxx.linkflags += ['/NODEFAULTLIB:libcmt']
|
||||||
|
else:
|
||||||
|
cxx.cflags += ['/MT']
|
||||||
|
cxx.defines += [
|
||||||
|
'_CRT_SECURE_NO_DEPRECATE',
|
||||||
|
'_CRT_SECURE_NO_WARNINGS',
|
||||||
|
'_CRT_NONSTDC_NO_DEPRECATE',
|
||||||
|
'_ITERATOR_DEBUG_LEVEL=0',
|
||||||
|
]
|
||||||
|
cxx.cflags += [
|
||||||
|
'/W3',
|
||||||
|
]
|
||||||
|
cxx.cxxflags += [
|
||||||
|
'/EHsc',
|
||||||
|
'/GR-',
|
||||||
|
'/TP',
|
||||||
|
]
|
||||||
|
cxx.linkflags += [
|
||||||
|
'kernel32.lib',
|
||||||
|
'user32.lib',
|
||||||
|
'gdi32.lib',
|
||||||
|
'winspool.lib',
|
||||||
|
'comdlg32.lib',
|
||||||
|
'advapi32.lib',
|
||||||
|
'shell32.lib',
|
||||||
|
'ole32.lib',
|
||||||
|
'oleaut32.lib',
|
||||||
|
'uuid.lib',
|
||||||
|
'odbc32.lib',
|
||||||
|
'odbccp32.lib',
|
||||||
|
]
|
||||||
|
|
||||||
|
if builder.options.opt == '1':
|
||||||
|
cxx.cflags += ['/Ox', '/Zo']
|
||||||
|
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']
|
||||||
|
|
||||||
|
if builder.options.debug == '1':
|
||||||
|
cxx.cflags += ['/Od', '/RTC1']
|
||||||
|
|
||||||
|
# This needs to be after our optimization flags which could otherwise disable it.
|
||||||
|
# Don't omit the frame pointer.
|
||||||
|
cxx.cflags += ['/Oy-']
|
||||||
|
|
||||||
|
def configure_linux(self, cxx):
|
||||||
|
cxx.defines += ['_LINUX', 'POSIX']
|
||||||
|
cxx.linkflags += ['-Wl,--exclude-libs,ALL', '-lm']
|
||||||
|
if cxx.family == 'gcc':
|
||||||
|
cxx.linkflags += ['-static-libgcc']
|
||||||
|
elif cxx.family == 'clang':
|
||||||
|
cxx.linkflags += ['-lgcc_eh']
|
||||||
|
cxx.linkflags += ['-static-libstdc++']
|
||||||
|
|
||||||
|
def configure_mac(self, cxx):
|
||||||
|
cxx.defines += ['OSX', '_OSX', 'POSIX']
|
||||||
|
cxx.cflags += ['-mmacosx-version-min=10.7']
|
||||||
|
cxx.linkflags += [
|
||||||
|
'-mmacosx-version-min=10.7',
|
||||||
|
'-lc++',
|
||||||
|
'-stdlib=libc++',
|
||||||
|
]
|
||||||
|
cxx.cxxflags += ['-stdlib=libc++']
|
||||||
|
|
||||||
|
def configure_windows(self, cxx):
|
||||||
|
cxx.defines += ['WIN32', '_WINDOWS']
|
||||||
|
|
||||||
|
def ConfigureForExtension(self, context, compiler):
|
||||||
|
compiler.cxxincludes += [
|
||||||
|
os.path.join(context.currentSourcePath),
|
||||||
|
os.path.join(self.sm_root, 'public'),
|
||||||
|
os.path.join(self.sm_root, 'public', 'extensions'),
|
||||||
|
os.path.join(self.sm_root, 'sourcepawn', 'include'),
|
||||||
|
os.path.join(self.sm_root, 'public', 'amtl', 'amtl'),
|
||||||
|
os.path.join(self.sm_root, 'public', 'amtl'),
|
||||||
|
]
|
||||||
|
return compiler
|
||||||
|
|
||||||
|
def Library(self, context, compiler, name):
|
||||||
|
compiler = compiler.clone()
|
||||||
|
SetArchFlags(compiler)
|
||||||
|
self.ConfigureForExtension(context, compiler)
|
||||||
|
return compiler.Library(name)
|
||||||
|
|
||||||
|
def StaticLibrary(self, context, compiler, name):
|
||||||
|
compiler = compiler.clone()
|
||||||
|
SetArchFlags(compiler)
|
||||||
|
return compiler.StaticLibrary(name)
|
||||||
|
|
||||||
|
Extension = ExtensionConfig()
|
||||||
|
Extension.detectSourceMod()
|
||||||
|
Extension.configure()
|
||||||
|
|
||||||
|
# This will clone the list and each cxx object as we recurse, preventing child
|
||||||
|
# scripts from messing up global state.
|
||||||
|
builder.targets = builder.CloneableList(Extension.all_targets)
|
||||||
|
|
||||||
|
# Add additional buildscripts here
|
||||||
|
BuildScripts = [
|
||||||
|
'AMBuilder',
|
||||||
|
]
|
||||||
|
|
||||||
|
if builder.backend == 'amb2':
|
||||||
|
BuildScripts += [
|
||||||
|
'PackageScript',
|
||||||
|
]
|
||||||
|
|
||||||
|
builder.Build(BuildScripts, {'Extension': Extension})
|
||||||
|
|
||||||
|
if builder.options.breakpad_dump:
|
||||||
|
builder.Build('BreakpadSymbols', {'Extension': Extension})
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
|
import os
|
||||||
|
|
||||||
|
libcurl = builder.Build('curl/lib/AMBuilder')
|
||||||
|
libjansson = builder.Build('jansson/src/AMBuilder')
|
||||||
|
libmbedtls = builder.Build('mbedtls/library/AMBuilder')
|
||||||
|
libnghttp2 = builder.Build('nghttp2/lib/AMBuilder')
|
||||||
|
libuv = builder.Build('libuv/src/AMBuilder')
|
||||||
|
libz = builder.Build('zlib/AMBuilder')
|
||||||
|
|
||||||
|
for cxx in builder.targets:
|
||||||
|
binary = Extension.Library(builder, cxx, 'rip.ext')
|
||||||
|
arch = binary.compiler.target.arch
|
||||||
|
|
||||||
|
binary.sources += [
|
||||||
|
'extension.cpp',
|
||||||
|
'httpclient.cpp',
|
||||||
|
'httprequest.cpp',
|
||||||
|
'httprequestcontext.cpp',
|
||||||
|
'httpfilecontext.cpp',
|
||||||
|
'httpformcontext.cpp',
|
||||||
|
'http_natives.cpp',
|
||||||
|
'json_natives.cpp',
|
||||||
|
os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp'),
|
||||||
|
]
|
||||||
|
|
||||||
|
binary.compiler.includes += [
|
||||||
|
os.path.join(builder.sourcePath, 'curl', 'include'),
|
||||||
|
os.path.join(builder.sourcePath, 'jansson', 'include'),
|
||||||
|
os.path.join(builder.sourcePath, 'libuv', 'include'),
|
||||||
|
]
|
||||||
|
|
||||||
|
binary.compiler.defines += [
|
||||||
|
'CURL_STATICLIB',
|
||||||
|
]
|
||||||
|
|
||||||
|
if binary.compiler.family == 'gcc' or binary.compiler.family == 'clang':
|
||||||
|
binary.compiler.cxxflags += ['-fno-rtti']
|
||||||
|
elif binary.compiler.family == 'msvc':
|
||||||
|
binary.compiler.cxxflags += ['/GR-']
|
||||||
|
|
||||||
|
binary.compiler.postlink += [
|
||||||
|
libcurl[arch].binary,
|
||||||
|
libjansson[arch].binary,
|
||||||
|
libmbedtls[arch].binary,
|
||||||
|
libnghttp2[arch].binary,
|
||||||
|
libuv[arch].binary,
|
||||||
|
libz[arch].binary,
|
||||||
|
]
|
||||||
|
|
||||||
|
if binary.compiler.target.platform == 'linux':
|
||||||
|
binary.compiler.postlink += ['-lrt']
|
||||||
|
elif binary.compiler.target.platform == 'windows':
|
||||||
|
binary.compiler.postlink += [
|
||||||
|
'iphlpapi.lib',
|
||||||
|
'psapi.lib',
|
||||||
|
'userenv.lib',
|
||||||
|
'ws2_32.lib',
|
||||||
|
]
|
||||||
|
|
||||||
|
Extension.extensions += [builder.Add(binary)]
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
builder.SetBuildFolder('symbols')
|
||||||
|
|
||||||
|
UPLOAD_SCRIPT = os.path.join(builder.sourcePath, 'tools', 'upload_symbols.py')
|
||||||
|
|
||||||
|
for cxx_task in Extension.extensions:
|
||||||
|
breakpad_dir = os.path.join(builder.sourcePath, 'tools', 'breakpad', cxx_task.target.platform)
|
||||||
|
|
||||||
|
if cxx_task.target.platform == 'windows':
|
||||||
|
debug_entry = cxx_task.debug
|
||||||
|
else:
|
||||||
|
debug_entry = cxx_task.binary
|
||||||
|
|
||||||
|
debug_file = os.path.join(builder.buildPath, debug_entry.path)
|
||||||
|
if cxx_task.target.platform == 'linux':
|
||||||
|
argv = [os.path.join(breakpad_dir, 'dump_syms'), debug_file, os.path.dirname(debug_file)]
|
||||||
|
elif cxx_task.target.platform == 'mac':
|
||||||
|
argv = [os.path.join(breakpad_dir, 'dump_syms'), '-g', debug_file + '.dSYM', debug_file]
|
||||||
|
elif cxx_task.target.platform == 'windows':
|
||||||
|
argv = [os.path.join(breakpad_dir, 'dump_syms.exe'), debug_file]
|
||||||
|
|
||||||
|
plat_dir = os.path.dirname(debug_file)
|
||||||
|
bin_dir = os.path.split(plat_dir)[0]
|
||||||
|
|
||||||
|
symbol_file = '{}-{}-{}.breakpad'.format(
|
||||||
|
os.path.split(bin_dir)[1],
|
||||||
|
cxx_task.target.platform,
|
||||||
|
cxx_task.target.arch
|
||||||
|
)
|
||||||
|
|
||||||
|
argv = [sys.executable, UPLOAD_SCRIPT, symbol_file] + argv
|
||||||
|
builder.AddCommand(
|
||||||
|
inputs = [UPLOAD_SCRIPT, debug_entry],
|
||||||
|
argv = argv,
|
||||||
|
outputs = [symbol_file]
|
||||||
|
)
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
|
||||||
|
import os
|
||||||
|
|
||||||
|
# This is where the files will be output to
|
||||||
|
# package is the default
|
||||||
|
builder.SetBuildFolder('package')
|
||||||
|
|
||||||
|
# Add any folders you need to this list
|
||||||
|
folder_list = [
|
||||||
|
'addons/sourcemod/extensions',
|
||||||
|
'addons/sourcemod/scripting/include',
|
||||||
|
'addons/sourcemod/scripting/include/ripext',
|
||||||
|
#'addons/sourcemod/gamedata',
|
||||||
|
#'addons/sourcemod/configs',
|
||||||
|
'addons/sourcemod/configs/ripext',
|
||||||
|
]
|
||||||
|
|
||||||
|
if 'x86_64' in Extension.target_archs:
|
||||||
|
folder_list.extend([
|
||||||
|
'addons/sourcemod/extensions/x64',
|
||||||
|
])
|
||||||
|
|
||||||
|
# Create the distribution folder hierarchy.
|
||||||
|
folder_map = {}
|
||||||
|
for folder in folder_list:
|
||||||
|
norm_folder = os.path.normpath(folder)
|
||||||
|
folder_map[folder] = builder.AddFolder(norm_folder)
|
||||||
|
|
||||||
|
# Do all straight-up file copies from the source tree.
|
||||||
|
def CopyFiles(src, dest, files):
|
||||||
|
if not dest:
|
||||||
|
dest = src
|
||||||
|
dest_entry = folder_map[dest]
|
||||||
|
for source_file in files:
|
||||||
|
source_path = os.path.join(builder.sourcePath, src, source_file)
|
||||||
|
builder.AddCopy(source_path, dest_entry)
|
||||||
|
|
||||||
|
# Include files
|
||||||
|
CopyFiles('pawn/scripting/include', 'addons/sourcemod/scripting/include',
|
||||||
|
[ 'ripext.inc' ]
|
||||||
|
)
|
||||||
|
CopyFiles('pawn/scripting/include/ripext', 'addons/sourcemod/scripting/include/ripext',
|
||||||
|
[ 'http.inc', 'json.inc' ]
|
||||||
|
)
|
||||||
|
|
||||||
|
# GameData files
|
||||||
|
#CopyFiles('gamedata', 'addons/sourcemod/gamedata',
|
||||||
|
# [ 'myfile.txt',
|
||||||
|
# 'file2.txt'
|
||||||
|
# ]
|
||||||
|
#)
|
||||||
|
|
||||||
|
# Config Files
|
||||||
|
#CopyFiles('configs', 'addons/sourcemod/configs',
|
||||||
|
# [ 'configfile.cfg',
|
||||||
|
# 'otherconfig.cfg,
|
||||||
|
# ]
|
||||||
|
#)
|
||||||
|
CopyFiles(builder.buildPath, 'addons/sourcemod/configs/ripext',
|
||||||
|
[ 'ca-bundle.crt' ]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Copy binaries.
|
||||||
|
for cxx_task in Extension.extensions:
|
||||||
|
if cxx_task.target.arch == 'x86_64':
|
||||||
|
builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions/x64'])
|
||||||
|
else:
|
||||||
|
builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions'])
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
in AmBuilder added -Wno-deprecated-non-prototype due to clang probably being stricter with new versions
|
||||||
|
|
||||||
|
build:
|
||||||
|
rm -r -f build; mkdir build; cd build; perl ../curl/lib/mk-ca-bundle.pl; python ../configure.py --sdks css --enable-optimize; ambuild; cd ..
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# vim: set sts=2 ts=8 sw=2 tw=99 et:
|
||||||
|
import sys
|
||||||
|
from ambuild2 import run
|
||||||
|
|
||||||
|
# Simple extensions do not need to modify this file.
|
||||||
|
|
||||||
|
ambuild_version = getattr(run, 'CURRENT_API', '2.1')
|
||||||
|
if ambuild_version.startswith('2.1'):
|
||||||
|
sys.stderr.write("AMBuild 2.2 or higher is required; please update\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
parser = run.BuildParser(sourcePath=sys.path[0], api='2.2')
|
||||||
|
|
||||||
|
parser.options.add_argument('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
||||||
|
help='Root search folder for HL2SDKs')
|
||||||
|
parser.options.add_argument('--mms-path', type=str, dest='mms_path', default=None,
|
||||||
|
help='Path to Metamod:Source')
|
||||||
|
parser.options.add_argument('--sm-path', type=str, dest='sm_path', default=None,
|
||||||
|
help='Path to SourceMod')
|
||||||
|
parser.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug',
|
||||||
|
help='Enable debugging symbols')
|
||||||
|
parser.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt',
|
||||||
|
help='Enable optimization')
|
||||||
|
parser.options.add_argument('-s', '--sdks', default='all', dest='sdks',
|
||||||
|
help='Build against specified SDKs; valid args are "all", "present", or '
|
||||||
|
'comma-delimited list of engine names')
|
||||||
|
parser.options.add_argument('--breakpad-dump', action='store_true', default=False, dest='breakpad_dump',
|
||||||
|
help='Dump and upload breakpad symbols')
|
||||||
|
parser.options.add_argument('--targets', type=str, dest='targets', default=None,
|
||||||
|
help='Override the target architecture (use commas to separate multiple targets).')
|
||||||
|
|
||||||
|
parser.Configure()
|
||||||
Vendored
+7447
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@CMAKE_CONFIGURABLE_FILE_CONTENT@
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
|
||||||
|
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||||
|
|
||||||
|
if(CURL_HIDDEN_SYMBOLS)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
|
||||||
|
# note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__global")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-xldscope=hidden")
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
|
||||||
|
# note: this should probably just check for version 9.1.045 but I'm not 100% sure
|
||||||
|
# so let's do it the same way autotools do.
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
check_c_source_compiles("#include <stdio.h>
|
||||||
|
int main (void) { printf(\"icc fvisibility bug test\"); return 0; }" _no_bug)
|
||||||
|
if(NOT _no_bug)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
set(_SYMBOL_EXTERN "")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "")
|
||||||
|
endif()
|
||||||
|
elseif(MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS ${SUPPORTS_SYMBOL_HIDING})
|
||||||
|
elseif(MSVC)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.7)
|
||||||
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) #present since 3.4.3 but broken
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Hiding private symbols regardless CURL_HIDDEN_SYMBOLS being disabled.")
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS TRUE)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CURL_CFLAG_SYMBOLS_HIDE ${_CFLAG_SYMBOLS_HIDE})
|
||||||
|
set(CURL_EXTERN_SYMBOL ${_SYMBOL_EXTERN})
|
||||||
@@ -0,0 +1,617 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
|
/* Time with sys/time test */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((struct tm *) 0)
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* headers for FCNTL_O_NONBLOCK test */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
/* */
|
||||||
|
#if defined(sun) || defined(__sun__) || \
|
||||||
|
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||||
|
# if defined(__SVR4) || defined(__srv4__)
|
||||||
|
# define PLATFORM_SOLARIS
|
||||||
|
# else
|
||||||
|
# define PLATFORM_SUNOS4
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||||
|
# define PLATFORM_AIX_V3
|
||||||
|
#endif
|
||||||
|
/* */
|
||||||
|
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
|
||||||
|
#error "O_NONBLOCK does not work on this platform"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
/* O_NONBLOCK source test */
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* tests for gethostbyaddr_r or gethostbyname_r */
|
||||||
|
#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
# define _REENTRANT
|
||||||
|
/* no idea whether _REENTRANT is always set, just invent a new flag */
|
||||||
|
# define TEST_GETHOSTBYFOO_REENTRANT
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(TEST_GETHOSTBYFOO_REENTRANT)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char *address = "example.com";
|
||||||
|
int length = 0;
|
||||||
|
int type = 0;
|
||||||
|
struct hostent h;
|
||||||
|
int rc = 0;
|
||||||
|
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||||
|
\
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
struct hostent_data hdata;
|
||||||
|
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||||
|
\
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
char buffer[8192];
|
||||||
|
int h_errnop;
|
||||||
|
struct hostent *hp;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef gethostbyaddr_r
|
||||||
|
(void)gethostbyaddr_r;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
|
||||||
|
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||||
|
(void)rc;
|
||||||
|
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
|
||||||
|
hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
|
||||||
|
(void)hp;
|
||||||
|
#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||||
|
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
|
||||||
|
rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
|
||||||
|
(void)rc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, &hdata);
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
|
||||||
|
(void)hp; /* not used for test */
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
(void)length;
|
||||||
|
(void)type;
|
||||||
|
(void)rc;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SOCKLEN_T
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((socklen_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (socklen_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IN_ADDR_T
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((in_addr_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (in_addr_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_BOOL_T
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (sizeof (bool *) )
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STDC_HEADERS
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <float.h>
|
||||||
|
int main() { return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef RETSIGTYPE_TEST
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#ifdef signal
|
||||||
|
# undef signal
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" void (*signal (int, void (*)(int)))(int);
|
||||||
|
#else
|
||||||
|
void (*signal ()) ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_INET_NTOA_R_DECL
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
typedef void (*func_type)();
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
#ifndef inet_ntoa_r
|
||||||
|
func_type func;
|
||||||
|
func = (func_type)inet_ntoa_r;
|
||||||
|
(void)func;
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
|
||||||
|
#define _REENTRANT
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
typedef void (*func_type)();
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
#ifndef inet_ntoa_r
|
||||||
|
func_type func;
|
||||||
|
func = (func_type)&inet_ntoa_r;
|
||||||
|
(void)func;
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GETADDRINFO
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
struct addrinfo hints, *ai;
|
||||||
|
int error;
|
||||||
|
|
||||||
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
hints.ai_family = AF_UNSPEC;
|
||||||
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
#ifndef getaddrinfo
|
||||||
|
(void)getaddrinfo;
|
||||||
|
#endif
|
||||||
|
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||||
|
if (error) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FILE_OFFSET_BITS
|
||||||
|
#ifdef _FILE_OFFSET_BITS
|
||||||
|
#undef _FILE_OFFSET_BITS
|
||||||
|
#endif
|
||||||
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
#include <sys/types.h>
|
||||||
|
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||||
|
We can't 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))
|
||||||
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
|
? 1 : -1];
|
||||||
|
int main () { ; return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_WINSOCK_H
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* ioctlsocket source code */
|
||||||
|
int socket;
|
||||||
|
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_WINSOCK_H
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
if(0 != IoctlSocket(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_WINSOCK_H
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
long flags = 0;
|
||||||
|
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_WINSOCK_H
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_FIONBIO
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctl(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
#include <net/if.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct ifreq ifr;
|
||||||
|
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# else
|
||||||
|
# ifdef HAVE_WINSOCK_H
|
||||||
|
# include <winsock.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GLIBC_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
void check(char c) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return a char* */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer))[0]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_POSIX_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/* float, because a pointer can't be implicitly cast to float */
|
||||||
|
void check(float f) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return an int */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer)));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_6
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_5
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
#include <time.h>
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
struct timespec ts = {0, 0};
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
if(__builtin_available(macOS 10.12, *)) {}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_C99
|
||||||
|
#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
|
||||||
|
#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = c99_vmacro3(1, 2, 3);
|
||||||
|
int res2 = c99_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_GCC
|
||||||
|
#define gcc_vmacro3(first, args...) fun3(first, args)
|
||||||
|
#define gcc_vmacro2(first, args...) fun2(first, args)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = gcc_vmacro3(1, 2, 3);
|
||||||
|
int res2 = gcc_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(BEARSSL_INCLUDE_DIRS bearssl.h)
|
||||||
|
|
||||||
|
find_library(BEARSSL_LIBRARY bearssl)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(BEARSSL DEFAULT_MSG
|
||||||
|
BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
|
||||||
|
|
||||||
|
find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
|
||||||
|
find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(BROTLI
|
||||||
|
FOUND_VAR
|
||||||
|
BROTLI_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
BROTLIDEC_LIBRARY
|
||||||
|
BROTLICOMMON_LIBRARY
|
||||||
|
BROTLI_INCLUDE_DIR
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find BROTLI"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
|
||||||
|
set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Find c-ares
|
||||||
|
# Find the c-ares includes and library
|
||||||
|
# This module defines
|
||||||
|
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||||
|
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||||
|
# CARES_FOUND, If false, do not try to use c-ares.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# CARES_LIBRARY, where to find the c-ares library.
|
||||||
|
|
||||||
|
find_path(CARES_INCLUDE_DIR ares.h)
|
||||||
|
|
||||||
|
set(CARES_NAMES ${CARES_NAMES} cares)
|
||||||
|
find_library(CARES_LIBRARY
|
||||||
|
NAMES ${CARES_NAMES}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(CARES
|
||||||
|
REQUIRED_VARS CARES_LIBRARY CARES_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
CARES_LIBRARY
|
||||||
|
CARES_INCLUDE_DIR
|
||||||
|
)
|
||||||
@@ -0,0 +1,310 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the GSS Kerberos library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# GSS_ROOT_DIR - Set this variable to the root installation of GSS
|
||||||
|
#
|
||||||
|
# Read-Only variables:
|
||||||
|
# GSS_FOUND - system has the Heimdal library
|
||||||
|
# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found.
|
||||||
|
# GSS_INCLUDE_DIR - the Heimdal include directory
|
||||||
|
# GSS_LIBRARIES - The libraries needed to use GSS
|
||||||
|
# GSS_LINK_DIRECTORIES - Directories to add to linker search path
|
||||||
|
# GSS_LINKER_FLAGS - Additional linker flags
|
||||||
|
# GSS_COMPILER_FLAGS - Additional 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'll be set to "unknown"
|
||||||
|
|
||||||
|
set(_MIT_MODNAME mit-krb5-gssapi)
|
||||||
|
set(_HEIMDAL_MODNAME heimdal-gssapi)
|
||||||
|
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckTypeSize)
|
||||||
|
|
||||||
|
set(_GSS_ROOT_HINTS
|
||||||
|
"${GSS_ROOT_DIR}"
|
||||||
|
"$ENV{GSS_ROOT_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find library using system pkg-config if user didn't specify root dir
|
||||||
|
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME})
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}")
|
||||||
|
elseif(WIN32)
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach.
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
NO_CMAKE_PATH
|
||||||
|
NO_CMAKE_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# if not found in user-supplied directories, maybe system knows better
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_CONFIGURE_SCRIPT)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_CFLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "CFLAGS: ${_GSS_CFLAGS}")
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# should also work in an odd case when multiple directories are given
|
||||||
|
string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS)
|
||||||
|
string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_CFLAGS})
|
||||||
|
if(_flag MATCHES "^-I.*")
|
||||||
|
string(REGEX REPLACE "^-I" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_INCLUDE_DIR "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_COMPILER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_LIB_FLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# this script gives us libraries and link directories. Blah. We have to deal with it.
|
||||||
|
string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS)
|
||||||
|
string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_LIB_FLAGS})
|
||||||
|
if(_flag MATCHES "^-l.*")
|
||||||
|
string(REGEX REPLACE "^-l" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LIBRARIES "${_val}")
|
||||||
|
elseif(_flag MATCHES "^-L.*")
|
||||||
|
string(REGEX REPLACE "^-L" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LINK_DIRECTORIES "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LINKER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version"
|
||||||
|
OUTPUT_VARIABLE _GSS_VERSION
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--version" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(_GSS_VERSION 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor"
|
||||||
|
OUTPUT_VARIABLE _GSS_VENDOR
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--vendor" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter
|
||||||
|
else()
|
||||||
|
if(_GSS_VENDOR MATCHES ".*H|heimdal.*")
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
else() # either there is no config script or we are on a platform that doesn't provide one (Windows?)
|
||||||
|
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi/gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR) #jay, we've found something
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}")
|
||||||
|
check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
|
||||||
|
|
||||||
|
if(_GSS_HAVE_MIT_HEADERS)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
else()
|
||||||
|
# prevent compiling the header - just check if we can include it
|
||||||
|
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D__ROKEN_H__")
|
||||||
|
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
|
||||||
|
|
||||||
|
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_REQUIRED_DEFINITIONS "")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# I'm not convinced if this is the right way but this is what autotools do at the moment
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# if we have headers, check if we can link libraries
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
set(_GSS_LIBDIR_SUFFIXES "")
|
||||||
|
set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS})
|
||||||
|
get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH)
|
||||||
|
list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi64")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi32")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi_krb5")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "gssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(_GSS_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
${_GSS_LIBNAME}
|
||||||
|
HINTS
|
||||||
|
${_GSS_LIBDIR_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
${_GSS_LIBDIR_SUFFIXES}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(_GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR})
|
||||||
|
set(GSS_LIBRARIES ${_GSS_LIBRARIES})
|
||||||
|
set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES})
|
||||||
|
set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS})
|
||||||
|
set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS})
|
||||||
|
set(GSS_VERSION ${_GSS_VERSION})
|
||||||
|
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal")
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest")
|
||||||
|
else()
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}")
|
||||||
|
file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str
|
||||||
|
REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$")
|
||||||
|
|
||||||
|
string(REGEX MATCH "[0-9]\\.[^\"]+"
|
||||||
|
GSS_VERSION "${heimdal_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT GSS_VERSION)
|
||||||
|
set(GSS_VERSION "Heimdal Unknown")
|
||||||
|
endif()
|
||||||
|
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
|
||||||
|
if(WIN32 AND _MIT_VERSION)
|
||||||
|
set(GSS_VERSION "${_MIT_VERSION}")
|
||||||
|
else()
|
||||||
|
set(GSS_VERSION "MIT Unknown")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(GSS
|
||||||
|
REQUIRED_VARS
|
||||||
|
${_GSS_REQUIRED_VARS}
|
||||||
|
VERSION_VAR
|
||||||
|
GSS_VERSION
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the libssh2 library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBSSH2_FOUND - system has the libssh2 library
|
||||||
|
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
|
||||||
|
# LIBSSH2_LIBRARY - the libssh2 library name
|
||||||
|
|
||||||
|
find_path(LIBSSH2_INCLUDE_DIR libssh2.h)
|
||||||
|
|
||||||
|
find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2)
|
||||||
|
|
||||||
|
if(LIBSSH2_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION[\t ]+\"(.*)\"")
|
||||||
|
string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${libssh2_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibSSH2
|
||||||
|
REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBSSH2_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
|
||||||
|
|
||||||
|
find_library(MBEDTLS_LIBRARY mbedtls)
|
||||||
|
find_library(MBEDX509_LIBRARY mbedx509)
|
||||||
|
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
||||||
|
|
||||||
|
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
|
||||||
|
MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(NGHTTP2_INCLUDE_DIR "nghttp2/nghttp2.h")
|
||||||
|
|
||||||
|
find_library(NGHTTP2_LIBRARY NAMES nghttp2)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(NGHTTP2
|
||||||
|
FOUND_VAR
|
||||||
|
NGHTTP2_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP2_LIBRARY
|
||||||
|
NGHTTP2_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
set(NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR})
|
||||||
|
set(NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY})
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP2_INCLUDE_DIRS NGHTTP2_LIBRARIES)
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGHTTP3
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the nghttp3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGHTTP3_FOUND``
|
||||||
|
System has nghttp3
|
||||||
|
``NGHTTP3_INCLUDE_DIRS``
|
||||||
|
The nghttp3 include directories.
|
||||||
|
``NGHTTP3_LIBRARIES``
|
||||||
|
The libraries needed to use nghttp3
|
||||||
|
``NGHTTP3_VERSION``
|
||||||
|
version of nghttp3.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGHTTP3 libnghttp3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGHTTP3_INCLUDE_DIR nghttp3/nghttp3.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_INCLUDEDIR}
|
||||||
|
${PC_NGHTTP3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGHTTP3_LIBRARY NAMES nghttp3
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_LIBDIR}
|
||||||
|
${PC_NGHTTP3_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGHTTP3_VERSION)
|
||||||
|
set(NGHTTP3_VERSION ${PC_NGHTTP3_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGHTTP3
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP3_LIBRARY
|
||||||
|
NGHTTP3_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGHTTP3_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGHTTP3_FOUND)
|
||||||
|
set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY})
|
||||||
|
set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP3_INCLUDE_DIRS NGHTTP3_LIBRARIES)
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGTCP2
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the ngtcp2 library
|
||||||
|
|
||||||
|
This module accepts optional COMPONENTS to control the crypto library (these are
|
||||||
|
mutually exclusive)::
|
||||||
|
|
||||||
|
OpenSSL: Use libngtcp2_crypto_openssl
|
||||||
|
GnuTLS: Use libngtcp2_crypto_gnutls
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGTCP2_FOUND``
|
||||||
|
System has ngtcp2
|
||||||
|
``NGTCP2_INCLUDE_DIRS``
|
||||||
|
The ngtcp2 include directories.
|
||||||
|
``NGTCP2_LIBRARIES``
|
||||||
|
The libraries needed to use ngtcp2
|
||||||
|
``NGTCP2_VERSION``
|
||||||
|
version of ngtcp2.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGTCP2 libngtcp2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGTCP2_INCLUDE_DIR ngtcp2/ngtcp2.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_INCLUDEDIR}
|
||||||
|
${PC_NGTCP2_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGTCP2_LIBRARY NAMES ngtcp2
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_LIBDIR}
|
||||||
|
${PC_NGTCP2_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGTCP2_VERSION)
|
||||||
|
set(NGTCP2_VERSION ${PC_NGTCP2_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NGTCP2_FIND_COMPONENTS)
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND "")
|
||||||
|
foreach(component IN LISTS NGTCP2_FIND_COMPONENTS)
|
||||||
|
if(component MATCHES "^(OpenSSL|GnuTLS)")
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
message(FATAL_ERROR "NGTCP2: Only one crypto library can be selected")
|
||||||
|
endif()
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND ${component})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
string(TOLOWER "ngtcp2_crypto_${NGTCP2_CRYPTO_BACKEND}" _crypto_library)
|
||||||
|
if(UNIX)
|
||||||
|
pkg_search_module(PC_${_crypto_library} lib${_crypto_library})
|
||||||
|
endif()
|
||||||
|
find_library(${_crypto_library}_LIBRARY
|
||||||
|
NAMES
|
||||||
|
${_crypto_library}
|
||||||
|
HINTS
|
||||||
|
${PC_${_crypto_library}_LIBDIR}
|
||||||
|
${PC_${_crypto_library}_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
if(${_crypto_library}_LIBRARY)
|
||||||
|
set(NGTCP2_${NGTCP2_CRYPTO_BACKEND}_FOUND TRUE)
|
||||||
|
set(NGTCP2_CRYPTO_LIBRARY ${${_crypto_library}_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGTCP2
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGTCP2_LIBRARY
|
||||||
|
NGTCP2_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGTCP2_VERSION
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGTCP2_FOUND)
|
||||||
|
set(NGTCP2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY})
|
||||||
|
set(NGTCP2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGTCP2_INCLUDE_DIRS NGTCP2_LIBRARIES)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NSS nss)
|
||||||
|
endif()
|
||||||
|
if(NOT PC_NSS_FOUND)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(NSS_LIBRARIES ${PC_NSS_LINK_LIBRARIES})
|
||||||
|
set(NSS_INCLUDE_DIRS ${PC_NSS_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NSS
|
||||||
|
REQUIRED_VARS NSS_LIBRARIES NSS_INCLUDE_DIRS
|
||||||
|
VERSION_VAR PC_NSS_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(NSS_INCLUDE_DIRS NSS_LIBRARIES)
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindQUICHE
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the quiche library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``QUICHE_FOUND``
|
||||||
|
System has quiche
|
||||||
|
``QUICHE_INCLUDE_DIRS``
|
||||||
|
The quiche include directories.
|
||||||
|
``QUICHE_LIBRARIES``
|
||||||
|
The libraries needed to use quiche
|
||||||
|
#]=======================================================================]
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_QUICHE quiche)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(QUICHE_INCLUDE_DIR quiche.h
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_INCLUDEDIR}
|
||||||
|
${PC_QUICHE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(QUICHE_LIBRARY NAMES quiche
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_LIBDIR}
|
||||||
|
${PC_QUICHE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(QUICHE
|
||||||
|
REQUIRED_VARS
|
||||||
|
QUICHE_LIBRARY
|
||||||
|
QUICHE_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(QUICHE_FOUND)
|
||||||
|
set(QUICHE_LIBRARIES ${QUICHE_LIBRARY})
|
||||||
|
set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(QUICHE_INCLUDE_DIRS QUICHE_LIBRARIES)
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(WolfSSL_INCLUDE_DIR NAMES wolfssl/ssl.h)
|
||||||
|
find_library(WolfSSL_LIBRARY NAMES wolfssl)
|
||||||
|
mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(WolfSSL
|
||||||
|
REQUIRED_VARS WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WolfSSL_FOUND)
|
||||||
|
set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR})
|
||||||
|
set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY})
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindZstd
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the zstd library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``Zstd_FOUND``
|
||||||
|
System has zstd
|
||||||
|
``Zstd_INCLUDE_DIRS``
|
||||||
|
The zstd include directories.
|
||||||
|
``Zstd_LIBRARIES``
|
||||||
|
The libraries needed to use zstd
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_Zstd libzstd)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Zstd_INCLUDE_DIR zstd.h
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_INCLUDEDIR}
|
||||||
|
${PC_Zstd_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(Zstd_LIBRARY NAMES zstd
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_LIBDIR}
|
||||||
|
${PC_Zstd_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Zstd
|
||||||
|
REQUIRED_VARS
|
||||||
|
Zstd_LIBRARY
|
||||||
|
Zstd_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(Zstd_FOUND)
|
||||||
|
set(Zstd_LIBRARIES ${Zstd_LIBRARY})
|
||||||
|
set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(Zstd_INCLUDE_DIRS Zstd_LIBRARIES)
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#File defines convenience macros for available feature testing
|
||||||
|
|
||||||
|
# This macro checks if the symbol exists in the library and if it
|
||||||
|
# does, it prepends library to the list. It is intended to be called
|
||||||
|
# multiple times with a sequence of possibly dependent libraries in
|
||||||
|
# order of least-to-most-dependent. Some libraries depend on others
|
||||||
|
# to link correctly.
|
||||||
|
macro(check_library_exists_concat LIBRARY SYMBOL VARIABLE)
|
||||||
|
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||||
|
${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Check if header file exists and add it to the list.
|
||||||
|
# This macro is intended to be called multiple times with a sequence of
|
||||||
|
# possibly dependent header files. Some headers depend on others to be
|
||||||
|
# compiled correctly.
|
||||||
|
macro(check_include_file_concat FILE VARIABLE)
|
||||||
|
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||||
|
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# For other curl specific tests, use this macro.
|
||||||
|
macro(curl_internal_test CURL_TEST)
|
||||||
|
if(NOT DEFINED "${CURL_TEST}")
|
||||||
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
|
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
set(CURL_TEST_ADD_LIBRARIES
|
||||||
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||||
|
try_compile(${CURL_TEST}
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||||
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
"${CURL_TEST_ADD_LIBRARIES}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
if(${CURL_TEST})
|
||||||
|
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
else()
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
|
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(curl_nroff_check)
|
||||||
|
find_program(NROFF NAMES gnroff nroff)
|
||||||
|
if(NROFF)
|
||||||
|
# Need a way to write to stdin, this will do
|
||||||
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test")
|
||||||
|
# Tests for a valid nroff option to generate a manpage
|
||||||
|
foreach(_MANOPT "-man" "-mandoc")
|
||||||
|
execute_process(COMMAND "${NROFF}" ${_MANOPT}
|
||||||
|
OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT
|
||||||
|
INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt"
|
||||||
|
ERROR_QUIET)
|
||||||
|
# Save the option if it was valid
|
||||||
|
if(NROFF_MANOPT_OUTPUT)
|
||||||
|
message("Found *nroff option: -- ${_MANOPT}")
|
||||||
|
set(NROFF_MANOPT ${_MANOPT})
|
||||||
|
set(NROFF_USEFUL ON)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
# No need for the temporary file
|
||||||
|
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt")
|
||||||
|
if(NOT NROFF_USEFUL)
|
||||||
|
message(WARNING "Found no *nroff option to get plaintext from man pages")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(WARNING "Found no *nroff program")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(optional_dependency DEPENDENCY)
|
||||||
|
set(CURL_${DEPENDENCY} AUTO CACHE STRING "Build curl with ${DEPENDENCY} support (AUTO, ON or OFF)")
|
||||||
|
set_property(CACHE CURL_${DEPENDENCY} PROPERTY STRINGS AUTO ON OFF)
|
||||||
|
|
||||||
|
if(CURL_${DEPENDENCY} STREQUAL AUTO)
|
||||||
|
find_package(${DEPENDENCY})
|
||||||
|
elseif(CURL_${DEPENDENCY})
|
||||||
|
find_package(${DEPENDENCY} REQUIRED)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
@@ -0,0 +1,291 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
# The begin of the sources (macros and includes)
|
||||||
|
set(_source_epilogue "#undef inline")
|
||||||
|
|
||||||
|
macro(add_header_include check header)
|
||||||
|
if(${check})
|
||||||
|
set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
set(signature_call_conv)
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||||
|
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||||
|
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||||
|
set(_source_epilogue
|
||||||
|
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
|
||||||
|
set(signature_call_conv "PASCAL")
|
||||||
|
if(HAVE_LIBWS2_32)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||||
|
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
|
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
recv(0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}" curl_cv_recv)
|
||||||
|
if(curl_cv_recv)
|
||||||
|
if(NOT DEFINED curl_cv_func_recv_args OR curl_cv_func_recv_args STREQUAL "unknown")
|
||||||
|
foreach(recv_retv "int" "ssize_t" )
|
||||||
|
foreach(recv_arg1 "SOCKET" "int" )
|
||||||
|
foreach(recv_arg2 "char *" "void *" )
|
||||||
|
foreach(recv_arg3 "int" "size_t" "socklen_t" "unsigned int")
|
||||||
|
foreach(recv_arg4 "int" "unsigned int")
|
||||||
|
if(NOT curl_cv_func_recv_done)
|
||||||
|
unset(curl_cv_func_recv_test CACHE)
|
||||||
|
check_c_source_compiles("
|
||||||
|
${_source_epilogue}
|
||||||
|
#ifdef WINSOCK_API_LINKAGE
|
||||||
|
WINSOCK_API_LINKAGE
|
||||||
|
#endif
|
||||||
|
extern ${recv_retv} ${signature_call_conv}
|
||||||
|
recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4});
|
||||||
|
int main(void) {
|
||||||
|
${recv_arg1} s=0;
|
||||||
|
${recv_arg2} buf=0;
|
||||||
|
${recv_arg3} len=0;
|
||||||
|
${recv_arg4} flags=0;
|
||||||
|
${recv_retv} res = recv(s, buf, len, flags);
|
||||||
|
(void) res;
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
curl_cv_func_recv_test)
|
||||||
|
message(STATUS
|
||||||
|
"Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||||
|
if(curl_cv_func_recv_test)
|
||||||
|
set(curl_cv_func_recv_args
|
||||||
|
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
||||||
|
set(RECV_TYPE_ARG1 "${recv_arg1}")
|
||||||
|
set(RECV_TYPE_ARG2 "${recv_arg2}")
|
||||||
|
set(RECV_TYPE_ARG3 "${recv_arg3}")
|
||||||
|
set(RECV_TYPE_ARG4 "${recv_arg4}")
|
||||||
|
set(RECV_TYPE_RETV "${recv_retv}")
|
||||||
|
set(HAVE_RECV 1)
|
||||||
|
set(curl_cv_func_recv_done 1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(curl_cv_func_recv_args STREQUAL "unknown")
|
||||||
|
message(FATAL_ERROR "Cannot find proper types to use for recv args")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unable to link function recv")
|
||||||
|
endif()
|
||||||
|
set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
||||||
|
set(HAVE_RECV 1)
|
||||||
|
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
send(0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}" curl_cv_send)
|
||||||
|
if(curl_cv_send)
|
||||||
|
if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
|
foreach(send_retv "int" "ssize_t" )
|
||||||
|
foreach(send_arg1 "SOCKET" "int" "ssize_t" )
|
||||||
|
foreach(send_arg2 "const char *" "const void *" "void *" "char *")
|
||||||
|
foreach(send_arg3 "int" "size_t" "socklen_t" "unsigned int")
|
||||||
|
foreach(send_arg4 "int" "unsigned int")
|
||||||
|
if(NOT curl_cv_func_send_done)
|
||||||
|
unset(curl_cv_func_send_test CACHE)
|
||||||
|
check_c_source_compiles("
|
||||||
|
${_source_epilogue}
|
||||||
|
#ifdef WINSOCK_API_LINKAGE
|
||||||
|
WINSOCK_API_LINKAGE
|
||||||
|
#endif
|
||||||
|
extern ${send_retv} ${signature_call_conv}
|
||||||
|
send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4});
|
||||||
|
int main(void) {
|
||||||
|
${send_arg1} s=0;
|
||||||
|
${send_arg2} buf=0;
|
||||||
|
${send_arg3} len=0;
|
||||||
|
${send_arg4} flags=0;
|
||||||
|
${send_retv} res = send(s, buf, len, flags);
|
||||||
|
(void) res;
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
curl_cv_func_send_test)
|
||||||
|
message(STATUS
|
||||||
|
"Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||||
|
if(curl_cv_func_send_test)
|
||||||
|
string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
|
||||||
|
string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
|
||||||
|
set(curl_cv_func_send_args
|
||||||
|
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
|
||||||
|
set(SEND_TYPE_ARG1 "${send_arg1}")
|
||||||
|
set(SEND_TYPE_ARG2 "${send_arg2}")
|
||||||
|
set(SEND_TYPE_ARG3 "${send_arg3}")
|
||||||
|
set(SEND_TYPE_ARG4 "${send_arg4}")
|
||||||
|
set(SEND_TYPE_RETV "${send_retv}")
|
||||||
|
set(HAVE_SEND 1)
|
||||||
|
set(curl_cv_func_send_done 1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
|
||||||
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
|
message(FATAL_ERROR "Cannot find proper types to use for send args")
|
||||||
|
endif()
|
||||||
|
set(SEND_QUAL_ARG2 "const")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unable to link function send")
|
||||||
|
endif()
|
||||||
|
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
||||||
|
set(HAVE_SEND 1)
|
||||||
|
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
int flag = MSG_NOSIGNAL;
|
||||||
|
(void)flag;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_MSG_NOSIGNAL)
|
||||||
|
|
||||||
|
if(NOT HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||||
|
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||||
|
add_header_include(HAVE_TIME_H "time.h")
|
||||||
|
endif()
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
struct timeval ts;
|
||||||
|
ts.tv_sec = 0;
|
||||||
|
ts.tv_usec = 0;
|
||||||
|
(void)ts;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_STRUCT_TIMEVAL)
|
||||||
|
|
||||||
|
set(HAVE_SIG_ATOMIC_T 1)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS)
|
||||||
|
if(HAVE_SIGNAL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H")
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
||||||
|
endif()
|
||||||
|
check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
|
||||||
|
if(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||||
|
check_c_source_compiles("
|
||||||
|
#ifdef HAVE_SIGNAL_H
|
||||||
|
# include <signal.h>
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
static volatile sig_atomic_t dummy = 0;
|
||||||
|
(void)dummy;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||||
|
if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||||
|
set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
|
||||||
|
else()
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
if(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||||
|
|
||||||
|
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||||
|
# if not cross-compilation...
|
||||||
|
include(CheckCSourceRuns)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "")
|
||||||
|
if(HAVE_SYS_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||||
|
elseif(HAVE_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_POLL_H")
|
||||||
|
endif()
|
||||||
|
check_c_source_runs("
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_POLL_H
|
||||||
|
# include <sys/poll.h>
|
||||||
|
#elif HAVE_POLL_H
|
||||||
|
# include <poll.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
if(0 != poll(0, 0, 10)) {
|
||||||
|
return 1; /* fail */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* detect the 10.12 poll() breakage */
|
||||||
|
struct timeval before, after;
|
||||||
|
int rc;
|
||||||
|
size_t us;
|
||||||
|
|
||||||
|
gettimeofday(&before, NULL);
|
||||||
|
rc = poll(NULL, 0, 500);
|
||||||
|
gettimeofday(&after, NULL);
|
||||||
|
|
||||||
|
us = (after.tv_sec - before.tv_sec) * 1000000 +
|
||||||
|
(after.tv_usec - before.tv_usec);
|
||||||
|
|
||||||
|
if(us < 400000) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}" HAVE_POLL_FINE)
|
||||||
|
endif()
|
||||||
|
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT UNIX)
|
||||||
|
if(WIN32)
|
||||||
|
set(HAVE_LIBDL 0)
|
||||||
|
set(HAVE_LIBUCB 0)
|
||||||
|
set(HAVE_LIBSOCKET 0)
|
||||||
|
set(NOT_NEED_LIBNSL 0)
|
||||||
|
set(HAVE_LIBNSL 0)
|
||||||
|
set(HAVE_GETHOSTNAME 1)
|
||||||
|
set(HAVE_LIBZ 0)
|
||||||
|
|
||||||
|
set(HAVE_DLOPEN 0)
|
||||||
|
|
||||||
|
set(HAVE_ALLOCA_H 0)
|
||||||
|
set(HAVE_ARPA_INET_H 0)
|
||||||
|
set(HAVE_DLFCN_H 0)
|
||||||
|
set(HAVE_FCNTL_H 1)
|
||||||
|
set(HAVE_INTTYPES_H 0)
|
||||||
|
set(HAVE_IO_H 1)
|
||||||
|
set(HAVE_MALLOC_H 1)
|
||||||
|
set(HAVE_MEMORY_H 1)
|
||||||
|
set(HAVE_NETDB_H 0)
|
||||||
|
set(HAVE_NETINET_IF_ETHER_H 0)
|
||||||
|
set(HAVE_NETINET_IN_H 0)
|
||||||
|
set(HAVE_NET_IF_H 0)
|
||||||
|
set(HAVE_PROCESS_H 1)
|
||||||
|
set(HAVE_PWD_H 0)
|
||||||
|
set(HAVE_SETJMP_H 1)
|
||||||
|
set(HAVE_SGTTY_H 0)
|
||||||
|
set(HAVE_SIGNAL_H 1)
|
||||||
|
set(HAVE_SOCKIO_H 0)
|
||||||
|
set(HAVE_STDINT_H 0)
|
||||||
|
set(HAVE_STDLIB_H 1)
|
||||||
|
set(HAVE_STRINGS_H 0)
|
||||||
|
set(HAVE_STRING_H 1)
|
||||||
|
set(HAVE_SYS_PARAM_H 0)
|
||||||
|
set(HAVE_SYS_POLL_H 0)
|
||||||
|
set(HAVE_SYS_SELECT_H 0)
|
||||||
|
set(HAVE_SYS_SOCKET_H 0)
|
||||||
|
set(HAVE_SYS_SOCKIO_H 0)
|
||||||
|
set(HAVE_SYS_STAT_H 1)
|
||||||
|
set(HAVE_SYS_TIME_H 0)
|
||||||
|
set(HAVE_SYS_TYPES_H 1)
|
||||||
|
set(HAVE_SYS_UTIME_H 1)
|
||||||
|
set(HAVE_TERMIOS_H 0)
|
||||||
|
set(HAVE_TERMIO_H 0)
|
||||||
|
set(HAVE_TIME_H 1)
|
||||||
|
set(HAVE_UNISTD_H 0)
|
||||||
|
set(HAVE_UTIME_H 0)
|
||||||
|
set(HAVE_X509_H 0)
|
||||||
|
set(HAVE_ZLIB_H 0)
|
||||||
|
|
||||||
|
set(HAVE_SIZEOF_LONG_DOUBLE 1)
|
||||||
|
set(SIZEOF_LONG_DOUBLE 8)
|
||||||
|
|
||||||
|
set(HAVE_SOCKET 1)
|
||||||
|
set(HAVE_POLL 0)
|
||||||
|
set(HAVE_SELECT 1)
|
||||||
|
set(HAVE_STRDUP 1)
|
||||||
|
set(HAVE_STRSTR 1)
|
||||||
|
set(HAVE_STRTOK_R 0)
|
||||||
|
set(HAVE_STRFTIME 1)
|
||||||
|
set(HAVE_UNAME 0)
|
||||||
|
set(HAVE_STRCASECMP 0)
|
||||||
|
set(HAVE_STRICMP 1)
|
||||||
|
set(HAVE_STRCMPI 1)
|
||||||
|
set(HAVE_GETHOSTBYADDR 1)
|
||||||
|
set(HAVE_GETTIMEOFDAY 0)
|
||||||
|
set(HAVE_INET_ADDR 1)
|
||||||
|
set(HAVE_INET_NTOA 1)
|
||||||
|
set(HAVE_INET_NTOA_R 0)
|
||||||
|
set(HAVE_TCGETATTR 0)
|
||||||
|
set(HAVE_TCSETATTR 0)
|
||||||
|
set(HAVE_PERROR 1)
|
||||||
|
set(HAVE_CLOSESOCKET 1)
|
||||||
|
set(HAVE_SETVBUF 0)
|
||||||
|
set(HAVE_SIGSETJMP 0)
|
||||||
|
set(HAVE_GETPASS_R 0)
|
||||||
|
set(HAVE_STRLCAT 0)
|
||||||
|
set(HAVE_GETPWUID 0)
|
||||||
|
set(HAVE_GETEUID 0)
|
||||||
|
set(HAVE_UTIME 1)
|
||||||
|
set(HAVE_RAND_EGD 0)
|
||||||
|
set(HAVE_RAND_SCREEN 0)
|
||||||
|
set(HAVE_RAND_STATUS 0)
|
||||||
|
set(HAVE_GMTIME_R 0)
|
||||||
|
set(HAVE_LOCALTIME_R 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R 0)
|
||||||
|
set(HAVE_SIGNAL_FUNC 1)
|
||||||
|
set(HAVE_SIGNAL_MACRO 0)
|
||||||
|
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_5 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_7 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_8 0)
|
||||||
|
set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||||
|
|
||||||
|
set(TIME_WITH_SYS_TIME 0)
|
||||||
|
set(HAVE_O_NONBLOCK 0)
|
||||||
|
set(HAVE_IN_ADDR_T 0)
|
||||||
|
set(HAVE_INET_NTOA_R_DECL 0)
|
||||||
|
set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
|
||||||
|
if(ENABLE_IPV6)
|
||||||
|
set(HAVE_GETADDRINFO 1)
|
||||||
|
else()
|
||||||
|
set(HAVE_GETADDRINFO 0)
|
||||||
|
endif()
|
||||||
|
set(STDC_HEADERS 1)
|
||||||
|
set(RETSIGTYPE_TEST 1)
|
||||||
|
|
||||||
|
set(HAVE_SIGACTION 0)
|
||||||
|
set(HAVE_MACRO_SIGSETJMP 0)
|
||||||
|
else()
|
||||||
|
message("This file should be included on Windows platform only")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# File containing various utilities
|
||||||
|
|
||||||
|
# Returns a list of arguments that evaluate to true
|
||||||
|
function(count_true output_count_var)
|
||||||
|
set(lst_len 0)
|
||||||
|
foreach(option_var IN LISTS ARGN)
|
||||||
|
if(${option_var})
|
||||||
|
math(EXPR lst_len "${lst_len} + 1")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||||
|
endif()
|
||||||
|
message(${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
foreach(file ${files})
|
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
exec_program(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
if(@USE_OPENSSL@)
|
||||||
|
find_dependency(OpenSSL @OPENSSL_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
if(@USE_ZLIB@)
|
||||||
|
find_dependency(ZLIB @ZLIB_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
|
||||||
|
check_required_components("@PROJECT_NAME@")
|
||||||
Vendored
+1565
File diff suppressed because it is too large
Load Diff
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
|
Copyright (c) 1996 - 2021, Daniel Stenberg, <[email protected]>, and many
|
||||||
|
contributors, see the THANKS file.
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software for any purpose
|
||||||
|
with or without fee is hereby granted, provided that the above copyright
|
||||||
|
notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of a copyright holder shall not
|
||||||
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization of the copyright holder.
|
||||||
+158
@@ -0,0 +1,158 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# This script performs all of the steps needed to build a
|
||||||
|
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||||
|
#
|
||||||
|
# Hendrik Visage:
|
||||||
|
# Generalizations added since Snowleopard (10.6) do not include
|
||||||
|
# the 10.4u SDK.
|
||||||
|
#
|
||||||
|
# Also note:
|
||||||
|
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
|
||||||
|
#If you need to have PPC64 support then change below to 1
|
||||||
|
PPC64_NEEDED=0
|
||||||
|
# Apple does not support building for PPC anymore in Xcode 4 and later.
|
||||||
|
# If you're using Xcode 3 or earlier and need PPC support, then change
|
||||||
|
# the setting below to 1
|
||||||
|
PPC_NEEDED=0
|
||||||
|
|
||||||
|
# For me the default is to develop for the platform I am on, and if you
|
||||||
|
#desire compatibility with older versions then change USE_OLD to 1 :)
|
||||||
|
USE_OLD=0
|
||||||
|
|
||||||
|
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||||
|
FRAMEWORK_VERSION=Versions/Release-$VERSION
|
||||||
|
|
||||||
|
#I also wanted to "copy over" the system, and thus the reason I added the
|
||||||
|
# version to Versions/Release-7.20.1 etc.
|
||||||
|
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
|
||||||
|
# and setup the right paths to this version, leaving the system version
|
||||||
|
# "intact", so you can "fix" it later with the links to Versions/A/...
|
||||||
|
|
||||||
|
DEVELOPER_PATH=`xcode-select --print-path`
|
||||||
|
# Around Xcode 4.3, SDKs were moved from the Developer folder into the
|
||||||
|
# MacOSX.platform folder
|
||||||
|
if test -d "$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"; then
|
||||||
|
SDK_PATH="$DEVELOPER_PATH/Platforms/MacOSX.platform/Developer/SDKs"
|
||||||
|
else
|
||||||
|
SDK_PATH="$DEVELOPER_PATH/SDKs";
|
||||||
|
fi
|
||||||
|
OLD_SDK=`ls $SDK_PATH|head -1`
|
||||||
|
NEW_SDK=`ls -r $SDK_PATH|head -1`
|
||||||
|
|
||||||
|
if test "0"$USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK32=$OLD_SDK
|
||||||
|
else
|
||||||
|
SDK32=$NEW_SDK
|
||||||
|
fi
|
||||||
|
|
||||||
|
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
|
SDK32_DIR=$SDK_PATH/$SDK32
|
||||||
|
MINVER32='-mmacosx-version-min='$MACVER
|
||||||
|
if test $PPC_NEEDED -gt 0; then
|
||||||
|
ARCHES32='-arch i386 -arch ppc'
|
||||||
|
else
|
||||||
|
ARCHES32='-arch i386'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $PPC64_NEEDED -gt 0
|
||||||
|
then
|
||||||
|
SDK64=10.5
|
||||||
|
ARCHES64='-arch x86_64 -arch ppc64'
|
||||||
|
SDK64=`ls $SDK_PATH|grep 10.5|head -1`
|
||||||
|
else
|
||||||
|
ARCHES64='-arch x86_64'
|
||||||
|
#We "know" that 10.4 and earlier do not support 64bit
|
||||||
|
OLD_SDK64=`ls $SDK_PATH|egrep -v "10.[0-4]"|head -1`
|
||||||
|
NEW_SDK64=`ls -r $SDK_PATH|egrep -v "10.[0-4][^0-9]" | head -1`
|
||||||
|
if test $USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK64=$OLD_SDK64
|
||||||
|
else
|
||||||
|
SDK64=$NEW_SDK64
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
SDK64_DIR=$SDK_PATH/$SDK64
|
||||||
|
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
|
MINVER64='-mmacosx-version-min='$MACVER64
|
||||||
|
|
||||||
|
if test ! -z $SDK32; then
|
||||||
|
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||||
|
make clean
|
||||||
|
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \
|
||||||
|
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32" \
|
||||||
|
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 -Wl,-headerpad_max_install_names" \
|
||||||
|
CC=$CC
|
||||||
|
|
||||||
|
echo "----Building 32 bit libcurl..."
|
||||||
|
make -j `sysctl -n hw.logicalcpu_max`
|
||||||
|
|
||||||
|
echo "----Creating 32 bit framework..."
|
||||||
|
rm -r libcurl.framework
|
||||||
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||||
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||||
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
|
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
|
pushd libcurl.framework
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
|
||||||
|
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
|
||||||
|
cd Versions
|
||||||
|
ln -fs $(basename "${FRAMEWORK_VERSION}") Current
|
||||||
|
|
||||||
|
echo Testing for SDK64
|
||||||
|
if test -d $SDK64_DIR; then
|
||||||
|
echo entering...
|
||||||
|
popd
|
||||||
|
make clean
|
||||||
|
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||||
|
./configure --disable-dependency-tracking --disable-static --with-gssapi --with-secure-transport \
|
||||||
|
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64" \
|
||||||
|
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 -Wl,-headerpad_max_install_names" \
|
||||||
|
CC=$CC
|
||||||
|
|
||||||
|
echo "----Building 64 bit libcurl..."
|
||||||
|
make -j `sysctl -n hw.logicalcpu_max`
|
||||||
|
|
||||||
|
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||||
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||||
|
pwd
|
||||||
|
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
|
fi
|
||||||
|
|
||||||
|
pwd
|
||||||
|
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
|
echo "libcurl.framework is built and can now be included in other projects."
|
||||||
|
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||||
|
else
|
||||||
|
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
|
||||||
|
fi
|
||||||
Vendored
+115
@@ -0,0 +1,115 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
all:
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
ssl:
|
||||||
|
./configure --with-ssl
|
||||||
|
make
|
||||||
|
|
||||||
|
mingw32:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32
|
||||||
|
$(MAKE) -C src -f Makefile.m32
|
||||||
|
|
||||||
|
mingw32-clean:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32 clean
|
||||||
|
$(MAKE) -C src -f Makefile.m32 clean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.m32 clean
|
||||||
|
|
||||||
|
mingw32-vclean mingw32-distclean:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32 vclean
|
||||||
|
$(MAKE) -C src -f Makefile.m32 vclean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.m32 vclean
|
||||||
|
|
||||||
|
mingw32-examples%:
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.m32 CFG=$@
|
||||||
|
|
||||||
|
mingw32%:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32 CFG=$@
|
||||||
|
$(MAKE) -C src -f Makefile.m32 CFG=$@
|
||||||
|
|
||||||
|
vc:
|
||||||
|
cd winbuild
|
||||||
|
nmake /f Makefile.vc MACHINE=x86
|
||||||
|
|
||||||
|
vc-x64:
|
||||||
|
cd winbuild
|
||||||
|
nmake /f Makefile.vc MACHINE=x64
|
||||||
|
|
||||||
|
djgpp:
|
||||||
|
$(MAKE) -C lib -f Makefile.dj
|
||||||
|
$(MAKE) -C src -f Makefile.dj
|
||||||
|
|
||||||
|
cygwin:
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
cygwin-ssl:
|
||||||
|
./configure --with-ssl
|
||||||
|
make
|
||||||
|
|
||||||
|
amiga:
|
||||||
|
cd ./lib && make -f makefile.amiga
|
||||||
|
cd ./src && make -f makefile.amiga
|
||||||
|
|
||||||
|
netware:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware
|
||||||
|
$(MAKE) -C src -f Makefile.netware
|
||||||
|
|
||||||
|
netware-clean:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware clean
|
||||||
|
$(MAKE) -C src -f Makefile.netware clean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.netware clean
|
||||||
|
|
||||||
|
netware-vclean netware-distclean:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware vclean
|
||||||
|
$(MAKE) -C src -f Makefile.netware vclean
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.netware vclean
|
||||||
|
|
||||||
|
netware-install:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware install
|
||||||
|
$(MAKE) -C src -f Makefile.netware install
|
||||||
|
|
||||||
|
netware-examples-%:
|
||||||
|
$(MAKE) -C docs/examples -f Makefile.netware CFG=$@
|
||||||
|
|
||||||
|
netware-%:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware CFG=$@
|
||||||
|
$(MAKE) -C src -f Makefile.netware CFG=$@
|
||||||
|
|
||||||
|
unix: all
|
||||||
|
|
||||||
|
unix-ssl: ssl
|
||||||
|
|
||||||
|
linux: all
|
||||||
|
|
||||||
|
linux-ssl: ssl
|
||||||
|
|
||||||
|
ca-bundle: lib/mk-ca-bundle.pl
|
||||||
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
|
@perl $< -b -l -u lib/ca-bundle.crt
|
||||||
|
|
||||||
|
ca-firefox: lib/firefox-db2pem.sh
|
||||||
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
|
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||||
Vendored
+745
@@ -0,0 +1,745 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
|
CMAKE_DIST = \
|
||||||
|
CMake/cmake_uninstall.cmake.in \
|
||||||
|
CMake/CMakeConfigurableFile.in \
|
||||||
|
CMake/curl-config.cmake.in \
|
||||||
|
CMake/CurlSymbolHiding.cmake \
|
||||||
|
CMake/CurlTests.c \
|
||||||
|
CMake/FindBearSSL.cmake \
|
||||||
|
CMake/FindBrotli.cmake \
|
||||||
|
CMake/FindCARES.cmake \
|
||||||
|
CMake/FindGSS.cmake \
|
||||||
|
CMake/FindLibSSH2.cmake \
|
||||||
|
CMake/FindMbedTLS.cmake \
|
||||||
|
CMake/FindNGHTTP2.cmake \
|
||||||
|
CMake/FindNGHTTP3.cmake \
|
||||||
|
CMake/FindNGTCP2.cmake \
|
||||||
|
CMake/FindNSS.cmake \
|
||||||
|
CMake/FindQUICHE.cmake \
|
||||||
|
CMake/FindWolfSSL.cmake \
|
||||||
|
CMake/FindZstd.cmake \
|
||||||
|
CMake/Macros.cmake \
|
||||||
|
CMake/OtherTests.cmake \
|
||||||
|
CMake/Platforms/WindowsCache.cmake \
|
||||||
|
CMake/Utilities.cmake \
|
||||||
|
CMakeLists.txt
|
||||||
|
|
||||||
|
VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
|
||||||
|
VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
|
||||||
|
VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC6_SRCTMPL = projects/Windows/VC6/src/curl.tmpl
|
||||||
|
VC6_SRCDSP = projects/Windows/VC6/src/curl.dsp.dist
|
||||||
|
VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
|
||||||
|
VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
|
||||||
|
VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC7_SRCTMPL = projects/Windows/VC7/src/curl.tmpl
|
||||||
|
VC7_SRCVCPROJ = projects/Windows/VC7/src/curl.vcproj.dist
|
||||||
|
VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
|
||||||
|
VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
|
||||||
|
VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC71_SRCTMPL = projects/Windows/VC7.1/src/curl.tmpl
|
||||||
|
VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curl.vcproj.dist
|
||||||
|
VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
|
||||||
|
VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
|
||||||
|
VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC8_SRCTMPL = projects/Windows/VC8/src/curl.tmpl
|
||||||
|
VC8_SRCVCPROJ = projects/Windows/VC8/src/curl.vcproj.dist
|
||||||
|
VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
|
||||||
|
VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
|
||||||
|
VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC9_SRCTMPL = projects/Windows/VC9/src/curl.tmpl
|
||||||
|
VC9_SRCVCPROJ = projects/Windows/VC9/src/curl.vcproj.dist
|
||||||
|
VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
|
||||||
|
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
|
||||||
|
VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC10_SRCTMPL = projects/Windows/VC10/src/curl.tmpl
|
||||||
|
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curl.vcxproj.dist
|
||||||
|
VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
|
||||||
|
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
|
||||||
|
VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC11_SRCTMPL = projects/Windows/VC11/src/curl.tmpl
|
||||||
|
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curl.vcxproj.dist
|
||||||
|
VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
|
||||||
|
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
|
||||||
|
VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC12_SRCTMPL = projects/Windows/VC12/src/curl.tmpl
|
||||||
|
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curl.vcxproj.dist
|
||||||
|
VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC14_LIBTMPL = projects/Windows/VC14/lib/libcurl.tmpl
|
||||||
|
VC14_LIBVCXPROJ = projects/Windows/VC14/lib/libcurl.vcxproj.dist
|
||||||
|
VC14_LIBVCXPROJ_DEPS = $(VC14_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC14_SRCTMPL = projects/Windows/VC14/src/curl.tmpl
|
||||||
|
VC14_SRCVCXPROJ = projects/Windows/VC14/src/curl.vcxproj.dist
|
||||||
|
VC14_SRCVCXPROJ_DEPS = $(VC14_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC15_LIBTMPL = projects/Windows/VC15/lib/libcurl.tmpl
|
||||||
|
VC15_LIBVCXPROJ = projects/Windows/VC15/lib/libcurl.vcxproj.dist
|
||||||
|
VC15_LIBVCXPROJ_DEPS = $(VC15_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||||
|
VC15_SRCTMPL = projects/Windows/VC15/src/curl.tmpl
|
||||||
|
VC15_SRCVCXPROJ = projects/Windows/VC15/src/curl.vcxproj.dist
|
||||||
|
VC15_SRCVCXPROJ_DEPS = $(VC15_SRCTMPL) Makefile.am src/Makefile.inc
|
||||||
|
|
||||||
|
VC_DIST = projects/README \
|
||||||
|
projects/build-openssl.bat \
|
||||||
|
projects/build-wolfssl.bat \
|
||||||
|
projects/checksrc.bat \
|
||||||
|
projects/Windows/VC6/curl-all.dsw \
|
||||||
|
projects/Windows/VC6/lib/libcurl.dsw \
|
||||||
|
projects/Windows/VC6/src/curl.dsw \
|
||||||
|
projects/Windows/VC7/curl-all.sln \
|
||||||
|
projects/Windows/VC7/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC7/src/curl.sln \
|
||||||
|
projects/Windows/VC7.1/curl-all.sln \
|
||||||
|
projects/Windows/VC7.1/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC7.1/src/curl.sln \
|
||||||
|
projects/Windows/VC8/curl-all.sln \
|
||||||
|
projects/Windows/VC8/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC8/src/curl.sln \
|
||||||
|
projects/Windows/VC9/curl-all.sln \
|
||||||
|
projects/Windows/VC9/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC9/src/curl.sln \
|
||||||
|
projects/Windows/VC10/curl-all.sln \
|
||||||
|
projects/Windows/VC10/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC10/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC10/src/curl.sln \
|
||||||
|
projects/Windows/VC10/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC11/curl-all.sln \
|
||||||
|
projects/Windows/VC11/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC11/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC11/src/curl.sln \
|
||||||
|
projects/Windows/VC11/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC12/curl-all.sln \
|
||||||
|
projects/Windows/VC12/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC12/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC12/src/curl.sln \
|
||||||
|
projects/Windows/VC12/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14/curl-all.sln \
|
||||||
|
projects/Windows/VC14/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC14/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC14/src/curl.sln \
|
||||||
|
projects/Windows/VC14/src/curl.vcxproj.filters \
|
||||||
|
projects/Windows/VC15/curl-all.sln \
|
||||||
|
projects/Windows/VC15/lib/libcurl.sln \
|
||||||
|
projects/Windows/VC15/lib/libcurl.vcxproj.filters \
|
||||||
|
projects/Windows/VC15/src/curl.sln \
|
||||||
|
projects/Windows/VC15/src/curl.vcxproj.filters \
|
||||||
|
projects/generate.bat \
|
||||||
|
projects/wolfssl_options.h \
|
||||||
|
projects/wolfssl_override.props
|
||||||
|
|
||||||
|
WINBUILD_DIST = winbuild/README.md winbuild/gen_resp_file.bat \
|
||||||
|
winbuild/MakefileBuild.vc winbuild/Makefile.vc
|
||||||
|
|
||||||
|
PLAN9_DIST = plan9/include/mkfile \
|
||||||
|
plan9/include/mkfile \
|
||||||
|
plan9/mkfile.proto \
|
||||||
|
plan9/mkfile \
|
||||||
|
plan9/README \
|
||||||
|
plan9/lib/mkfile.inc \
|
||||||
|
plan9/lib/mkfile \
|
||||||
|
plan9/src/mkfile.inc \
|
||||||
|
plan9/src/mkfile
|
||||||
|
|
||||||
|
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||||
|
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
|
||||||
|
scripts/updatemanpages.pl $(CMAKE_DIST) \
|
||||||
|
$(VC_DIST) $(WINBUILD_DIST) $(PLAN9_DIST) \
|
||||||
|
lib/libcurl.vers.in buildconf.bat scripts/coverage.sh scripts/completion.pl
|
||||||
|
|
||||||
|
CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
|
||||||
|
$(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ) \
|
||||||
|
$(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ) \
|
||||||
|
$(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \
|
||||||
|
$(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ)
|
||||||
|
|
||||||
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
|
SUBDIRS = lib src
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = libcurl.pc
|
||||||
|
|
||||||
|
# List of files required to generate VC IDE .dsp, .vcproj and .vcxproj files
|
||||||
|
include lib/Makefile.inc
|
||||||
|
include src/Makefile.inc
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
rm -rf $(top_builddir)/tests/log
|
||||||
|
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||||
|
(distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
|
||||||
|
for file in $$distit; do \
|
||||||
|
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||||
|
cp -p $$file $(distdir)$$strip; \
|
||||||
|
done)
|
||||||
|
|
||||||
|
html:
|
||||||
|
cd docs && $(MAKE) html
|
||||||
|
|
||||||
|
pdf:
|
||||||
|
cd docs && $(MAKE) pdf
|
||||||
|
|
||||||
|
check: test examples check-docs
|
||||||
|
|
||||||
|
if CROSSCOMPILING
|
||||||
|
test-full: test
|
||||||
|
test-torture: test
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo "NOTICE: we can't run the tests when cross-compiling!"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
test:
|
||||||
|
@(cd tests; $(MAKE) all quiet-test)
|
||||||
|
|
||||||
|
test-full:
|
||||||
|
@(cd tests; $(MAKE) all full-test)
|
||||||
|
|
||||||
|
test-nonflaky:
|
||||||
|
@(cd tests; $(MAKE) all nonflaky-test)
|
||||||
|
|
||||||
|
test-torture:
|
||||||
|
@(cd tests; $(MAKE) all torture-test)
|
||||||
|
|
||||||
|
test-event:
|
||||||
|
@(cd tests; $(MAKE) all event-test)
|
||||||
|
|
||||||
|
test-am:
|
||||||
|
@(cd tests; $(MAKE) all am-test)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
examples:
|
||||||
|
@(cd docs/examples; $(MAKE) check)
|
||||||
|
|
||||||
|
check-docs:
|
||||||
|
@(cd docs/libcurl; $(MAKE) check)
|
||||||
|
|
||||||
|
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||||
|
# must contain the following line:
|
||||||
|
# %_topdir /home/loic/local/rpm
|
||||||
|
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
|
||||||
|
#
|
||||||
|
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
|
||||||
|
#
|
||||||
|
# If additional configure flags are needed to build the package, add the
|
||||||
|
# following in ~/.rpmmacros
|
||||||
|
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
|
||||||
|
# and run make rpm in the following way:
|
||||||
|
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
|
||||||
|
#
|
||||||
|
|
||||||
|
rpms:
|
||||||
|
$(MAKE) RPMDIST=curl rpm
|
||||||
|
$(MAKE) RPMDIST=curl-ssl rpm
|
||||||
|
|
||||||
|
rpm:
|
||||||
|
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
|
||||||
|
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
|
||||||
|
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
|
||||||
|
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
|
||||||
|
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
|
||||||
|
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build a Solaris pkgadd format file
|
||||||
|
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||||
|
# file (which ends up back in this directory).
|
||||||
|
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||||
|
# pkgadd -d ./HAXXcurl-*
|
||||||
|
#
|
||||||
|
|
||||||
|
# gak - libtool requires an absolute directory, hence the pwd below...
|
||||||
|
pkgadd:
|
||||||
|
umask 022 ; \
|
||||||
|
$(MAKE) install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
|
||||||
|
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
|
||||||
|
cd $(srcdir)/packages/Solaris && $(MAKE) package
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build a cygwin binary tarball installation file
|
||||||
|
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
|
||||||
|
cygwinbin:
|
||||||
|
$(MAKE) -C packages/Win32/cygwin cygwinbin
|
||||||
|
|
||||||
|
# We extend the standard install with a custom hook:
|
||||||
|
install-data-hook:
|
||||||
|
(cd include && $(MAKE) install)
|
||||||
|
(cd docs && $(MAKE) install)
|
||||||
|
(cd docs/libcurl && $(MAKE) install)
|
||||||
|
|
||||||
|
# We extend the standard uninstall with a custom hook:
|
||||||
|
uninstall-hook:
|
||||||
|
(cd include && $(MAKE) uninstall)
|
||||||
|
(cd docs && $(MAKE) uninstall)
|
||||||
|
(cd docs/libcurl && $(MAKE) uninstall)
|
||||||
|
|
||||||
|
ca-bundle: lib/mk-ca-bundle.pl
|
||||||
|
@echo "generating a fresh ca-bundle.crt"
|
||||||
|
@perl $< -b -l -u lib/ca-bundle.crt
|
||||||
|
|
||||||
|
ca-firefox: lib/firefox-db2pem.sh
|
||||||
|
@echo "generating a fresh ca-bundle.crt"
|
||||||
|
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||||
|
|
||||||
|
checksrc:
|
||||||
|
(cd lib && $(MAKE) checksrc)
|
||||||
|
(cd src && $(MAKE) checksrc)
|
||||||
|
(cd tests && $(MAKE) checksrc)
|
||||||
|
(cd include/curl && $(MAKE) checksrc)
|
||||||
|
(cd docs/examples && $(MAKE) checksrc)
|
||||||
|
(cd packages && $(MAKE) checksrc)
|
||||||
|
|
||||||
|
.PHONY: vc-ide
|
||||||
|
|
||||||
|
vc-ide: $(VC6_LIBDSP_DEPS) $(VC6_SRCDSP_DEPS) $(VC7_LIBVCPROJ_DEPS) \
|
||||||
|
$(VC7_SRCVCPROJ_DEPS) $(VC71_LIBVCPROJ_DEPS) $(VC71_SRCVCPROJ_DEPS) \
|
||||||
|
$(VC8_LIBVCPROJ_DEPS) $(VC8_SRCVCPROJ_DEPS) $(VC9_LIBVCPROJ_DEPS) \
|
||||||
|
$(VC9_SRCVCPROJ_DEPS) $(VC10_LIBVCXPROJ_DEPS) $(VC10_SRCVCXPROJ_DEPS) \
|
||||||
|
$(VC11_LIBVCXPROJ_DEPS) $(VC11_SRCVCXPROJ_DEPS) $(VC12_LIBVCXPROJ_DEPS) \
|
||||||
|
$(VC12_SRCVCXPROJ_DEPS) $(VC14_LIBVCXPROJ_DEPS) $(VC14_SRCVCXPROJ_DEPS) \
|
||||||
|
$(VC15_LIBVCXPROJ_DEPS) $(VC15_SRCVCXPROJ_DEPS)
|
||||||
|
@(win32_lib_srcs='$(LIB_CFILES)'; \
|
||||||
|
win32_lib_hdrs='$(LIB_HFILES) config-win32.h'; \
|
||||||
|
win32_lib_rc='$(LIB_RCFILES)'; \
|
||||||
|
win32_lib_vauth_srcs='$(LIB_VAUTH_CFILES)'; \
|
||||||
|
win32_lib_vauth_hdrs='$(LIB_VAUTH_HFILES)'; \
|
||||||
|
win32_lib_vquic_srcs='$(LIB_VQUIC_CFILES)'; \
|
||||||
|
win32_lib_vquic_hdrs='$(LIB_VQUIC_HFILES)'; \
|
||||||
|
win32_lib_vssh_srcs='$(LIB_VSSH_CFILES)'; \
|
||||||
|
win32_lib_vssh_hdrs='$(LIB_VSSH_HFILES)'; \
|
||||||
|
win32_lib_vtls_srcs='$(LIB_VTLS_CFILES)'; \
|
||||||
|
win32_lib_vtls_hdrs='$(LIB_VTLS_HFILES)'; \
|
||||||
|
win32_src_srcs='$(CURL_CFILES)'; \
|
||||||
|
win32_src_hdrs='$(CURL_HFILES)'; \
|
||||||
|
win32_src_rc='$(CURL_RCFILES)'; \
|
||||||
|
win32_src_x_srcs='$(CURLX_CFILES)'; \
|
||||||
|
win32_src_x_hdrs='$(CURLX_HFILES) ../lib/config-win32.h'; \
|
||||||
|
\
|
||||||
|
sorted_lib_srcs=`for file in $$win32_lib_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_hdrs=`for file in $$win32_lib_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vauth_srcs=`for file in $$win32_lib_vauth_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vauth_hdrs=`for file in $$win32_lib_vauth_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vquic_srcs=`for file in $$win32_lib_vquic_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vquic_hdrs=`for file in $$win32_lib_vquic_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vssh_srcs=`for file in $$win32_lib_vssh_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vssh_hdrs=`for file in $$win32_lib_vssh_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vtls_srcs=`for file in $$win32_lib_vtls_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_lib_vtls_hdrs=`for file in $$win32_lib_vtls_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_srcs=`for file in $$win32_src_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_hdrs=`for file in $$win32_src_hdrs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_x_srcs=`for file in $$win32_src_x_srcs; do echo $$file; done | sort`; \
|
||||||
|
sorted_src_x_hdrs=`for file in $$win32_src_x_hdrs; do echo $$file; done | sort`; \
|
||||||
|
\
|
||||||
|
awk_code='\
|
||||||
|
function gen_element(type, dir, file)\
|
||||||
|
{\
|
||||||
|
sub(/vauth\//, "", file);\
|
||||||
|
sub(/vquic\//, "", file);\
|
||||||
|
sub(/vssh\//, "", file);\
|
||||||
|
sub(/vtls\//, "", file);\
|
||||||
|
\
|
||||||
|
spaces=" ";\
|
||||||
|
if(dir == "lib\\vauth" ||\
|
||||||
|
dir == "lib\\vquic" ||\
|
||||||
|
dir == "lib\\vssh" ||\
|
||||||
|
dir == "lib\\vtls")\
|
||||||
|
tabs=" ";\
|
||||||
|
else\
|
||||||
|
tabs=" ";\
|
||||||
|
\
|
||||||
|
if(type == "dsp") {\
|
||||||
|
printf("# Begin Source File\r\n");\
|
||||||
|
printf("\r\n");\
|
||||||
|
printf("SOURCE=..\\..\\..\\..\\%s\\%s\r\n", dir, file);\
|
||||||
|
printf("# End Source File\r\n");\
|
||||||
|
}\
|
||||||
|
else if(type == "vcproj1") {\
|
||||||
|
printf("%s<File\r\n", tabs);\
|
||||||
|
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\">\r\n",\
|
||||||
|
tabs, dir, file);\
|
||||||
|
printf("%s</File>\r\n", tabs);\
|
||||||
|
}\
|
||||||
|
else if(type == "vcproj2") {\
|
||||||
|
printf("%s<File\r\n", tabs);\
|
||||||
|
printf("%s RelativePath=\"..\\..\\..\\..\\%s\\%s\"\r\n",\
|
||||||
|
tabs, dir, file);\
|
||||||
|
printf("%s>\r\n", tabs);\
|
||||||
|
printf("%s</File>\r\n", tabs);\
|
||||||
|
}\
|
||||||
|
else if(type == "vcxproj") {\
|
||||||
|
i = index(file, ".");\
|
||||||
|
ext = substr(file, i == 0 ? 0 : i + 1);\
|
||||||
|
\
|
||||||
|
if(ext == "c")\
|
||||||
|
printf("%s<ClCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
else if(ext == "h")\
|
||||||
|
printf("%s<ClInclude Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
else if(ext == "rc")\
|
||||||
|
printf("%s<ResourceCompile Include=\"..\\..\\..\\..\\%s\\%s\" />\r\n",\
|
||||||
|
spaces, dir, file);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
\
|
||||||
|
{\
|
||||||
|
\
|
||||||
|
if($$0 == "CURL_LIB_C_FILES") {\
|
||||||
|
split(lib_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_H_FILES") {\
|
||||||
|
split(lib_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_RC_FILES") {\
|
||||||
|
split(lib_rc, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VAUTH_C_FILES") {\
|
||||||
|
split(lib_vauth_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VAUTH_H_FILES") {\
|
||||||
|
split(lib_vauth_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vauth", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VQUIC_C_FILES") {\
|
||||||
|
split(lib_vquic_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VQUIC_H_FILES") {\
|
||||||
|
split(lib_vquic_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vquic", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VSSH_C_FILES") {\
|
||||||
|
split(lib_vssh_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VSSH_H_FILES") {\
|
||||||
|
split(lib_vssh_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vssh", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VTLS_C_FILES") {\
|
||||||
|
split(lib_vtls_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_LIB_VTLS_H_FILES") {\
|
||||||
|
split(lib_vtls_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "lib\\vtls", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_C_FILES") {\
|
||||||
|
split(src_srcs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_H_FILES") {\
|
||||||
|
split(src_hdrs, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_RC_FILES") {\
|
||||||
|
split(src_rc, arr);\
|
||||||
|
for(val in arr) gen_element(proj_type, "src", arr[val]);\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_X_C_FILES") {\
|
||||||
|
split(src_x_srcs, arr);\
|
||||||
|
for(val in arr) {\
|
||||||
|
sub(/..\/lib\//, "", arr[val]);\
|
||||||
|
gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
else if($$0 == "CURL_SRC_X_H_FILES") {\
|
||||||
|
split(src_x_hdrs, arr);\
|
||||||
|
for(val in arr) {\
|
||||||
|
sub(/..\/lib\//, "", arr[val]);\
|
||||||
|
gen_element(proj_type, "lib", arr[val]);\
|
||||||
|
}\
|
||||||
|
}\
|
||||||
|
else\
|
||||||
|
printf("%s\r\n", $$0);\
|
||||||
|
}';\
|
||||||
|
\
|
||||||
|
echo "generating '$(VC6_LIBDSP)'"; \
|
||||||
|
awk -v proj_type=dsp \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC6_LIBTMPL) > $(VC6_LIBDSP) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC6_SRCDSP)'"; \
|
||||||
|
awk -v proj_type=dsp \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC6_SRCTMPL) > $(VC6_SRCDSP) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC7_LIBVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj1 \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC7_LIBTMPL) > $(VC7_LIBVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC7_SRCVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj1 \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC7_SRCTMPL) > $(VC7_SRCVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC71_LIBVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj1 \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC71_LIBTMPL) > $(VC71_LIBVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC71_SRCVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj1 \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC71_SRCTMPL) > $(VC71_SRCVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC8_LIBVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj2 \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC8_LIBTMPL) > $(VC8_LIBVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC8_SRCVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj2 \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC8_SRCTMPL) > $(VC8_SRCVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC9_LIBVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj2 \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC9_LIBTMPL) > $(VC9_LIBVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC9_SRCVCPROJ)'"; \
|
||||||
|
awk -v proj_type=vcproj2 \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC9_SRCTMPL) > $(VC9_SRCVCPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC10_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC10_LIBTMPL) > $(VC10_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC10_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC10_SRCTMPL) > $(VC10_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC11_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC11_LIBTMPL) > $(VC11_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC11_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC11_SRCTMPL) > $(VC11_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC12_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC12_LIBTMPL) > $(VC12_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC12_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC12_SRCTMPL) > $(VC12_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_LIBTMPL) > $(VC14_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC14_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC14_SRCTMPL) > $(VC14_SRCVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC15_LIBVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v lib_srcs="$$sorted_lib_srcs" \
|
||||||
|
-v lib_hdrs="$$sorted_lib_hdrs" \
|
||||||
|
-v lib_rc="$$win32_lib_rc" \
|
||||||
|
-v lib_vauth_srcs="$$sorted_lib_vauth_srcs" \
|
||||||
|
-v lib_vauth_hdrs="$$sorted_lib_vauth_hdrs" \
|
||||||
|
-v lib_vquic_srcs="$$sorted_lib_vquic_srcs" \
|
||||||
|
-v lib_vquic_hdrs="$$sorted_lib_vquic_hdrs" \
|
||||||
|
-v lib_vssh_srcs="$$sorted_lib_vssh_srcs" \
|
||||||
|
-v lib_vssh_hdrs="$$sorted_lib_vssh_hdrs" \
|
||||||
|
-v lib_vtls_srcs="$$sorted_lib_vtls_srcs" \
|
||||||
|
-v lib_vtls_hdrs="$$sorted_lib_vtls_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC15_LIBTMPL) > $(VC15_LIBVCXPROJ) || { exit 1; }; \
|
||||||
|
\
|
||||||
|
echo "generating '$(VC15_SRCVCXPROJ)'"; \
|
||||||
|
awk -v proj_type=vcxproj \
|
||||||
|
-v src_srcs="$$sorted_src_srcs" \
|
||||||
|
-v src_hdrs="$$sorted_src_hdrs" \
|
||||||
|
-v src_rc="$$win32_src_rc" \
|
||||||
|
-v src_x_srcs="$$sorted_src_x_srcs" \
|
||||||
|
-v src_x_hdrs="$$sorted_src_x_hdrs" \
|
||||||
|
"$$awk_code" $(srcdir)/$(VC15_SRCTMPL) > $(VC15_SRCVCXPROJ) || { exit 1; };)
|
||||||
|
|
||||||
|
tidy:
|
||||||
|
(cd src && $(MAKE) tidy)
|
||||||
|
(cd lib && $(MAKE) tidy)
|
||||||
Vendored
+2219
File diff suppressed because it is too large
Load Diff
Vendored
+55
@@ -0,0 +1,55 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
README
|
||||||
|
|
||||||
|
Curl is a command line tool for transferring data specified with URL
|
||||||
|
syntax. Find out how to use curl by reading the curl.1 man page or the
|
||||||
|
MANUAL document. Find out how to install Curl by reading the INSTALL
|
||||||
|
document.
|
||||||
|
|
||||||
|
libcurl is the library curl is using to do its job. It is readily
|
||||||
|
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.
|
||||||
|
|
||||||
|
Study the COPYING file for distribution terms.
|
||||||
|
|
||||||
|
Those documents and more can be found in the docs/ directory.
|
||||||
|
|
||||||
|
CONTACT
|
||||||
|
|
||||||
|
If you have problems, questions, ideas or suggestions, please contact us
|
||||||
|
by posting to a suitable mailing list. See https://curl.se/mail/
|
||||||
|
|
||||||
|
All contributors to the project are listed in the THANKS document.
|
||||||
|
|
||||||
|
WEBSITE
|
||||||
|
|
||||||
|
Visit the curl website for the latest news and downloads:
|
||||||
|
|
||||||
|
https://curl.se/
|
||||||
|
|
||||||
|
GIT
|
||||||
|
|
||||||
|
To download the very latest source off the GIT server do this:
|
||||||
|
|
||||||
|
git clone https://github.com/curl/curl.git
|
||||||
|
|
||||||
|
(you'll get a directory named curl created, filled with the source code)
|
||||||
|
|
||||||
|
SECURITY PROBLEMS
|
||||||
|
|
||||||
|
Report suspected security problems via our HackerOne page and not in public!
|
||||||
|
|
||||||
|
https://hackerone.com/curl
|
||||||
|
|
||||||
|
NOTICE
|
||||||
|
|
||||||
|
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||||
|
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||||
|
distribution terms.
|
||||||
Vendored
+262
@@ -0,0 +1,262 @@
|
|||||||
|
curl and libcurl 7.75.0
|
||||||
|
|
||||||
|
Public curl releases: 197
|
||||||
|
Command line options: 237
|
||||||
|
curl_easy_setopt() options: 285
|
||||||
|
Public functions in libcurl: 85
|
||||||
|
Contributors: 2322
|
||||||
|
|
||||||
|
This release includes the following changes:
|
||||||
|
|
||||||
|
o curl: add --create-file-mode [mode] [28]
|
||||||
|
o curl: add new variables to --write-out [25]
|
||||||
|
o dns: extend CURLOPT_RESOLVE syntax for adding non-permanent entries [53]
|
||||||
|
o gopher: implement secure gopher protocol [2]
|
||||||
|
o http: add Hyper as new optional HTTP backend [24]
|
||||||
|
o http: introduce AWS HTTP v4 Signature support [26]
|
||||||
|
|
||||||
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o badsymbols.pl: add verbose mode -v [31]
|
||||||
|
o badsymbols.pl: ignore stand-alone single hash lines [40]
|
||||||
|
o BUG-BOUNTY: minor language updates [5]
|
||||||
|
o build: fix djgpp builds [84]
|
||||||
|
o cleanup: fix empty expression statement has no effect
|
||||||
|
o cmake: Add an option to disable libidn2 [48]
|
||||||
|
o cmake: enable gophers correctly in curl-config [10]
|
||||||
|
o cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG [32]
|
||||||
|
o cmdline-opts/gen.pl: return hard on errors [11]
|
||||||
|
o cmdline-opts/retry.d: mention response code 429 as well [47]
|
||||||
|
o configure: set -Wextra-semi-stmt for clang with --enable-debug [52]
|
||||||
|
o connect: defer port selection until connect() time [22]
|
||||||
|
o connect: mark intentional ignores of setsockopt return values [75]
|
||||||
|
o connect: on linux, enable reporting of all ICMP errors on UDP sockets [27]
|
||||||
|
o connect: zero variable on stack to silence valgrind complaint [23]
|
||||||
|
o cookie: avoid the C1001 internal compiler error with MSVC 14 [36]
|
||||||
|
o curl.1: fix typo microsft -> microsoft [56]
|
||||||
|
o curl: fix handling of -q option [39]
|
||||||
|
o curl: include the file name in --xattr/--remote-time error msgs
|
||||||
|
o curl: move fprintf outputs to warnf [105]
|
||||||
|
o Curl_chunker: shrink the struct [104]
|
||||||
|
o curl_easy_pause.3: add multiplexed pause effects [41]
|
||||||
|
o CURLINFO_PRETRANSFER_TIME.3: clarify [61]
|
||||||
|
o CURLOPT_URL.3: remove scheme specific details [12]
|
||||||
|
o digest_sspi: Show InitializeSecurityContext errors in verbose mode [8]
|
||||||
|
o docs/examples: adjust prototypes for CURLOPT_READFUNCTION [51]
|
||||||
|
o docs/URL-SYNTAX: the URL syntax curl accepts and works with [15]
|
||||||
|
o docs: enable syntax highlighting in several docs files [16]
|
||||||
|
o docs: fix line length bug in gen.pl [70]
|
||||||
|
o docs: fix typos in NEW-PROTOCOL.md [102]
|
||||||
|
o docs: fix wrong documentation in help.d [71]
|
||||||
|
o docs: remove redundant "better" in --fail help [55]
|
||||||
|
o doh: allocate state struct on demand [85]
|
||||||
|
o examples/libtest: add .checksrc to dist [14]
|
||||||
|
o examples: remove superfluous asterisk uses
|
||||||
|
o failf: remove newline from formatting strings [35]
|
||||||
|
o file: don't provide content-length for directories [49]
|
||||||
|
o getinfo: build with disabled HTTP support
|
||||||
|
o gitattributes: Set batch files to CRLF line endings on checkout [65]
|
||||||
|
o h2: do not wait for RECV on paused transfers [43]
|
||||||
|
o HISTORY: added dates to early history
|
||||||
|
o http: empty reply connection are not left intact [80]
|
||||||
|
o http: get CURLOPT_REQUEST_TARGET working with a HTTP proxy [83]
|
||||||
|
o http: have CURLOPT_FAILONERROR fail after all headers [54]
|
||||||
|
o http: make providing Proxy-Connection header not cause duplicated headers [92]
|
||||||
|
o http: show the request as headers even when split-sending [7]
|
||||||
|
o http_chunks: correct and clarify a comment on hexnumber length [88]
|
||||||
|
o http_proxy: Fix CONNECT chunked encoding race condition [76]
|
||||||
|
o httpauth: make multi-request auth work with custom port [45]
|
||||||
|
o INSTALL: now at 85 operating systems
|
||||||
|
o INSTALL: update the list known OSes and CPU archs curl has run on [38]
|
||||||
|
o lib/unit tests: add missing curl_global_cleanup() calls
|
||||||
|
o lib1564/5: verify that curl_multi_wakeup returns OK
|
||||||
|
o lib: pass in 'struct Curl_easy *' to most functions [101]
|
||||||
|
o lib: remove Curl_ prefix from many static functions [66]
|
||||||
|
o lib: save a bit of space with some structure packing [82]
|
||||||
|
o libssh2: fix "Value stored to 'readdir_len' is never read"
|
||||||
|
o libssh2: move data from connection object to transfer object [114]
|
||||||
|
o libssh: avoid plain free() of libssh-memory [99]
|
||||||
|
o mime: make sure setting MIMEPOST to NULL resets properly [58]
|
||||||
|
o misc: assorted typo fixes [57]
|
||||||
|
o misc: fix "warning: empty expression statement has no effect" [30]
|
||||||
|
o misc: fix typos [73]
|
||||||
|
o mk-ca-bundle.pl: deterministic output when using -t [62]
|
||||||
|
o mqtt: deal with 0 byte reads correctly [4]
|
||||||
|
o mqtt: handle POST/PUBLISH without a set POSTFIELDSIZE [1]
|
||||||
|
o multi: set the PRETRANSFER time-stamp when we switch to PERFORM [59]
|
||||||
|
o multi: skip DONE state if there's no connection left for ftp wildcard
|
||||||
|
o multi: when erroring in TOOFAST state, act as for PERFORM [9]
|
||||||
|
o multi_runsingle: bail out early on data->conn == NULL [74]
|
||||||
|
o ngtcp2: Fix http3 upload stall [106]
|
||||||
|
o ngtcp2: Fix stack buffer overflow [107]
|
||||||
|
o ngtcp2: make it build it current master again [21]
|
||||||
|
o nss: get the run-time version instead of build-time [67]
|
||||||
|
o openssl: lowercase the hostname before using it for SNI [46]
|
||||||
|
o OS400: update ccsidcurl.c [20]
|
||||||
|
o pretransfer: setup the User-Agent header here [60]
|
||||||
|
o quiche: remove fprintf() leftover
|
||||||
|
o Revert "CI/github: work-around for brew breakage on macOS" [17]
|
||||||
|
o runtests: add 'wakeup' as a feature
|
||||||
|
o runtests: add support for %if [feature] conditions [19]
|
||||||
|
o runtests: preprocess DISABLED to allow conditionals [93]
|
||||||
|
o schannel: plug a memory-leak [64]
|
||||||
|
o schannel_verify: fix safefree call typo [50]
|
||||||
|
o select: convert Curl_select() to private static function [103]
|
||||||
|
o socks: use the download buffer instead [86]
|
||||||
|
o speedcheck: exclude paused transfers [42]
|
||||||
|
o strerror: skip errnum >= 0 assertion on windows [78]
|
||||||
|
o test1522: add debug tracing [3]
|
||||||
|
o test1633: set appropriate name
|
||||||
|
o test179: use consistent header line endings
|
||||||
|
o test410: verify HTTPS GET with a 49K request header
|
||||||
|
o tests/mqttd: extract the client id from the correct offset [13]
|
||||||
|
o tests: make --libcurl tests only test FTP options if ftp enabled [18]
|
||||||
|
o tool_doswin: Restore original console settings on CTRL signal [68]
|
||||||
|
o tool_operate: fix the suppression logic of some error messages [33]
|
||||||
|
o tool_operate: spellfix a comment
|
||||||
|
o tooĺ_writeout: fix the -w time output units [6]
|
||||||
|
o transfer: fix GCC 10 warning with flag '-Wint-in-bool-context' [79]
|
||||||
|
o travis: build ngtcp2 --with-gnutls [72]
|
||||||
|
o travis: limit the tests with quiche builds to HTTPS and FTPS only [44]
|
||||||
|
o travis: restrict the openssl3 job to only run https and ftps tests [34]
|
||||||
|
o url: if IDNA conversion fails, fallback to Transitional [29]
|
||||||
|
o urldata: make magic be the first struct field [87]
|
||||||
|
o urldata: remove 'local_ip' from the connectdata struct [97]
|
||||||
|
o urldata: remove duplicate 'upkeep_interval_ms' from connectdata [96]
|
||||||
|
o urldata: remove duplicate port number storage [98]
|
||||||
|
o urldata: remove the duplicate 'ip_addr_str' field [100]
|
||||||
|
o urldata: store ip version in a single byte [95]
|
||||||
|
o vtls: remove md5sum [69]
|
||||||
|
o warnless: remove curlx_ultosi [108]
|
||||||
|
o wolfssl: add SECURE_RENEGOTIATION support [63]
|
||||||
|
o wolfssl: Support wolfSSL builds missing TLS 1.1 [37]
|
||||||
|
|
||||||
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
o see docs/KNOWN_BUGS (https://curl.se/docs/knownbugs.html)
|
||||||
|
|
||||||
|
This release would not have looked like this without help, code, reports and
|
||||||
|
advice from friends like these:
|
||||||
|
|
||||||
|
0xflotus on github, Alessandro Ghedini, Andrey Gursky, Bubu on github,
|
||||||
|
Cherish98 on github, Christoph M. Becker, Cory Benfield, Cristian Rodríguez,
|
||||||
|
Dan Fandrich, Daniel Stenberg, David Earl, Denis Laxalde, Dennis Clarke,
|
||||||
|
Dmitry Wagin, Douglas R. Reno, Earnestly on github, Emil Engler, Erik Olsson,
|
||||||
|
Fabian Keil, Flameborn on github, Ganesh Kamath, Gergely Nagy, Gisle Vanem,
|
||||||
|
Hans-Christian Noren Egtvedt, Harry Sintonen, Himanshu Gupta, Hongyi Zhao,
|
||||||
|
Ian Spence, Ikko Ashimine, Jacob Hoffman-Andrews, Jeremy Thibault,
|
||||||
|
Jon Rumsey, Jon Wilkes, Julian Montes, Kevin Ushey, Marcel Raad,
|
||||||
|
Matthias Gatto, Matt Holt, Michał Antoniak, Mike Gelfand, Mike Tzou,
|
||||||
|
Nick Zitzmann, Olaf Hering, parazyd on github, Patrick Monnerat, Paul Groke,
|
||||||
|
Ray Satiro, Razvan Cojocaru, Rich Turner, Sai Ram Kunala, Sean McArthur,
|
||||||
|
Tatsuhiro Tsujikawa, Tomas Berger, UrsusArctos on github, Viktor Szakats,
|
||||||
|
William A. Rowe Jr, XhmikosR on github, 不确定
|
||||||
|
(58 contributors)
|
||||||
|
|
||||||
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|
||||||
|
References to bug reports and discussions on issues:
|
||||||
|
|
||||||
|
[1] = https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28735
|
||||||
|
[2] = https://curl.se/bug/?i=6208
|
||||||
|
[3] = https://curl.se/bug/?i=6331
|
||||||
|
[4] = https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28676
|
||||||
|
[5] = https://curl.se/bug/?i=6318
|
||||||
|
[6] = https://curl.se/bug/?i=6321
|
||||||
|
[7] = https://curl.se/bug/?i=6328
|
||||||
|
[8] = https://curl.se/bug/?i=6315
|
||||||
|
[9] = https://curl.se/bug/?i=6333
|
||||||
|
[10] = https://curl.se/bug/?i=6336
|
||||||
|
[11] = https://curl.se/bug/?i=6354
|
||||||
|
[12] = https://curl.se/bug/?i=6307
|
||||||
|
[13] = https://curl.se/bug/?i=6334
|
||||||
|
[14] = https://curl.se/bug/?i=6176
|
||||||
|
[15] = https://curl.se/bug/?i=6285
|
||||||
|
[16] = https://curl.se/bug/?i=6286
|
||||||
|
[17] = https://curl.se/bug/?i=6332
|
||||||
|
[18] = https://curl.se/bug/?i=6303
|
||||||
|
[19] = https://curl.se/bug/?i=6304
|
||||||
|
[20] = https://curl.se/bug/?i=6292
|
||||||
|
[21] = https://curl.se/bug/?i=6296
|
||||||
|
[22] = https://curl.se/bug/?i=6295
|
||||||
|
[23] = https://curl.se/bug/?i=6289
|
||||||
|
[24] = https://curl.se/bug/?i=6110
|
||||||
|
[25] = https://curl.se/bug/?i=6199
|
||||||
|
[26] = https://curl.se/bug/?i=5703
|
||||||
|
[27] = https://curl.se/bug/?i=6341
|
||||||
|
[28] = https://curl.se/bug/?i=6244
|
||||||
|
[29] = https://curl.se/bug/?i=6423
|
||||||
|
[30] = https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64#commitcomment-45433279
|
||||||
|
[31] = https://curl.se/bug/?i=6349
|
||||||
|
[32] = https://curl.se/bug/?i=6435
|
||||||
|
[33] = https://curl.se/mail/archive-2020-12/0017.html
|
||||||
|
[34] = https://curl.se/bug/?i=6345
|
||||||
|
[35] = https://curl.se/bug/?i=6365
|
||||||
|
[36] = https://curl.se/bug/?i=6112
|
||||||
|
[37] = https://curl.se/mail/lib-2020-12/0121.html
|
||||||
|
[38] = https://curl.se/bug/?i=6366
|
||||||
|
[39] = https://curl.se/bug/?i=6364
|
||||||
|
[40] = https://curl.se/mail/lib-2020-12/0084.html
|
||||||
|
[41] = https://curl.se/bug/?i=6360
|
||||||
|
[42] = https://curl.se/bug/?i=6358
|
||||||
|
[43] = https://curl.se/bug/?i=6356
|
||||||
|
[44] = https://curl.se/bug/?i=6403
|
||||||
|
[45] = https://curl.se/bug/?i=6397
|
||||||
|
[46] = https://curl.se/bug/?i=6540
|
||||||
|
[47] = https://curl.se/mail/archive-2020-12/0018.html
|
||||||
|
[48] = https://curl.se/bug/?i=6361
|
||||||
|
[49] = https://curl.se/bug/?i=6421
|
||||||
|
[50] = https://curl.se/bug/?i=6459
|
||||||
|
[51] = https://curl.se/bug/?i=6392
|
||||||
|
[52] = https://curl.se/bug/?i=6378
|
||||||
|
[53] = https://curl.se/bug/?i=6294
|
||||||
|
[54] = https://curl.se/bug/?i=6408
|
||||||
|
[55] = https://curl.se/bug/?i=6385
|
||||||
|
[56] = https://curl.se/bug/?i=6380
|
||||||
|
[57] = https://curl.se/bug/?i=6375
|
||||||
|
[58] = https://curl.se/bug/?i=6455
|
||||||
|
[59] = https://curl.se/bug/?i=6454
|
||||||
|
[60] = https://curl.se/bug/?i=6312
|
||||||
|
[61] = https://curl.se/bug/?i=6453
|
||||||
|
[62] = https://curl.se/bug/?i=6413
|
||||||
|
[63] = https://curl.se/bug/?i=6411
|
||||||
|
[64] = https://curl.se/bug/?i=6457
|
||||||
|
[65] = https://github.com/curl/curl/discussions/6427
|
||||||
|
[66] = https://curl.se/bug/?i=6443
|
||||||
|
[67] = https://curl.se/bug/?i=6445
|
||||||
|
[68] = https://curl.se/bug/?i=6226
|
||||||
|
[69] = https://curl.se/bug/?i=6557
|
||||||
|
[70] = https://curl.se/bug/?i=6438
|
||||||
|
[71] = https://curl.se/bug/?i=6436
|
||||||
|
[72] = https://curl.se/bug/?i=6493
|
||||||
|
[73] = https://curl.se/mail/lib-2021-01/0063.html
|
||||||
|
[74] = https://curl.se/bug/?i=6433
|
||||||
|
[75] = https://curl.se/bug/?i=6431
|
||||||
|
[76] = https://curl.se/mail/lib-2021-01/0033.html
|
||||||
|
[78] = https://curl.se/bug/?i=6504
|
||||||
|
[79] = https://curl.se/bug/?i=6537
|
||||||
|
[80] = https://twitter.com/mholt6/status/1352130240265375744
|
||||||
|
[82] = https://curl.se/bug/?i=6483
|
||||||
|
[83] = https://curl.se/bug/?i=6490
|
||||||
|
[84] = https://curl.se/bug/?i=6382
|
||||||
|
[85] = https://curl.se/bug/?i=6492
|
||||||
|
[86] = https://curl.se/bug/?i=6491
|
||||||
|
[87] = https://curl.se/bug/?i=6484
|
||||||
|
[88] = https://curl.se/bug/?i=6489
|
||||||
|
[92] = https://curl.se/mail/lib-2021-01/0095.html
|
||||||
|
[93] = https://curl.se/bug/?i=6477
|
||||||
|
[95] = https://curl.se/bug/?i=6534
|
||||||
|
[96] = https://curl.se/bug/?i=6534
|
||||||
|
[97] = https://curl.se/bug/?i=6534
|
||||||
|
[98] = https://curl.se/bug/?i=6534
|
||||||
|
[99] = https://curl.se/bug/?i=6481
|
||||||
|
[100] = https://curl.se/bug/?i=6534
|
||||||
|
[101] = https://curl.se/bug/?i=6425
|
||||||
|
[102] = https://curl.se/bug/?i=6471
|
||||||
|
[103] = https://curl.se/bug/?i=6531
|
||||||
|
[104] = https://curl.se/bug/?i=6527
|
||||||
|
[105] = https://curl.se/bug/?i=6533
|
||||||
|
[106] = https://curl.se/bug/?i=6521
|
||||||
|
[107] = https://curl.se/bug/?i=6521
|
||||||
|
[108] = https://curl.se/bug/?i=6530
|
||||||
|
[114] = https://curl.se/bug/?i=6519
|
||||||
Vendored
+2582
File diff suppressed because it is too large
Load Diff
Vendored
+1189
File diff suppressed because it is too large
Load Diff
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "*** Do not use buildconf. Instead, just use: autoreconf -fi" >&2
|
||||||
|
exec ${AUTORECONF:-autoreconf} -fi "${@}"
|
||||||
Vendored
+317
@@ -0,0 +1,317 @@
|
|||||||
|
@echo off
|
||||||
|
rem ***************************************************************************
|
||||||
|
rem * _ _ ____ _
|
||||||
|
rem * Project ___| | | | _ \| |
|
||||||
|
rem * / __| | | | |_) | |
|
||||||
|
rem * | (__| |_| | _ <| |___
|
||||||
|
rem * \___|\___/|_| \_\_____|
|
||||||
|
rem *
|
||||||
|
rem * Copyright (C) 1998 - 2019, Daniel Stenberg, <[email protected]>, et al.
|
||||||
|
rem *
|
||||||
|
rem * This software is licensed as described in the file COPYING, which
|
||||||
|
rem * you should have received as part of this distribution. The terms
|
||||||
|
rem * are also available at https://curl.se/docs/copyright.html.
|
||||||
|
rem *
|
||||||
|
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
rem * copies of the Software, and permit persons to whom the Software is
|
||||||
|
rem * furnished to do so, under the terms of the COPYING file.
|
||||||
|
rem *
|
||||||
|
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
rem * KIND, either express or implied.
|
||||||
|
rem *
|
||||||
|
rem ***************************************************************************
|
||||||
|
|
||||||
|
rem NOTES
|
||||||
|
rem
|
||||||
|
rem This batch file must be used to set up a git tree to build on systems where
|
||||||
|
rem there is no autotools support (i.e. DOS and Windows).
|
||||||
|
rem
|
||||||
|
|
||||||
|
:begin
|
||||||
|
rem Set our variables
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set MODE=GENERATE
|
||||||
|
|
||||||
|
rem Switch to this batch file's directory
|
||||||
|
cd /d "%~0\.." 1>NUL 2>&1
|
||||||
|
|
||||||
|
rem Check we are running from a curl git repository
|
||||||
|
if not exist GIT-INFO goto norepo
|
||||||
|
|
||||||
|
rem Detect programs. HAVE_<PROGNAME>
|
||||||
|
rem When not found the variable is set undefined. The undefined pattern
|
||||||
|
rem allows for statements like "if not defined HAVE_PERL (command)"
|
||||||
|
groff --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_GROFF=) else (set HAVE_GROFF=Y)
|
||||||
|
nroff --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_NROFF=) else (set HAVE_NROFF=Y)
|
||||||
|
perl --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_PERL=) else (set HAVE_PERL=Y)
|
||||||
|
gzip --version <NUL 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (set HAVE_GZIP=) else (set HAVE_GZIP=Y)
|
||||||
|
|
||||||
|
:parseArgs
|
||||||
|
if "%~1" == "" goto start
|
||||||
|
|
||||||
|
if /i "%~1" == "-clean" (
|
||||||
|
set MODE=CLEAN
|
||||||
|
) else if /i "%~1" == "-?" (
|
||||||
|
goto syntax
|
||||||
|
) else if /i "%~1" == "-h" (
|
||||||
|
goto syntax
|
||||||
|
) else if /i "%~1" == "-help" (
|
||||||
|
goto syntax
|
||||||
|
) else (
|
||||||
|
goto unknown
|
||||||
|
)
|
||||||
|
|
||||||
|
shift & goto parseArgs
|
||||||
|
|
||||||
|
:start
|
||||||
|
if "%MODE%" == "GENERATE" (
|
||||||
|
echo.
|
||||||
|
echo Generating prerequisite files
|
||||||
|
|
||||||
|
call :generate
|
||||||
|
if errorlevel 3 goto nogenhugehelp
|
||||||
|
if errorlevel 2 goto nogenmakefile
|
||||||
|
if errorlevel 1 goto warning
|
||||||
|
|
||||||
|
) else (
|
||||||
|
echo.
|
||||||
|
echo Removing prerequisite files
|
||||||
|
|
||||||
|
call :clean
|
||||||
|
if errorlevel 2 goto nocleanhugehelp
|
||||||
|
if errorlevel 1 goto nocleanmakefile
|
||||||
|
)
|
||||||
|
|
||||||
|
goto success
|
||||||
|
|
||||||
|
rem Main generate function.
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - success
|
||||||
|
rem 1 - success with simplified tool_hugehelp.c
|
||||||
|
rem 2 - failed to generate Makefile
|
||||||
|
rem 3 - failed to generate tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
:generate
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set BASIC_HUGEHELP=0
|
||||||
|
|
||||||
|
rem Create Makefile
|
||||||
|
echo * %CD%\Makefile
|
||||||
|
if exist Makefile.dist (
|
||||||
|
copy /Y Makefile.dist Makefile 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
rem Create tool_hugehelp.c
|
||||||
|
echo * %CD%\src\tool_hugehelp.c
|
||||||
|
call :genHugeHelp
|
||||||
|
if errorlevel 2 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 3
|
||||||
|
)
|
||||||
|
if errorlevel 1 (
|
||||||
|
set BASIC_HUGEHELP=1
|
||||||
|
)
|
||||||
|
cmd /c exit 0
|
||||||
|
|
||||||
|
rem Setup c-ares git tree
|
||||||
|
if exist ares\buildconf.bat (
|
||||||
|
echo.
|
||||||
|
echo Configuring c-ares build environment
|
||||||
|
cd ares
|
||||||
|
call buildconf.bat
|
||||||
|
cd ..
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%BASIC_HUGEHELP%" == "1" (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
rem Main clean function.
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - success
|
||||||
|
rem 1 - failed to clean Makefile
|
||||||
|
rem 2 - failed to clean tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
:clean
|
||||||
|
rem Remove Makefile
|
||||||
|
echo * %CD%\Makefile
|
||||||
|
if exist Makefile (
|
||||||
|
del Makefile 2>NUL
|
||||||
|
if exist Makefile (
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
rem Remove tool_hugehelp.c
|
||||||
|
echo * %CD%\src\tool_hugehelp.c
|
||||||
|
if exist src\tool_hugehelp.c (
|
||||||
|
del src\tool_hugehelp.c 2>NUL
|
||||||
|
if exist src\tool_hugehelp.c (
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
exit /B
|
||||||
|
|
||||||
|
rem Function to generate src\tool_hugehelp.c
|
||||||
|
rem
|
||||||
|
rem Returns:
|
||||||
|
rem
|
||||||
|
rem 0 - full tool_hugehelp.c generated
|
||||||
|
rem 1 - simplified tool_hugehelp.c
|
||||||
|
rem 2 - failure
|
||||||
|
rem
|
||||||
|
:genHugeHelp
|
||||||
|
if "%OS%" == "Windows_NT" setlocal
|
||||||
|
set LC_ALL=C
|
||||||
|
set ROFFCMD=
|
||||||
|
set BASIC=1
|
||||||
|
|
||||||
|
if defined HAVE_PERL (
|
||||||
|
if defined HAVE_GROFF (
|
||||||
|
set ROFFCMD=groff -mtty-char -Tascii -P-c -man
|
||||||
|
) else if defined HAVE_NROFF (
|
||||||
|
set ROFFCMD=nroff -c -Tascii -man
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined ROFFCMD (
|
||||||
|
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||||
|
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
|
||||||
|
|
||||||
|
if defined HAVE_GZIP (
|
||||||
|
echo #ifndef HAVE_LIBZ>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
|
||||||
|
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl docs\MANUAL >> src\tool_hugehelp.c
|
||||||
|
if defined HAVE_GZIP (
|
||||||
|
echo #else>> src\tool_hugehelp.c
|
||||||
|
%ROFFCMD% docs\curl.1 2>NUL | perl src\mkhelp.pl -c docs\MANUAL >> src\tool_hugehelp.c
|
||||||
|
echo #endif /^* HAVE_LIBZ ^*/>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set BASIC=0
|
||||||
|
) else (
|
||||||
|
if exist src\tool_hugehelp.c.cvs (
|
||||||
|
copy /Y src\tool_hugehelp.c.cvs src\tool_hugehelp.c 1>NUL 2>&1
|
||||||
|
) else (
|
||||||
|
echo #include "tool_setup.h"> src\tool_hugehelp.c
|
||||||
|
echo #include "tool_hugehelp.h">> src\tool_hugehelp.c
|
||||||
|
echo.>> src\tool_hugehelp.c
|
||||||
|
echo void hugehelp(void^)>> src\tool_hugehelp.c
|
||||||
|
echo {>> src\tool_hugehelp.c
|
||||||
|
echo #ifdef USE_MANUAL>> src\tool_hugehelp.c
|
||||||
|
echo fputs("Built-in manual not included\n", stdout^);>> src\tool_hugehelp.c
|
||||||
|
echo #endif>> src\tool_hugehelp.c
|
||||||
|
echo }>> src\tool_hugehelp.c
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
findstr "/C:void hugehelp(void)" src\tool_hugehelp.c 1>NUL 2>&1
|
||||||
|
if errorlevel 1 (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 2
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%BASIC%" == "1" (
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%OS%" == "Windows_NT" endlocal
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
rem Function to clean-up local variables under DOS, Windows 3.x and
|
||||||
|
rem Windows 9x as setlocal isn't available until Windows NT
|
||||||
|
rem
|
||||||
|
:dosCleanup
|
||||||
|
set MODE=
|
||||||
|
set HAVE_GROFF=
|
||||||
|
set HAVE_NROFF=
|
||||||
|
set HAVE_PERL=
|
||||||
|
set HAVE_GZIP=
|
||||||
|
set BASIC_HUGEHELP=
|
||||||
|
set LC_ALL
|
||||||
|
set ROFFCMD=
|
||||||
|
set BASIC=
|
||||||
|
|
||||||
|
exit /B
|
||||||
|
|
||||||
|
:syntax
|
||||||
|
rem Display the help
|
||||||
|
echo.
|
||||||
|
echo Usage: buildconf [-clean]
|
||||||
|
echo.
|
||||||
|
echo -clean - Removes the files
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:unknown
|
||||||
|
echo.
|
||||||
|
echo Error: Unknown argument '%1'
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:norepo
|
||||||
|
echo.
|
||||||
|
echo Error: This batch file should only be used with a curl git repository
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nogenmakefile
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to generate Makefile
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nogenhugehelp
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to generate src\tool_hugehelp.c
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nocleanmakefile
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to clean Makefile
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:nocleanhugehelp
|
||||||
|
echo.
|
||||||
|
echo Error: Unable to clean src\tool_hugehelp.c
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:warning
|
||||||
|
echo.
|
||||||
|
echo Warning: The curl manual could not be integrated in the source. This means when
|
||||||
|
echo you build curl the manual will not be available (curl --man^). Integration of
|
||||||
|
echo the manual is not required and a summary of the options will still be available
|
||||||
|
echo (curl --help^). To integrate the manual your PATH is required to have
|
||||||
|
echo groff/nroff, perl and optionally gzip for compression.
|
||||||
|
goto success
|
||||||
|
|
||||||
|
:error
|
||||||
|
if "%OS%" == "Windows_NT" (
|
||||||
|
endlocal
|
||||||
|
) else (
|
||||||
|
call :dosCleanup
|
||||||
|
)
|
||||||
|
exit /B 1
|
||||||
|
|
||||||
|
:success
|
||||||
|
if "%OS%" == "Windows_NT" (
|
||||||
|
endlocal
|
||||||
|
) else (
|
||||||
|
call :dosCleanup
|
||||||
|
)
|
||||||
|
exit /B 0
|
||||||
+348
@@ -0,0 +1,348 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <[email protected]>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <[email protected]> or send patches to
|
||||||
|
# <[email protected]>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN* | MSYS*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/* | msys/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <[email protected]>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
||||||
|
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
+1480
File diff suppressed because it is too large
Load Diff
+1801
File diff suppressed because it is too large
Load Diff
+48190
File diff suppressed because it is too large
Load Diff
+5372
File diff suppressed because it is too large
Load Diff
Vendored
+194
@@ -0,0 +1,194 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 2001 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
includedir=@includedir@
|
||||||
|
cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
Usage: curl-config [OPTION]
|
||||||
|
|
||||||
|
Available values for OPTION include:
|
||||||
|
|
||||||
|
--built-shared says 'yes' if libcurl was built shared
|
||||||
|
--ca ca bundle install path
|
||||||
|
--cc compiler
|
||||||
|
--cflags pre-processor and compiler flags
|
||||||
|
--checkfor [version] check for (lib)curl of the specified version
|
||||||
|
--configure the arguments given to configure when building curl
|
||||||
|
--features newline separated list of enabled features
|
||||||
|
--help display this help and exit
|
||||||
|
--libs library linking information
|
||||||
|
--prefix curl install prefix
|
||||||
|
--protocols newline separated list of enabled protocols
|
||||||
|
--ssl-backends output the SSL backends libcurl was built to support
|
||||||
|
--static-libs static libcurl library linking information
|
||||||
|
--version output version information
|
||||||
|
--vernum output the version information as a number (hexadecimal)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
# this deals with options in the style
|
||||||
|
# --option=value and extracts the value part
|
||||||
|
# [not currently used]
|
||||||
|
-*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||||
|
*) value= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--built-shared)
|
||||||
|
echo @ENABLE_SHARED@
|
||||||
|
;;
|
||||||
|
|
||||||
|
--ca)
|
||||||
|
echo @CURL_CA_BUNDLE@
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cc)
|
||||||
|
echo "@CC@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--prefix)
|
||||||
|
echo "$prefix"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--feature|--features)
|
||||||
|
for feature in @SUPPORT_FEATURES@ ""; do
|
||||||
|
test -n "$feature" && echo "$feature"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
--protocols)
|
||||||
|
for protocol in @SUPPORT_PROTOCOLS@; do
|
||||||
|
echo "$protocol"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
--version)
|
||||||
|
echo libcurl @CURLVERSION@
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--checkfor)
|
||||||
|
checkfor=$2
|
||||||
|
cmajor=`echo $checkfor | cut -d. -f1`
|
||||||
|
cminor=`echo $checkfor | cut -d. -f2`
|
||||||
|
# when extracting the patch part we strip off everything after a
|
||||||
|
# dash as that's used for things like version 1.2.3-CVS
|
||||||
|
cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
|
||||||
|
|
||||||
|
vmajor=`echo @CURLVERSION@ | cut -d. -f1`
|
||||||
|
vminor=`echo @CURLVERSION@ | cut -d. -f2`
|
||||||
|
# when extracting the patch part we strip off everything after a
|
||||||
|
# dash as that's used for things like version 1.2.3-CVS
|
||||||
|
vpatch=`echo @CURLVERSION@ | cut -d. -f3 | cut -d- -f1`
|
||||||
|
|
||||||
|
if test "$vmajor" -gt "$cmajor"; then
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
if test "$vmajor" -eq "$cmajor"; then
|
||||||
|
if test "$vminor" -gt "$cminor"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if test "$vminor" -eq "$cminor"; then
|
||||||
|
if test "$cpatch" -le "$vpatch"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "requested version $checkfor is newer than existing @CURLVERSION@"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
--vernum)
|
||||||
|
echo @VERSIONNUM@
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--help)
|
||||||
|
usage 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--cflags)
|
||||||
|
if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
|
||||||
|
CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
|
||||||
|
else
|
||||||
|
CPPFLAG_CURL_STATICLIB=""
|
||||||
|
fi
|
||||||
|
if test "X@includedir@" = "X/usr/include"; then
|
||||||
|
echo "$CPPFLAG_CURL_STATICLIB"
|
||||||
|
else
|
||||||
|
echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
--libs)
|
||||||
|
if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
||||||
|
CURLLIBDIR="-L@libdir@ "
|
||||||
|
else
|
||||||
|
CURLLIBDIR=""
|
||||||
|
fi
|
||||||
|
if test "X@ENABLE_SHARED@" = "Xno"; then
|
||||||
|
echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
|
||||||
|
else
|
||||||
|
echo ${CURLLIBDIR}-lcurl
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--ssl-backends)
|
||||||
|
echo "@SSL_BACKENDS@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
--static-libs)
|
||||||
|
if test "X@ENABLE_STATIC@" != "Xno" ; then
|
||||||
|
echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
|
||||||
|
else
|
||||||
|
echo "curl was built with static libraries disabled" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
--configure)
|
||||||
|
echo @CONFIGURE_OPTIONS@
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "unknown option: $1"
|
||||||
|
usage 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
+791
@@ -0,0 +1,791 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <[email protected]>.
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||||
|
as side-effects.
|
||||||
|
|
||||||
|
Environment variables:
|
||||||
|
depmode Dependency tracking mode.
|
||||||
|
source Source file read by 'PROGRAMS ARGS'.
|
||||||
|
object Object file output by 'PROGRAMS ARGS'.
|
||||||
|
DEPDIR directory where to store dependencies.
|
||||||
|
depfile Dependency file to output.
|
||||||
|
tmpdepfile Temporary file to use when outputting dependencies.
|
||||||
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
|
Report bugs to <[email protected]>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "depcomp $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Get the directory component of the given path, and save it in the
|
||||||
|
# global variables '$dir'. Note that this directory component will
|
||||||
|
# be either empty or ending with a '/' character. This is deliberate.
|
||||||
|
set_dir_from ()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||||
|
*) dir=;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the suffix-stripped basename of the given path, and save it the
|
||||||
|
# global variable '$base'.
|
||||||
|
set_base_from ()
|
||||||
|
{
|
||||||
|
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no dependency file was actually created by the compiler invocation,
|
||||||
|
# we still have to create a dummy depfile, to avoid errors with the
|
||||||
|
# Makefile "include basename.Plo" scheme.
|
||||||
|
make_dummy_depfile ()
|
||||||
|
{
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Factor out some common post-processing of the generated depfile.
|
||||||
|
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||||
|
aix_post_process_depfile ()
|
||||||
|
{
|
||||||
|
# If the compiler actually managed to produce a dependency file,
|
||||||
|
# post-process it.
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
# Each line is of the form 'foo.o: dependency.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# $object: dependency.h
|
||||||
|
# and one to simply output
|
||||||
|
# dependency.h:
|
||||||
|
# which is needed to avoid the deleted-header problem.
|
||||||
|
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||||
|
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||||
|
} > "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A tabulation character.
|
||||||
|
tab=' '
|
||||||
|
# A newline character.
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
# Character ranges might be problematic outside the C locale.
|
||||||
|
# These definitions help.
|
||||||
|
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||||
|
lower=abcdefghijklmnopqrstuvwxyz
|
||||||
|
digits=0123456789
|
||||||
|
alpha=${upper}${lower}
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||||
|
depfile=${depfile-`echo "$object" |
|
||||||
|
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Avoid interferences from the environment.
|
||||||
|
gccflag= dashmflag=
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
cygpath_u="cygpath -u -f -"
|
||||||
|
if test "$depmode" = msvcmsys; then
|
||||||
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvisualcpp
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = msvc7msys; then
|
||||||
|
# This is just like msvc7 but w/o cygpath translation.
|
||||||
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
|
# slashes to satisfy depend.m4
|
||||||
|
cygpath_u='sed s,\\\\,/,g'
|
||||||
|
depmode=msvc7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = xlc; then
|
||||||
|
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||||
|
gccflag=-qmakedep=gcc,-MF
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||||
|
## the command line argument order; so add the flags where they
|
||||||
|
## appear in depend2.am. Note that the slowdown incurred here
|
||||||
|
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||||
|
*) set fnord "$@" "$arg" ;;
|
||||||
|
esac
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
done
|
||||||
|
"$@"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||||
|
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||||
|
## (see the conditional assignment to $gccflag above).
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||||
|
## supported by the other compilers which use the 'gcc' depmode.
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The second -e expression handles DOS-style file names with drive
|
||||||
|
# letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the "deleted header file" problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
## Some versions of gcc put a space before the ':'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||||
|
## to the object. Take care to not repeat it in the output.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||||
|
| tr "$nl" ' ' >> "$depfile"
|
||||||
|
echo >> "$depfile"
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
xlc)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$base.u
|
||||||
|
tmpdepfile3=$dir.libs/$base.u
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.u
|
||||||
|
tmpdepfile2=$dir$base.u
|
||||||
|
tmpdepfile3=$dir$base.u
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
tcc)
|
||||||
|
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||||
|
# FIXME: That version still under development at the moment of writing.
|
||||||
|
# Make that this statement remains true also for stable, released
|
||||||
|
# versions.
|
||||||
|
# It will wrap lines (doesn't matter whether long or short) with a
|
||||||
|
# trailing '\', as in:
|
||||||
|
#
|
||||||
|
# foo.o : \
|
||||||
|
# foo.c \
|
||||||
|
# foo.h \
|
||||||
|
#
|
||||||
|
# It will put a trailing '\' even on the last line, and will use leading
|
||||||
|
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||||
|
# "Emit spaces for -MD").
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||||
|
# We have to change lines of the first kind to '$object: \'.
|
||||||
|
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||||
|
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||||
|
# dummy dependency, to avoid the deleted-header problem.
|
||||||
|
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
## The order of this option in the case statement is important, since the
|
||||||
|
## shell code in configure will try each of these formats in the order
|
||||||
|
## listed in this file. A plain '-MD' option would be understood by many
|
||||||
|
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||||
|
pgcc)
|
||||||
|
# Portland's C compiler understands '-MD'.
|
||||||
|
# Will always output deps to 'file.d' where file is the root name of the
|
||||||
|
# source file under compilation, even if file resides in a subdirectory.
|
||||||
|
# The object file name does not affect the name of the '.d' file.
|
||||||
|
# pgcc 10.2 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using '\' :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
set_dir_from "$object"
|
||||||
|
# Use the source, not the object, to determine the base name, since
|
||||||
|
# that's sadly what pgcc will do too.
|
||||||
|
set_base_from "$source"
|
||||||
|
tmpdepfile=$base.d
|
||||||
|
|
||||||
|
# For projects that build the same source file twice into different object
|
||||||
|
# files, the pgcc approach of using the *source* file root name can cause
|
||||||
|
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||||
|
# the same $tmpdepfile.
|
||||||
|
lockdir=$base.d-lock
|
||||||
|
trap "
|
||||||
|
echo '$0: caught signal, cleaning up...' >&2
|
||||||
|
rmdir '$lockdir'
|
||||||
|
exit 1
|
||||||
|
" 1 2 13 15
|
||||||
|
numtries=100
|
||||||
|
i=$numtries
|
||||||
|
while test $i -gt 0; do
|
||||||
|
# mkdir is a portable test-and-set.
|
||||||
|
if mkdir "$lockdir" 2>/dev/null; then
|
||||||
|
# This process acquired the lock.
|
||||||
|
"$@" -MD
|
||||||
|
stat=$?
|
||||||
|
# Release the lock.
|
||||||
|
rmdir "$lockdir"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
# If the lock is being held by a different process, wait
|
||||||
|
# until the winning process is done or we timeout.
|
||||||
|
while test -d "$lockdir" && test $i -gt 0; do
|
||||||
|
sleep 1
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
i=`expr $i - 1`
|
||||||
|
done
|
||||||
|
trap - 1 2 13 15
|
||||||
|
if test $i -le 0; then
|
||||||
|
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||||
|
echo "$0: check lockdir '$lockdir'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp2)
|
||||||
|
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||||
|
# compilers, which have integrated preprocessors. The correct option
|
||||||
|
# to use with these is +Maked; it writes dependencies to a file named
|
||||||
|
# 'foo.d', which lands next to the object file, wherever that
|
||||||
|
# happens to be.
|
||||||
|
# Much of this is similar to the tru64 case; see comments there.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir.libs/$base.d
|
||||||
|
"$@" -Wc,+Maked
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
"$@" +Maked
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||||
|
# Add 'dependent.h:' lines.
|
||||||
|
sed -ne '2,${
|
||||||
|
s/^ *//
|
||||||
|
s/ \\*$//
|
||||||
|
s/$/:/
|
||||||
|
p
|
||||||
|
}' "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
make_dummy_depfile
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in 'foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
set_dir_from "$object"
|
||||||
|
set_base_from "$object"
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||||
|
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||||
|
# in $dir$base.o.d. We have to check for both files, because
|
||||||
|
# one of the two compilations can be disabled. We should prefer
|
||||||
|
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||||
|
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||||
|
# the former would cause a distcleancheck panic.
|
||||||
|
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||||
|
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||||
|
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1=$dir$base.d
|
||||||
|
tmpdepfile2=$dir$base.d
|
||||||
|
tmpdepfile3=$dir$base.d
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||||
|
do
|
||||||
|
test -f "$tmpdepfile" && break
|
||||||
|
done
|
||||||
|
# Same post-processing that is required for AIX mode.
|
||||||
|
aix_post_process_depfile
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
showIncludes=-Wc,-showIncludes
|
||||||
|
else
|
||||||
|
showIncludes=-showIncludes
|
||||||
|
fi
|
||||||
|
"$@" $showIncludes > "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||||
|
if test $stat -ne 0; then
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
# The first sed program below extracts the file names and escapes
|
||||||
|
# backslashes for cygpath. The second sed program outputs the file
|
||||||
|
# name when reading, but also accumulates all include files in the
|
||||||
|
# hold buffer in order to output them again at the end. This only
|
||||||
|
# works with sed implementations that can handle large buffers.
|
||||||
|
sed < "$tmpdepfile" -n '
|
||||||
|
/^Note: including file: *\(.*\)/ {
|
||||||
|
s//\1/
|
||||||
|
s/\\/\\\\/g
|
||||||
|
p
|
||||||
|
}' | $cygpath_u | sort -u | sed -n '
|
||||||
|
s/ /\\ /g
|
||||||
|
s/\(.*\)/'"$tab"'\1 \\/p
|
||||||
|
s/.\(.*\) \\/\1:/
|
||||||
|
H
|
||||||
|
$ {
|
||||||
|
s/.*/'"$tab"'/
|
||||||
|
G
|
||||||
|
p
|
||||||
|
}' >> "$depfile"
|
||||||
|
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvc7msys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for ':'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
tr ' ' "$nl" < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no eat=no
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
if test $eat = yes; then
|
||||||
|
eat=no
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-arch)
|
||||||
|
eat=yes ;;
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
# makedepend may prepend the VPATH from the source file name to the object.
|
||||||
|
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||||
|
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed '1,2d' "$tmpdepfile" \
|
||||||
|
| tr ' ' "$nl" \
|
||||||
|
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||||
|
| sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove '-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E \
|
||||||
|
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||||
|
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test "X$1" != 'X--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E 2>/dev/null |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||||
|
echo "$tab" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvcmsys)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC0"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Alt-Svc
|
||||||
|
|
||||||
|
curl features support for the Alt-Svc: HTTP header.
|
||||||
|
|
||||||
|
## Enable Alt-Svc in build
|
||||||
|
|
||||||
|
`./configure --enable-alt-svc`
|
||||||
|
|
||||||
|
(enabled by default since 7.73.0)
|
||||||
|
|
||||||
|
## Standard
|
||||||
|
|
||||||
|
[RFC 7838](https://tools.ietf.org/html/rfc7838)
|
||||||
|
|
||||||
|
# Alt-Svc cache file format
|
||||||
|
|
||||||
|
This a text based file with one line per entry and each line consists of nine
|
||||||
|
space separated fields.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
h2 quic.tech 8443 h3-22 quic.tech 8443 "20190808 06:18:37" 0 0
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
1. The ALPN id for the source origin
|
||||||
|
2. The host name for the source origin
|
||||||
|
3. The port number for the source origin
|
||||||
|
4. The ALPN id for the destination host
|
||||||
|
5. The host name for the destination host
|
||||||
|
6. The host 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.
|
||||||
|
8. Boolean (1 or 0) if "persist" was set for this entry
|
||||||
|
9. Integer priority value (not currently used)
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
- handle multiple response headers, when one of them says `clear` (should
|
||||||
|
override them all)
|
||||||
|
- using `Age:` value for caching age as per spec
|
||||||
|
- `CURLALTSVC_IMMEDIATELY` support
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
libcurl bindings
|
||||||
|
================
|
||||||
|
|
||||||
|
Creative people have written bindings or interfaces for various environments
|
||||||
|
and programming languages. Using one of these allows you to take advantage of
|
||||||
|
curl powers from within your favourite language or system.
|
||||||
|
|
||||||
|
This is a list of all known interfaces as of this writing.
|
||||||
|
|
||||||
|
The bindings listed below are not part of the curl/libcurl distribution
|
||||||
|
archives, but must be downloaded and installed separately.
|
||||||
|
|
||||||
|
[Ada95](https://web.archive.org/web/20070403105909/www.almroth.com/adacurl/index.html) Written by Andreas Almroth
|
||||||
|
|
||||||
|
[Basic](http://scriptbasic.com/) ScriptBasic bindings written by Peter Verhas
|
||||||
|
|
||||||
|
C++: [curlpp](http://curlpp.org/) Written by Jean-Philippe Barrette-LaPierre,
|
||||||
|
[curlcpp](https://github.com/JosephP91/curlcpp) by Giuseppe Persico and [C++
|
||||||
|
Requests](https://github.com/whoshuu/cpr) by Huu Nguyen
|
||||||
|
|
||||||
|
[Ch](https://chcurl.sourceforge.io/) Written by Stephen Nestinger and Jonathan Rogado
|
||||||
|
|
||||||
|
Cocoa: [BBHTTP](https://github.com/brunodecarvalho/BBHTTP) written by Bruno de Carvalho
|
||||||
|
[curlhandle](https://github.com/karelia/curlhandle) Written by Dan Wood
|
||||||
|
|
||||||
|
Clojure: [clj-curl](https://github.com/lsevero/clj-curl) by Lucas Severo
|
||||||
|
|
||||||
|
[D](https://dlang.org/library/std/net/curl.html) Written by Kenneth Bogert
|
||||||
|
|
||||||
|
[Delphi](https://github.com/Mercury13/curl4delphi) Written by Mikhail Merkuryev
|
||||||
|
|
||||||
|
[Dylan](https://dylanlibs.sourceforge.io/) Written by Chris Double
|
||||||
|
|
||||||
|
[Eiffel](https://room.eiffel.com/library/curl) Written by Eiffel Software
|
||||||
|
|
||||||
|
[Euphoria](https://web.archive.org/web/20050204080544/rays-web.com/eulibcurl.htm) Written by Ray Smith
|
||||||
|
|
||||||
|
[Falcon](http://www.falconpl.org/index.ftd?page_id=prjs&prj_id=curl)
|
||||||
|
|
||||||
|
[Ferite](https://web.archive.org/web/20150102192018/ferite.org/) Written by Paul Querna
|
||||||
|
|
||||||
|
[Gambas](https://gambas.sourceforge.io/)
|
||||||
|
|
||||||
|
[glib/GTK+](https://web.archive.org/web/20100526203452/atterer.net/glibcurl) Written by Richard Atterer
|
||||||
|
|
||||||
|
Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang
|
||||||
|
|
||||||
|
[Guile](http://www.lonelycactus.com/guile-curl.html) Written by Michael L. Gran
|
||||||
|
|
||||||
|
[Harbour](https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl) Written by Viktor Szakáts
|
||||||
|
|
||||||
|
[Haskell](https://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl) Written by Galois, Inc
|
||||||
|
|
||||||
|
[Java](https://github.com/pjlegato/curl-java)
|
||||||
|
|
||||||
|
[Julia](https://github.com/forio/Curl.jl) Written by Paul Howe
|
||||||
|
|
||||||
|
[Kapito](https://github.com/puzza007/katipo) is an Erlang HTTP library around libcurl.
|
||||||
|
|
||||||
|
[Lisp](https://common-lisp.net/project/cl-curl/) Written by Liam Healy
|
||||||
|
|
||||||
|
Lua: [luacurl](http://luacurl.luaforge.net/) by Alexander Marinov, [Lua-cURL](https://github.com/Lua-cURL) by Jürgen Hötzel
|
||||||
|
|
||||||
|
[Mono](https://forge.novell.com/modules/xfmod/project/?libcurl-mono) Written by Jeffrey Phillips
|
||||||
|
|
||||||
|
[.NET](https://sourceforge.net/projects/libcurl-net/) libcurl-net by Jeffrey Phillips
|
||||||
|
|
||||||
|
[Nim](https://nimble.directory/pkg/libcurl) wrapper for libcurl
|
||||||
|
|
||||||
|
[node.js](https://github.com/JCMais/node-libcurl) node-libcurl by Jonathan Cardoso Machado
|
||||||
|
|
||||||
|
[Object-Pascal](https://web.archive.org/web/20020610214926/www.tekool.com/opcurl) Free Pascal, Delphi and Kylix binding written by Christophe Espern.
|
||||||
|
|
||||||
|
[OCaml](https://opam.ocaml.org/packages/ocurl/) Written by Lars Nilsson and ygrek
|
||||||
|
|
||||||
|
[Pascal](https://web.archive.org/web/20030804091414/houston.quik.com/jkp/curlpas/) Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer.
|
||||||
|
|
||||||
|
Perl: [WWW::Curl](https://github.com/szbalint/WWW--Curl) Maintained by Cris
|
||||||
|
Bailiff and Bálint Szilakszi,
|
||||||
|
[perl6-net-curl](https://github.com/azawawi/perl6-net-curl) by Ahmad M. Zawawi
|
||||||
|
[NET::Curl](https://metacpan.org/pod/Net::Curl) by Przemyslaw Iskra
|
||||||
|
|
||||||
|
[PHP](https://php.net/curl) Originally written by Sterling Hughes
|
||||||
|
|
||||||
|
[PostgreSQL](https://github.com/pramsey/pgsql-http) - HTTP client for PostgreSQL
|
||||||
|
|
||||||
|
[PureBasic](https://www.purebasic.com/documentation/http/index.html) uses libcurl in its "native" HTTP subsystem
|
||||||
|
|
||||||
|
[Python](http://pycurl.io/) PycURL by Kjetil Jacobsen
|
||||||
|
|
||||||
|
[R](https://cran.r-project.org/package=curl)
|
||||||
|
|
||||||
|
[Rexx](https://rexxcurl.sourceforge.io/) Written Mark Hessling
|
||||||
|
|
||||||
|
[Ring](https://ring-lang.sourceforge.io/doc1.3/libcurl.html) RingLibCurl by Mahmoud Fayed
|
||||||
|
|
||||||
|
RPG, support for ILE/RPG on OS/400 is included in source distribution
|
||||||
|
|
||||||
|
Ruby: [curb](https://github.com/taf2/curb) written by Ross Bamford
|
||||||
|
|
||||||
|
[Rust](https://github.com/carllerche/curl-rust) curl-rust - by Carl Lerche
|
||||||
|
|
||||||
|
[Scheme](https://www.metapaper.net/lisovsky/web/curl/) Bigloo binding by Kirill Lisovsky
|
||||||
|
|
||||||
|
[Scilab](https://help.scilab.org/docs/current/fr_FR/getURL.html) binding by Sylvestre Ledru
|
||||||
|
|
||||||
|
[S-Lang](https://www.jedsoft.org/slang/modules/curl.html) by John E Davis
|
||||||
|
|
||||||
|
[Smalltalk](http://www.squeaksource.com/CurlPlugin/) Written by Danil Osipchuk
|
||||||
|
|
||||||
|
[SP-Forth](https://sourceforge.net/p/spf/spf/ci/master/tree/devel/~ac/lib/lin/curl/) Written by Andrey Cherezov
|
||||||
|
|
||||||
|
[SPL](http://www.clifford.at/spl/) Written by Clifford Wolf
|
||||||
|
|
||||||
|
[Tcl](https://web.archive.org/web/20160826011806/mirror.yellow5.com/tclcurl/) Tclcurl by Andrés García
|
||||||
|
|
||||||
|
[Visual Basic](https://sourceforge.net/projects/libcurl-vb/) libcurl-vb by Jeffrey Phillips
|
||||||
|
|
||||||
|
[Visual Foxpro](https://web.archive.org/web/20130730181523/www.ctl32.com.ar/libcurl.asp) by Carlos Alloatti
|
||||||
|
|
||||||
|
[Q](https://q-lang.sourceforge.io/) The libcurl module is part of the default install
|
||||||
|
|
||||||
|
[wxWidgets](https://wxcode.sourceforge.io/components/wxcurl/) Written by Casey O'Donnell
|
||||||
|
|
||||||
|
[XBLite](https://web.archive.org/web/20060426150418/perso.wanadoo.fr/xblite/libraries.html) Written by David Szafranski
|
||||||
|
|
||||||
|
[Xojo](https://github.com/charonn0/RB-libcURL) Written by Andrew Lambert
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
# The curl bug bounty
|
||||||
|
|
||||||
|
The curl project runs a bug bounty program in association with
|
||||||
|
[HackerOne](https://www.hackerone.com) and the [Internet Bug
|
||||||
|
Bounty](https://internetbugbounty.org).
|
||||||
|
|
||||||
|
# How does it work?
|
||||||
|
|
||||||
|
Start out by posting your suspected security vulnerability directly to [curl's
|
||||||
|
HackerOne program](https://hackerone.com/curl).
|
||||||
|
|
||||||
|
After you have reported a security issue, it has been deemed credible, and a
|
||||||
|
patch and advisory has been made public, you may be eligible for a bounty from
|
||||||
|
this program.
|
||||||
|
|
||||||
|
See all details at [https://hackerone.com/curl](https://hackerone.com/curl)
|
||||||
|
|
||||||
|
This bounty is relying on funds from sponsors. If you use curl professionally,
|
||||||
|
consider help funding this! See
|
||||||
|
[https://opencollective.com/curl](https://opencollective.com/curl) for
|
||||||
|
details.
|
||||||
|
|
||||||
|
# What are the reward amounts?
|
||||||
|
|
||||||
|
The curl project offers monetary compensation for reported and published
|
||||||
|
security vulnerabilities. The amount of money that is rewarded depends on how
|
||||||
|
serious the flaw is determined to be.
|
||||||
|
|
||||||
|
We offer reward money *up to* a certain amount per severity. The curl security
|
||||||
|
team determines the severity of each reported flaw on a case by case basis and
|
||||||
|
the exact amount rewarded to the reporter is then decided.
|
||||||
|
|
||||||
|
Check out the current award amounts at [https://hackerone.com/curl](https://hackerone.com/curl)
|
||||||
|
|
||||||
|
# Who is eligible for a reward?
|
||||||
|
|
||||||
|
Everyone and anyone who reports a security problem in a released curl version
|
||||||
|
that hasn't already been reported can ask for a bounty.
|
||||||
|
|
||||||
|
Vulnerabilities in features that are off by default and documented as
|
||||||
|
experimental are not eligible for a reward.
|
||||||
|
|
||||||
|
The vulnerability has to be fixed and publicly announced (by the curl project)
|
||||||
|
before a bug bounty will be considered.
|
||||||
|
|
||||||
|
Bounties need to be requested within twelve months from the publication of the
|
||||||
|
vulnerability.
|
||||||
|
|
||||||
|
# Product vulnerabilities only
|
||||||
|
|
||||||
|
This bug bounty only concerns the curl and libcurl products and thus their
|
||||||
|
respective source codes - when running on existing hardware. It does not
|
||||||
|
include documentation, websites, or other infrastructure.
|
||||||
|
|
||||||
|
The curl security team is the sole arbiter if a reported flaw is subject to a
|
||||||
|
bounty or not.
|
||||||
|
|
||||||
|
# How are vulnerabilities graded?
|
||||||
|
|
||||||
|
The grading of each reported vulnerability that makes a reward claim will be
|
||||||
|
performed by the curl security team. The grading will be based on the CVSS
|
||||||
|
(Common Vulnerability Scoring System) 3.0.
|
||||||
|
|
||||||
|
# How are reward amounts determined?
|
||||||
|
|
||||||
|
The curl security team first gives the vulnerability a score, as mentioned
|
||||||
|
above, and based on that level we set an amount depending on the specifics of
|
||||||
|
the individual case. Other sponsors of the program might also get involved and
|
||||||
|
can raise the amounts depending on the particular issue.
|
||||||
|
|
||||||
|
# What happens if the bounty fund is drained?
|
||||||
|
|
||||||
|
The bounty fund depends on sponsors. If we pay out more bounties than we add,
|
||||||
|
the fund will eventually drain. If that end up happening, we will simply not
|
||||||
|
be able to pay out as high bounties as we would like and hope that we can
|
||||||
|
convince new sponsors to help us top up the fund again.
|
||||||
|
|
||||||
|
# Regarding taxes, etc. on the bounties
|
||||||
|
|
||||||
|
In the event that the individual receiving a curl bug bounty needs to pay
|
||||||
|
taxes on the reward money, the responsibility lies with the receiver. The
|
||||||
|
curl project or its security team never actually receive any of this money,
|
||||||
|
hold the money, or pay out the money.
|
||||||
|
|
||||||
|
## Bonus levels
|
||||||
|
|
||||||
|
In cooperation with [Dropbox](https://www.dropbox.com) the curl bug bounty can
|
||||||
|
offer the highest levels of rewards if the issue covers one of the interest
|
||||||
|
areas of theirs - and only if the bug is graded *high* or *critical*. A
|
||||||
|
non-exhaustive list of vulnerabilities Dropbox is interested in are:
|
||||||
|
|
||||||
|
- RCE
|
||||||
|
- URL parsing vulnerabilities with demonstrable security impact
|
||||||
|
|
||||||
|
Dropbox would generally hand out rewards for critical vulnerabilities ranging
|
||||||
|
from 12k-32k USD where RCE is on the upper end of the spectrum.
|
||||||
|
|
||||||
|
URL parsing vulnerabilities with demonstrable security impact might include
|
||||||
|
incorrectly determining the authority of a URL when a special character is
|
||||||
|
inserted into the path of the URL (as a hypothetical). This type of
|
||||||
|
vulnerability would likely yield 6k-12k unless further impact could be
|
||||||
|
demonstrated.
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
# BUGS
|
||||||
|
|
||||||
|
## There are still bugs
|
||||||
|
|
||||||
|
Curl and libcurl keep being developed. Adding features and changing code
|
||||||
|
means that bugs will sneak in, no matter how hard we try not to.
|
||||||
|
|
||||||
|
Of course there are lots of bugs left. And lots of misfeatures.
|
||||||
|
|
||||||
|
To help us make curl the stable and solid product we want it to be, we need
|
||||||
|
bug reports and bug fixes.
|
||||||
|
|
||||||
|
## Where to report
|
||||||
|
|
||||||
|
If you can't fix a bug yourself and submit a fix for it, try to report an as
|
||||||
|
detailed report as possible to a curl mailing list to allow one of us to have
|
||||||
|
a go at a solution. You can optionally also submit your problem in [curl's
|
||||||
|
bug tracking system](https://github.com/curl/curl/issues).
|
||||||
|
|
||||||
|
Please read the rest of this document below first before doing that!
|
||||||
|
|
||||||
|
If you feel you need to ask around first, find a suitable [mailing list](
|
||||||
|
https://curl.se/mail/) and post your questions there.
|
||||||
|
|
||||||
|
## Security bugs
|
||||||
|
|
||||||
|
If you find a bug or problem in curl or libcurl that you think has a security
|
||||||
|
impact, for example a bug that can put users in danger or make them
|
||||||
|
vulnerable if the bug becomes public knowledge, then please report that bug
|
||||||
|
using our security development process.
|
||||||
|
|
||||||
|
Security related bugs or bugs that are suspected to have a security impact,
|
||||||
|
should be reported on the [curl security tracker at
|
||||||
|
HackerOne](https://hackerone.com/curl).
|
||||||
|
|
||||||
|
This ensures that the report reaches the curl security team so that they
|
||||||
|
first can be deal with the report away from the public to minimize the harm
|
||||||
|
and impact it will have on existing users out there who might be using the
|
||||||
|
vulnerable versions.
|
||||||
|
|
||||||
|
The curl project's process for handling security related issues is
|
||||||
|
[documented separately](https://curl.se/dev/secprocess.html).
|
||||||
|
|
||||||
|
## What to report
|
||||||
|
|
||||||
|
When reporting a bug, you should include all information that will help us
|
||||||
|
understand what's wrong, what you expected to happen and how to repeat the
|
||||||
|
bad behavior. You therefore need to tell us:
|
||||||
|
|
||||||
|
- your operating system's name and version number
|
||||||
|
|
||||||
|
- what version of curl you're using (`curl -V` is fine)
|
||||||
|
|
||||||
|
- versions of the used libraries that libcurl is built to use
|
||||||
|
|
||||||
|
- what URL you were working with (if possible), at least which protocol
|
||||||
|
|
||||||
|
and anything and everything else you think matters. Tell us what you expected
|
||||||
|
to happen, tell use what did happen, tell us how you could make it work
|
||||||
|
another way. Dig around, try out, test. Then include all the tiny bits and
|
||||||
|
pieces in your report. You will benefit from this yourself, as it will enable
|
||||||
|
us to help you quicker and more accurately.
|
||||||
|
|
||||||
|
Since curl deals with networks, it often helps us if you include a protocol
|
||||||
|
debug dump with your bug report. The output you get by using the `-v` or
|
||||||
|
`--trace` options.
|
||||||
|
|
||||||
|
If curl crashed, causing a core dump (in unix), there is hardly any use to
|
||||||
|
send that huge file to anyone of us. Unless we have an exact same system
|
||||||
|
setup as you, we can't do much with it. Instead we ask you to get a stack
|
||||||
|
trace and send that (much smaller) output to us instead!
|
||||||
|
|
||||||
|
The address and how to subscribe to the mailing lists are detailed in the
|
||||||
|
`MANUAL.md` file.
|
||||||
|
|
||||||
|
## libcurl problems
|
||||||
|
|
||||||
|
When you've written your own application with libcurl to perform transfers,
|
||||||
|
it is even more important to be specific and detailed when reporting bugs.
|
||||||
|
|
||||||
|
Tell us the libcurl version and your operating system. Tell us the name and
|
||||||
|
version of all relevant sub-components like for example the SSL library
|
||||||
|
you're using and what name resolving your libcurl uses. If you use SFTP or
|
||||||
|
SCP, the libssh2 version is relevant etc.
|
||||||
|
|
||||||
|
Showing us a real source code example repeating your problem is the best way
|
||||||
|
to get our attention and it will greatly increase our chances to understand
|
||||||
|
your problem and to work on a fix (if we agree it truly is a problem).
|
||||||
|
|
||||||
|
Lots of problems that appear to be libcurl problems are actually just abuses
|
||||||
|
of the libcurl API or other malfunctions in your applications. It is advised
|
||||||
|
that you run your problematic program using a memory debug tool like valgrind
|
||||||
|
or similar before you post memory-related or "crashing" problems to us.
|
||||||
|
|
||||||
|
## Who will fix the problems
|
||||||
|
|
||||||
|
If the problems or bugs you describe are considered to be bugs, we want to
|
||||||
|
have the problems fixed.
|
||||||
|
|
||||||
|
There are no developers in the curl project that are paid to work on bugs.
|
||||||
|
All developers that take on reported bugs do this on a voluntary basis. We do
|
||||||
|
it out of an ambition to keep curl and libcurl excellent products and out of
|
||||||
|
pride.
|
||||||
|
|
||||||
|
But please do not assume that you can just lump over something to us and it
|
||||||
|
will then magically be fixed after some given time. Most often we need
|
||||||
|
feedback and help to understand what you've experienced and how to repeat a
|
||||||
|
problem. Then we may only be able to assist YOU to debug the problem and to
|
||||||
|
track down the proper fix.
|
||||||
|
|
||||||
|
We get reports from many people every month and each report can take a
|
||||||
|
considerable amount of time to really go to the bottom with.
|
||||||
|
|
||||||
|
## How to get a stack trace
|
||||||
|
|
||||||
|
First, you must make sure that you compile all sources with `-g` and that you
|
||||||
|
don't 'strip' the final executable. Try to avoid optimizing the code as well,
|
||||||
|
remove `-O`, `-O2` etc from the compiler options.
|
||||||
|
|
||||||
|
Run the program until it cores.
|
||||||
|
|
||||||
|
Run your debugger on the core file, like `<debugger> curl
|
||||||
|
core`. `<debugger>` should be replaced with the name of your debugger, in
|
||||||
|
most cases that will be `gdb`, but `dbx` and others also occur.
|
||||||
|
|
||||||
|
When the debugger has finished loading the core file and presents you a
|
||||||
|
prompt, enter `where` (without quotes) and press return.
|
||||||
|
|
||||||
|
The list that is presented is the stack trace. If everything worked, it is
|
||||||
|
supposed to contain the chain of functions that were called when curl
|
||||||
|
crashed. Include the stack trace with your detailed bug report. It'll help a
|
||||||
|
lot.
|
||||||
|
|
||||||
|
## Bugs in libcurl bindings
|
||||||
|
|
||||||
|
There will of course pop up bugs in libcurl bindings. You should then
|
||||||
|
primarily approach the team that works on that particular binding and see
|
||||||
|
what you can do to help them fix the problem.
|
||||||
|
|
||||||
|
If you suspect that the problem exists in the underlying libcurl, then please
|
||||||
|
convert your program over to plain C and follow the steps outlined above.
|
||||||
|
|
||||||
|
## Bugs in old versions
|
||||||
|
|
||||||
|
The curl project typically releases new versions every other month, and we
|
||||||
|
fix several hundred bugs per year. For a huge table of releases, number of
|
||||||
|
bug fixes and more, see: https://curl.se/docs/releases.html
|
||||||
|
|
||||||
|
The developers in the curl project do not have bandwidth or energy enough to
|
||||||
|
maintain several branches or to spend much time on hunting down problems in
|
||||||
|
old versions when chances are we already fixed them or at least that they've
|
||||||
|
changed nature and appearance in later versions.
|
||||||
|
|
||||||
|
When you experience a problem and want to report it, you really SHOULD
|
||||||
|
include the version number of the curl you're using when you experience the
|
||||||
|
issue. If that version number shows us that you're using an out-of-date curl,
|
||||||
|
you should also try out a modern curl version to see if the problem persists
|
||||||
|
or how/if it has changed in appearance.
|
||||||
|
|
||||||
|
Even if you cannot immediately upgrade your application/system to run the
|
||||||
|
latest curl version, you can most often at least run a test version or
|
||||||
|
experimental build or similar, to get this confirmed or not.
|
||||||
|
|
||||||
|
At times people insist that they cannot upgrade to a modern curl version, but
|
||||||
|
instead they "just want the bug fixed". That's fine, just don't count on us
|
||||||
|
spending many cycles on trying to identify which single commit, if that's
|
||||||
|
even possible, that at some point in the past fixed the problem you're now
|
||||||
|
experiencing.
|
||||||
|
|
||||||
|
Security wise, it is almost always a bad idea to lag behind the current curl
|
||||||
|
versions by a lot. We keeping discovering and reporting security problems
|
||||||
|
over time see you can see in [this
|
||||||
|
table](https://curl.se/docs/vulnerabilities.html)
|
||||||
|
|
||||||
|
# Bug fixing procedure
|
||||||
|
|
||||||
|
## What happens on first filing
|
||||||
|
|
||||||
|
When a new issue is posted in the issue tracker or on the mailing list, the
|
||||||
|
team of developers first need to see the report. Maybe they took the day off,
|
||||||
|
maybe they're off in the woods hunting. Have patience. Allow at least a few
|
||||||
|
days before expecting someone to have responded.
|
||||||
|
|
||||||
|
In the issue tracker you can expect that some labels will be set on the issue
|
||||||
|
to help categorize it.
|
||||||
|
|
||||||
|
## First response
|
||||||
|
|
||||||
|
If your issue/bug report wasn't perfect at once (and few are), chances are
|
||||||
|
that someone will ask follow-up questions. Which version did you use? Which
|
||||||
|
options did you use? How often does the problem occur? How can we reproduce
|
||||||
|
this problem? Which protocols does it involve? Or perhaps much more specific
|
||||||
|
and deep diving questions. It all depends on your specific issue.
|
||||||
|
|
||||||
|
You should then respond to these follow-up questions and provide more info
|
||||||
|
about the problem, so that we can help you figure it out. Or maybe you can
|
||||||
|
help us figure it out. An active back-and-forth communication is important
|
||||||
|
and the key for finding a cure and landing a fix.
|
||||||
|
|
||||||
|
## Not reproducible
|
||||||
|
|
||||||
|
For problems that we can't reproduce and can't understand even after having
|
||||||
|
gotten all the info we need and having studied the source code over again,
|
||||||
|
are really hard to solve so then we may require further work from you who
|
||||||
|
actually see or experience the problem.
|
||||||
|
|
||||||
|
## Unresponsive
|
||||||
|
|
||||||
|
If the problem haven't been understood or reproduced, and there's nobody
|
||||||
|
responding to follow-up questions or questions asking for clarifications or
|
||||||
|
for discussing possible ways to move forward with the task, we take that as a
|
||||||
|
strong suggestion that the bug is not important.
|
||||||
|
|
||||||
|
Unimportant issues will be closed as inactive sooner or later as they can't
|
||||||
|
be fixed. The inactivity period (waiting for responses) should not be shorter
|
||||||
|
than two weeks but may extend months.
|
||||||
|
|
||||||
|
## Lack of time/interest
|
||||||
|
|
||||||
|
Bugs that are filed and are understood can unfortunately end up in the
|
||||||
|
"nobody cares enough about it to work on it" category. Such bugs are
|
||||||
|
perfectly valid problems that *should* get fixed but apparently aren't. We
|
||||||
|
try to mark such bugs as `KNOWN_BUGS material` after a time of inactivity and
|
||||||
|
if no activity is noticed after yet some time those bugs are added to
|
||||||
|
`KNOWN_BUGS` and are closed in the issue tracker.
|
||||||
|
|
||||||
|
## `KNOWN_BUGS`
|
||||||
|
|
||||||
|
This is a list of known bugs. Bugs we know exist and that have been pointed
|
||||||
|
out but that haven't yet been fixed. The reasons for why they haven't been
|
||||||
|
fixed can involve anything really, but the primary reason is that nobody has
|
||||||
|
considered these problems to be important enough to spend the necessary time
|
||||||
|
and effort to have them fixed.
|
||||||
|
|
||||||
|
The `KNOWN_BUGS` are always up for grabs and we will always love the ones who
|
||||||
|
bring one of them back to live and offers solutions to them.
|
||||||
|
|
||||||
|
The `KNOWN_BUGS` document has a sibling document known as `TODO`.
|
||||||
|
|
||||||
|
## `TODO`
|
||||||
|
|
||||||
|
Issues that are filed or reported that aren't really bugs but more missing
|
||||||
|
features or ideas for future improvements and so on are marked as
|
||||||
|
'enhancement' or 'feature-request' and will be added to the `TODO` document
|
||||||
|
instead and the issue is closed. We don't keep TODO items in the issue
|
||||||
|
tracker.
|
||||||
|
|
||||||
|
The `TODO` document is full of ideas and suggestions of what we can add or
|
||||||
|
fix one day. You're always encouraged and free to grab one of those items and
|
||||||
|
take up a discussion with the curl development team on how that could be
|
||||||
|
implemented or provided in the project so that you can work on ticking it odd
|
||||||
|
that document.
|
||||||
|
|
||||||
|
If the issue is rather a bug and not a missing feature or functionality, it
|
||||||
|
is listed in `KNOWN_BUGS` instead.
|
||||||
|
|
||||||
|
## Closing off stalled bugs
|
||||||
|
|
||||||
|
The [issue and pull request trackers](https://github.com/curl/curl) only
|
||||||
|
holds "active" entries open (using a non-precise definition of what active
|
||||||
|
actually is, but they're at least not completely dead). Those that are
|
||||||
|
abandoned or in other ways dormant will be closed and sometimes added to
|
||||||
|
`TODO` and `KNOWN_BUGS` instead.
|
||||||
|
|
||||||
|
This way, we only have "active" issues open on github. Irrelevant issues and
|
||||||
|
pull requests will not distract developers or casual visitors.
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
# checksrc
|
||||||
|
|
||||||
|
This is the tool we use within the curl project to scan C source code and
|
||||||
|
check that it adheres to our [Source Code Style guide](CODE_STYLE.md).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
checksrc.pl [options] [file1] [file2] ...
|
||||||
|
|
||||||
|
## Command line options
|
||||||
|
|
||||||
|
`-W[file]` skip that file and excludes it from being checked. Helpful
|
||||||
|
when, for example, one of the files is generated.
|
||||||
|
|
||||||
|
`-D[dir]` directory name to prepend to file names when accessing them.
|
||||||
|
|
||||||
|
`-h` shows the help output, that also lists all recognized warnings
|
||||||
|
|
||||||
|
## What does checksrc warn for?
|
||||||
|
|
||||||
|
checksrc does not check and verify the code against the entire style guide,
|
||||||
|
but the script is instead an effort to detect the most common mistakes and
|
||||||
|
syntax mistakes that contributors make before they get accustomed to our code
|
||||||
|
style. Heck, many of us regulars do the mistakes too and this script helps us
|
||||||
|
keep the code in shape.
|
||||||
|
|
||||||
|
checksrc.pl -h
|
||||||
|
|
||||||
|
Lists how to use the script and it lists all existing warnings it has and
|
||||||
|
problems it detects. At the time of this writing, the existing checksrc
|
||||||
|
warnings are:
|
||||||
|
|
||||||
|
- `ASSIGNWITHINCONDITION`: Assignment within a conditional expression. The
|
||||||
|
code style mandates the assignment to be done outside of it.
|
||||||
|
|
||||||
|
- `ASTERISKNOSPACE`: A pointer was declared like `char* name` instead of the more
|
||||||
|
appropriate `char *name` style. The asterisk should sit next to the name.
|
||||||
|
|
||||||
|
- `ASTERISKSPACE`: A pointer was declared like `char * name` instead of the
|
||||||
|
more appropriate `char *name` style. The asterisk should sit right next to
|
||||||
|
the name without a space in between.
|
||||||
|
|
||||||
|
- `BADCOMMAND`: There's a bad !checksrc! instruction in the code. See the
|
||||||
|
**Ignore certain warnings** section below for details.
|
||||||
|
|
||||||
|
- `BANNEDFUNC`: A banned function was used. The functions sprintf, vsprintf,
|
||||||
|
strcat, strncat, gets are **never** allowed in curl source code.
|
||||||
|
|
||||||
|
- `BRACEELSE`: '} else' on the same line. The else is supposed to be on the
|
||||||
|
following line.
|
||||||
|
|
||||||
|
- `BRACEPOS`: wrong position for an open brace (`{`).
|
||||||
|
|
||||||
|
- `COMMANOSPACE`: a comma without following space
|
||||||
|
|
||||||
|
- `COPYRIGHT`: the file is missing a copyright statement!
|
||||||
|
|
||||||
|
- `CPPCOMMENTS`: `//` comment detected, that's not C89 compliant
|
||||||
|
|
||||||
|
- `FOPENMODE`: `fopen()` needs a macro for the mode string, use it
|
||||||
|
|
||||||
|
- `INDENTATION`: detected a wrong start column for code. Note that this
|
||||||
|
warning only checks some specific places and will certainly miss many bad
|
||||||
|
indentations.
|
||||||
|
|
||||||
|
- `LONGLINE`: A line is longer than 79 columns.
|
||||||
|
|
||||||
|
- `MULTISPACE`: Multiple spaces were found where only one should be used.
|
||||||
|
|
||||||
|
- `NOSPACEEQUALS`: An equals sign was found without preceding space. We prefer
|
||||||
|
`a = 2` and *not* `a=2`.
|
||||||
|
|
||||||
|
- `ONELINECONDITION`: do not put the conditional block on the same line as `if()`
|
||||||
|
|
||||||
|
- `OPENCOMMENT`: File ended with a comment (`/*`) still "open".
|
||||||
|
|
||||||
|
- `PARENBRACE`: `){` was used without sufficient space in between.
|
||||||
|
|
||||||
|
- `RETURNNOSPACE`: `return` was used without space between the keyword and the
|
||||||
|
following value.
|
||||||
|
|
||||||
|
- `SEMINOSPACE`: There was no space (or newline) following a semicolon.
|
||||||
|
|
||||||
|
- `SIZEOFNOPAREN`: Found use of sizeof without parentheses. We prefer
|
||||||
|
`sizeof(int)` style.
|
||||||
|
|
||||||
|
- `SNPRINTF` - Found use of `snprintf()`. Since we use an internal replacement
|
||||||
|
with a different return code etc, we prefer `msnprintf()`.
|
||||||
|
|
||||||
|
- `SPACEAFTERPAREN`: there was a space after open parenthesis, `( text`.
|
||||||
|
|
||||||
|
- `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`.
|
||||||
|
|
||||||
|
- `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`.
|
||||||
|
|
||||||
|
- `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`,
|
||||||
|
where one was not expected
|
||||||
|
|
||||||
|
- `SPACESEMICOLON`: there was a space before semicolon, ` ;`.
|
||||||
|
|
||||||
|
- `TABS`: TAB characters are not allowed!
|
||||||
|
|
||||||
|
- `TRAILINGSPACE`: Trailing whitespace on the line
|
||||||
|
|
||||||
|
- `TYPEDEFSTRUCT`: we frown upon (most) typedefed structs
|
||||||
|
|
||||||
|
- `UNUSEDIGNORE`: a checksrc inlined warning ignore was asked for but not used,
|
||||||
|
that's an ignore that should be removed or changed to get used.
|
||||||
|
|
||||||
|
### Extended warnings
|
||||||
|
|
||||||
|
Some warnings are quite computationally expensive to perform, so they are
|
||||||
|
turned off by default. To enable these warnings, place a `.checksrc` file in
|
||||||
|
the directory where they should be activated with commands to enable the
|
||||||
|
warnings you are interested in. The format of the file is to enable one
|
||||||
|
warning per line like so: `enable <EXTENDEDWARNING>`
|
||||||
|
|
||||||
|
Currently there is one extended warning which can be enabled:
|
||||||
|
|
||||||
|
- `COPYRIGHTYEAR`: the current changeset hasn't updated the copyright year in
|
||||||
|
the source file
|
||||||
|
|
||||||
|
## Ignore certain warnings
|
||||||
|
|
||||||
|
Due to the nature of the source code and the flaws of the checksrc tool, there
|
||||||
|
is sometimes a need to ignore specific warnings. checksrc allows a few
|
||||||
|
different ways to do this.
|
||||||
|
|
||||||
|
### Inline ignore
|
||||||
|
|
||||||
|
You can control what to ignore within a specific source file by providing
|
||||||
|
instructions to checksrc in the source code itself. You need a magic marker
|
||||||
|
that is `!checksrc!` followed by the instruction. The instruction can ask to
|
||||||
|
ignore a specific warning N number of times or you ignore all of them until
|
||||||
|
you mark the end of the ignored section.
|
||||||
|
|
||||||
|
Inline ignores are only done for that single specific source code file.
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
/* !checksrc! disable LONGLINE all */
|
||||||
|
|
||||||
|
This will ignore the warning for overly long lines until it is re-enabled with:
|
||||||
|
|
||||||
|
/* !checksrc! enable LONGLINE */
|
||||||
|
|
||||||
|
If the enabling isn't performed before the end of the file, it will be enabled
|
||||||
|
automatically for the next file.
|
||||||
|
|
||||||
|
You can also opt to ignore just N violations so that if you have a single long
|
||||||
|
line you just can't shorten and is agreed to be fine anyway:
|
||||||
|
|
||||||
|
/* !checksrc! disable LONGLINE 1 */
|
||||||
|
|
||||||
|
... and the warning for long lines will be enabled again automatically after
|
||||||
|
it has ignored that single warning. The number `1` can of course be changed to
|
||||||
|
any other integer number. It can be used to make sure only the exact intended
|
||||||
|
instances are ignored and nothing extra.
|
||||||
|
|
||||||
|
### Directory wide ignore patterns
|
||||||
|
|
||||||
|
This is a method we've transitioned away from. Use inline ignores as far as
|
||||||
|
possible.
|
||||||
|
|
||||||
|
Make a `checksrc.skip` file in the directory of the source code with the
|
||||||
|
false positive, and include the full offending line into this file.
|
||||||
@@ -0,0 +1,516 @@
|
|||||||
|
# Ciphers
|
||||||
|
|
||||||
|
With curl's options
|
||||||
|
[`CURLOPT_SSL_CIPHER_LIST`](https://curl.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html)
|
||||||
|
and
|
||||||
|
[`--ciphers`](https://curl.se/docs/manpage.html#--ciphers)
|
||||||
|
users can control which ciphers to consider when negotiating TLS connections.
|
||||||
|
|
||||||
|
TLS 1.3 ciphers are supported since curl 7.61 for OpenSSL 1.1.1+ with options
|
||||||
|
[`CURLOPT_TLS13_CIPHERS`](https://curl.se/libcurl/c/CURLOPT_TLS13_CIPHERS.html)
|
||||||
|
and
|
||||||
|
[`--tls13-ciphers`](https://curl.se/docs/manpage.html#--tls13-ciphers)
|
||||||
|
. If you are using a different SSL backend you can try setting TLS 1.3 cipher
|
||||||
|
suites by using the respective regular cipher option.
|
||||||
|
|
||||||
|
The names of the known ciphers differ depending on which TLS backend that
|
||||||
|
libcurl was built to use. This is an attempt to list known cipher names.
|
||||||
|
|
||||||
|
## OpenSSL
|
||||||
|
|
||||||
|
(based on [OpenSSL docs](https://www.openssl.org/docs/man1.1.0/apps/ciphers.html))
|
||||||
|
|
||||||
|
When specifying multiple cipher names, separate them with colon (`:`).
|
||||||
|
|
||||||
|
### SSL3 cipher suites
|
||||||
|
|
||||||
|
`NULL-MD5`
|
||||||
|
`NULL-SHA`
|
||||||
|
`RC4-MD5`
|
||||||
|
`RC4-SHA`
|
||||||
|
`IDEA-CBC-SHA`
|
||||||
|
`DES-CBC3-SHA`
|
||||||
|
`DH-DSS-DES-CBC3-SHA`
|
||||||
|
`DH-RSA-DES-CBC3-SHA`
|
||||||
|
`DHE-DSS-DES-CBC3-SHA`
|
||||||
|
`DHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ADH-RC4-MD5`
|
||||||
|
`ADH-DES-CBC3-SHA`
|
||||||
|
|
||||||
|
### TLS v1.0 cipher suites
|
||||||
|
|
||||||
|
`NULL-MD5`
|
||||||
|
`NULL-SHA`
|
||||||
|
`RC4-MD5`
|
||||||
|
`RC4-SHA`
|
||||||
|
`IDEA-CBC-SHA`
|
||||||
|
`DES-CBC3-SHA`
|
||||||
|
`DHE-DSS-DES-CBC3-SHA`
|
||||||
|
`DHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ADH-RC4-MD5`
|
||||||
|
`ADH-DES-CBC3-SHA`
|
||||||
|
|
||||||
|
### AES ciphersuites from RFC3268, extending TLS v1.0
|
||||||
|
|
||||||
|
`AES128-SHA`
|
||||||
|
`AES256-SHA`
|
||||||
|
`DH-DSS-AES128-SHA`
|
||||||
|
`DH-DSS-AES256-SHA`
|
||||||
|
`DH-RSA-AES128-SHA`
|
||||||
|
`DH-RSA-AES256-SHA`
|
||||||
|
`DHE-DSS-AES128-SHA`
|
||||||
|
`DHE-DSS-AES256-SHA`
|
||||||
|
`DHE-RSA-AES128-SHA`
|
||||||
|
`DHE-RSA-AES256-SHA`
|
||||||
|
`ADH-AES128-SHA`
|
||||||
|
`ADH-AES256-SHA`
|
||||||
|
|
||||||
|
### SEED ciphersuites from RFC4162, extending TLS v1.0
|
||||||
|
|
||||||
|
`SEED-SHA`
|
||||||
|
`DH-DSS-SEED-SHA`
|
||||||
|
`DH-RSA-SEED-SHA`
|
||||||
|
`DHE-DSS-SEED-SHA`
|
||||||
|
`DHE-RSA-SEED-SHA`
|
||||||
|
`ADH-SEED-SHA`
|
||||||
|
|
||||||
|
### GOST ciphersuites, extending TLS v1.0
|
||||||
|
|
||||||
|
`GOST94-GOST89-GOST89`
|
||||||
|
`GOST2001-GOST89-GOST89`
|
||||||
|
`GOST94-NULL-GOST94`
|
||||||
|
`GOST2001-NULL-GOST94`
|
||||||
|
|
||||||
|
### Elliptic curve cipher suites
|
||||||
|
|
||||||
|
`ECDHE-RSA-NULL-SHA`
|
||||||
|
`ECDHE-RSA-RC4-SHA`
|
||||||
|
`ECDHE-RSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-RSA-AES128-SHA`
|
||||||
|
`ECDHE-RSA-AES256-SHA`
|
||||||
|
`ECDHE-ECDSA-NULL-SHA`
|
||||||
|
`ECDHE-ECDSA-RC4-SHA`
|
||||||
|
`ECDHE-ECDSA-DES-CBC3-SHA`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA`
|
||||||
|
`AECDH-NULL-SHA`
|
||||||
|
`AECDH-RC4-SHA`
|
||||||
|
`AECDH-DES-CBC3-SHA`
|
||||||
|
`AECDH-AES128-SHA`
|
||||||
|
`AECDH-AES256-SHA`
|
||||||
|
|
||||||
|
### TLS v1.2 cipher suites
|
||||||
|
|
||||||
|
`NULL-SHA256`
|
||||||
|
`AES128-SHA256`
|
||||||
|
`AES256-SHA256`
|
||||||
|
`AES128-GCM-SHA256`
|
||||||
|
`AES256-GCM-SHA384`
|
||||||
|
`DH-RSA-AES128-SHA256`
|
||||||
|
`DH-RSA-AES256-SHA256`
|
||||||
|
`DH-RSA-AES128-GCM-SHA256`
|
||||||
|
`DH-RSA-AES256-GCM-SHA384`
|
||||||
|
`DH-DSS-AES128-SHA256`
|
||||||
|
`DH-DSS-AES256-SHA256`
|
||||||
|
`DH-DSS-AES128-GCM-SHA256`
|
||||||
|
`DH-DSS-AES256-GCM-SHA384`
|
||||||
|
`DHE-RSA-AES128-SHA256`
|
||||||
|
`DHE-RSA-AES256-SHA256`
|
||||||
|
`DHE-RSA-AES128-GCM-SHA256`
|
||||||
|
`DHE-RSA-AES256-GCM-SHA384`
|
||||||
|
`DHE-DSS-AES128-SHA256`
|
||||||
|
`DHE-DSS-AES256-SHA256`
|
||||||
|
`DHE-DSS-AES128-GCM-SHA256`
|
||||||
|
`DHE-DSS-AES256-GCM-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-SHA384`
|
||||||
|
`ECDHE-RSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-RSA-AES256-GCM-SHA384`
|
||||||
|
`ECDHE-ECDSA-AES128-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-SHA384`
|
||||||
|
`ECDHE-ECDSA-AES128-GCM-SHA256`
|
||||||
|
`ECDHE-ECDSA-AES256-GCM-SHA384`
|
||||||
|
`ADH-AES128-SHA256`
|
||||||
|
`ADH-AES256-SHA256`
|
||||||
|
`ADH-AES128-GCM-SHA256`
|
||||||
|
`ADH-AES256-GCM-SHA384`
|
||||||
|
`AES128-CCM`
|
||||||
|
`AES256-CCM`
|
||||||
|
`DHE-RSA-AES128-CCM`
|
||||||
|
`DHE-RSA-AES256-CCM`
|
||||||
|
`AES128-CCM8`
|
||||||
|
`AES256-CCM8`
|
||||||
|
`DHE-RSA-AES128-CCM8`
|
||||||
|
`DHE-RSA-AES256-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM`
|
||||||
|
`ECDHE-ECDSA-AES128-CCM8`
|
||||||
|
`ECDHE-ECDSA-AES256-CCM8`
|
||||||
|
|
||||||
|
### Camellia HMAC-Based ciphersuites from RFC6367, extending TLS v1.2
|
||||||
|
|
||||||
|
`ECDHE-ECDSA-CAMELLIA128-SHA256`
|
||||||
|
`ECDHE-ECDSA-CAMELLIA256-SHA384`
|
||||||
|
`ECDHE-RSA-CAMELLIA128-SHA256`
|
||||||
|
`ECDHE-RSA-CAMELLIA256-SHA384`
|
||||||
|
|
||||||
|
### TLS 1.3 cipher suites
|
||||||
|
|
||||||
|
(Note these ciphers are set with `CURLOPT_TLS13_CIPHERS` and `--tls13-ciphers`)
|
||||||
|
|
||||||
|
`TLS_AES_256_GCM_SHA384`
|
||||||
|
`TLS_CHACHA20_POLY1305_SHA256`
|
||||||
|
`TLS_AES_128_GCM_SHA256`
|
||||||
|
`TLS_AES_128_CCM_8_SHA256`
|
||||||
|
`TLS_AES_128_CCM_SHA256`
|
||||||
|
|
||||||
|
## NSS
|
||||||
|
|
||||||
|
### Totally insecure
|
||||||
|
|
||||||
|
`rc4`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4export`
|
||||||
|
`rc2`
|
||||||
|
`rc2export`
|
||||||
|
`des`
|
||||||
|
`desede3`
|
||||||
|
|
||||||
|
### SSL3/TLS cipher suites
|
||||||
|
|
||||||
|
`rsa_rc4_128_md5`
|
||||||
|
`rsa_rc4_128_sha`
|
||||||
|
`rsa_3des_sha`
|
||||||
|
`rsa_des_sha`
|
||||||
|
`rsa_rc4_40_md5`
|
||||||
|
`rsa_rc2_40_md5`
|
||||||
|
`rsa_null_md5`
|
||||||
|
`rsa_null_sha`
|
||||||
|
`fips_3des_sha`
|
||||||
|
`fips_des_sha`
|
||||||
|
`fortezza`
|
||||||
|
`fortezza_rc4_128_sha`
|
||||||
|
`fortezza_null`
|
||||||
|
|
||||||
|
### TLS 1.0 Exportable 56-bit Cipher Suites
|
||||||
|
|
||||||
|
`rsa_des_56_sha`
|
||||||
|
`rsa_rc4_56_sha`
|
||||||
|
|
||||||
|
### AES ciphers
|
||||||
|
|
||||||
|
`dhe_dss_aes_128_cbc_sha`
|
||||||
|
`dhe_dss_aes_256_cbc_sha`
|
||||||
|
`dhe_rsa_aes_128_cbc_sha`
|
||||||
|
`dhe_rsa_aes_256_cbc_sha`
|
||||||
|
`rsa_aes_128_sha`
|
||||||
|
`rsa_aes_256_sha`
|
||||||
|
|
||||||
|
### ECC ciphers
|
||||||
|
|
||||||
|
`ecdh_ecdsa_null_sha`
|
||||||
|
`ecdh_ecdsa_rc4_128_sha`
|
||||||
|
`ecdh_ecdsa_3des_sha`
|
||||||
|
`ecdh_ecdsa_aes_128_sha`
|
||||||
|
`ecdh_ecdsa_aes_256_sha`
|
||||||
|
`ecdhe_ecdsa_null_sha`
|
||||||
|
`ecdhe_ecdsa_rc4_128_sha`
|
||||||
|
`ecdhe_ecdsa_3des_sha`
|
||||||
|
`ecdhe_ecdsa_aes_128_sha`
|
||||||
|
`ecdhe_ecdsa_aes_256_sha`
|
||||||
|
`ecdh_rsa_null_sha`
|
||||||
|
`ecdh_rsa_128_sha`
|
||||||
|
`ecdh_rsa_3des_sha`
|
||||||
|
`ecdh_rsa_aes_128_sha`
|
||||||
|
`ecdh_rsa_aes_256_sha`
|
||||||
|
`ecdhe_rsa_null`
|
||||||
|
`ecdhe_rsa_rc4_128_sha`
|
||||||
|
`ecdhe_rsa_3des_sha`
|
||||||
|
`ecdhe_rsa_aes_128_sha`
|
||||||
|
`ecdhe_rsa_aes_256_sha`
|
||||||
|
`ecdh_anon_null_sha`
|
||||||
|
`ecdh_anon_rc4_128sha`
|
||||||
|
`ecdh_anon_3des_sha`
|
||||||
|
`ecdh_anon_aes_128_sha`
|
||||||
|
`ecdh_anon_aes_256_sha`
|
||||||
|
|
||||||
|
### HMAC-SHA256 cipher suites
|
||||||
|
|
||||||
|
`rsa_null_sha_256`
|
||||||
|
`rsa_aes_128_cbc_sha_256`
|
||||||
|
`rsa_aes_256_cbc_sha_256`
|
||||||
|
`dhe_rsa_aes_128_cbc_sha_256`
|
||||||
|
`dhe_rsa_aes_256_cbc_sha_256`
|
||||||
|
`ecdhe_ecdsa_aes_128_cbc_sha_256`
|
||||||
|
`ecdhe_rsa_aes_128_cbc_sha_256`
|
||||||
|
|
||||||
|
### AES GCM cipher suites in RFC 5288 and RFC 5289
|
||||||
|
|
||||||
|
`rsa_aes_128_gcm_sha_256`
|
||||||
|
`dhe_rsa_aes_128_gcm_sha_256`
|
||||||
|
`dhe_dss_aes_128_gcm_sha_256`
|
||||||
|
`ecdhe_ecdsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdh_ecdsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdhe_rsa_aes_128_gcm_sha_256`
|
||||||
|
`ecdh_rsa_aes_128_gcm_sha_256`
|
||||||
|
|
||||||
|
### cipher suites using SHA384
|
||||||
|
|
||||||
|
`rsa_aes_256_gcm_sha_384`
|
||||||
|
`dhe_rsa_aes_256_gcm_sha_384`
|
||||||
|
`dhe_dss_aes_256_gcm_sha_384`
|
||||||
|
`ecdhe_ecdsa_aes_256_sha_384`
|
||||||
|
`ecdhe_rsa_aes_256_sha_384`
|
||||||
|
`ecdhe_ecdsa_aes_256_gcm_sha_384`
|
||||||
|
`ecdhe_rsa_aes_256_gcm_sha_384`
|
||||||
|
|
||||||
|
### chacha20-poly1305 cipher suites
|
||||||
|
|
||||||
|
`ecdhe_rsa_chacha20_poly1305_sha_256`
|
||||||
|
`ecdhe_ecdsa_chacha20_poly1305_sha_256`
|
||||||
|
`dhe_rsa_chacha20_poly1305_sha_256`
|
||||||
|
|
||||||
|
### TLS 1.3 cipher suites
|
||||||
|
|
||||||
|
`aes_128_gcm_sha_256`
|
||||||
|
`aes_256_gcm_sha_384`
|
||||||
|
`chacha20_poly1305_sha_256`
|
||||||
|
|
||||||
|
## GSKit
|
||||||
|
|
||||||
|
Ciphers are internally defined as
|
||||||
|
[numeric codes](https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/apis/gsk_attribute_set_buffer.htm),
|
||||||
|
but libcurl maps them to the following case-insensitive names.
|
||||||
|
|
||||||
|
### SSL2 cipher suites (insecure: disabled by default)
|
||||||
|
|
||||||
|
`rc2-md5`
|
||||||
|
`rc4-md5`
|
||||||
|
`exp-rc2-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`des-cbc-md5`
|
||||||
|
`des-cbc3-md5`
|
||||||
|
|
||||||
|
### SSL3 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-rc2-cbc-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
|
||||||
|
### TLS v1.0 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-rc2-cbc-md5`
|
||||||
|
`exp-rc4-md5`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
|
||||||
|
### TLS v1.1 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`exp-des-cbc-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
|
||||||
|
### TLS v1.2 cipher suites
|
||||||
|
|
||||||
|
`null-md5`
|
||||||
|
`null-sha`
|
||||||
|
`null-sha256`
|
||||||
|
`rc4-md5`
|
||||||
|
`rc4-sha`
|
||||||
|
`des-cbc3-sha`
|
||||||
|
`aes128-sha`
|
||||||
|
`aes256-sha`
|
||||||
|
`aes128-sha256`
|
||||||
|
`aes256-sha256`
|
||||||
|
`aes128-gcm-sha256`
|
||||||
|
`aes256-gcm-sha384`
|
||||||
|
|
||||||
|
## WolfSSL
|
||||||
|
|
||||||
|
`RC4-SHA`,
|
||||||
|
`RC4-MD5`,
|
||||||
|
`DES-CBC3-SHA`,
|
||||||
|
`AES128-SHA`,
|
||||||
|
`AES256-SHA`,
|
||||||
|
`NULL-SHA`,
|
||||||
|
`NULL-SHA256`,
|
||||||
|
`DHE-RSA-AES128-SHA`,
|
||||||
|
`DHE-RSA-AES256-SHA`,
|
||||||
|
`DHE-PSK-AES256-GCM-SHA384`,
|
||||||
|
`DHE-PSK-AES128-GCM-SHA256`,
|
||||||
|
`PSK-AES256-GCM-SHA384`,
|
||||||
|
`PSK-AES128-GCM-SHA256`,
|
||||||
|
`DHE-PSK-AES256-CBC-SHA384`,
|
||||||
|
`DHE-PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-AES256-CBC-SHA384`,
|
||||||
|
`PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-AES128-CBC-SHA`,
|
||||||
|
`PSK-AES256-CBC-SHA`,
|
||||||
|
`DHE-PSK-AES128-CCM`,
|
||||||
|
`DHE-PSK-AES256-CCM`,
|
||||||
|
`PSK-AES128-CCM`,
|
||||||
|
`PSK-AES256-CCM`,
|
||||||
|
`PSK-AES128-CCM-8`,
|
||||||
|
`PSK-AES256-CCM-8`,
|
||||||
|
`DHE-PSK-NULL-SHA384`,
|
||||||
|
`DHE-PSK-NULL-SHA256`,
|
||||||
|
`PSK-NULL-SHA384`,
|
||||||
|
`PSK-NULL-SHA256`,
|
||||||
|
`PSK-NULL-SHA`,
|
||||||
|
`HC128-MD5`,
|
||||||
|
`HC128-SHA`,
|
||||||
|
`HC128-B2B256`,
|
||||||
|
`AES128-B2B256`,
|
||||||
|
`AES256-B2B256`,
|
||||||
|
`RABBIT-SHA`,
|
||||||
|
`NTRU-RC4-SHA`,
|
||||||
|
`NTRU-DES-CBC3-SHA`,
|
||||||
|
`NTRU-AES128-SHA`,
|
||||||
|
`NTRU-AES256-SHA`,
|
||||||
|
`AES128-CCM-8`,
|
||||||
|
`AES256-CCM-8`,
|
||||||
|
`ECDHE-ECDSA-AES128-CCM`,
|
||||||
|
`ECDHE-ECDSA-AES128-CCM-8`,
|
||||||
|
`ECDHE-ECDSA-AES256-CCM-8`,
|
||||||
|
`ECDHE-RSA-AES128-SHA`,
|
||||||
|
`ECDHE-RSA-AES256-SHA`,
|
||||||
|
`ECDHE-ECDSA-AES128-SHA`,
|
||||||
|
`ECDHE-ECDSA-AES256-SHA`,
|
||||||
|
`ECDHE-RSA-RC4-SHA`,
|
||||||
|
`ECDHE-RSA-DES-CBC3-SHA`,
|
||||||
|
`ECDHE-ECDSA-RC4-SHA`,
|
||||||
|
`ECDHE-ECDSA-DES-CBC3-SHA`,
|
||||||
|
`AES128-SHA256`,
|
||||||
|
`AES256-SHA256`,
|
||||||
|
`DHE-RSA-AES128-SHA256`,
|
||||||
|
`DHE-RSA-AES256-SHA256`,
|
||||||
|
`ECDH-RSA-AES128-SHA`,
|
||||||
|
`ECDH-RSA-AES256-SHA`,
|
||||||
|
`ECDH-ECDSA-AES128-SHA`,
|
||||||
|
`ECDH-ECDSA-AES256-SHA`,
|
||||||
|
`ECDH-RSA-RC4-SHA`,
|
||||||
|
`ECDH-RSA-DES-CBC3-SHA`,
|
||||||
|
`ECDH-ECDSA-RC4-SHA`,
|
||||||
|
`ECDH-ECDSA-DES-CBC3-SHA`,
|
||||||
|
`AES128-GCM-SHA256`,
|
||||||
|
`AES256-GCM-SHA384`,
|
||||||
|
`DHE-RSA-AES128-GCM-SHA256`,
|
||||||
|
`DHE-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDHE-RSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDHE-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDHE-ECDSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDHE-ECDSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDH-RSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDH-RSA-AES256-GCM-SHA384`,
|
||||||
|
`ECDH-ECDSA-AES128-GCM-SHA256`,
|
||||||
|
`ECDH-ECDSA-AES256-GCM-SHA384`,
|
||||||
|
`CAMELLIA128-SHA`,
|
||||||
|
`DHE-RSA-CAMELLIA128-SHA`,
|
||||||
|
`CAMELLIA256-SHA`,
|
||||||
|
`DHE-RSA-CAMELLIA256-SHA`,
|
||||||
|
`CAMELLIA128-SHA256`,
|
||||||
|
`DHE-RSA-CAMELLIA128-SHA256`,
|
||||||
|
`CAMELLIA256-SHA256`,
|
||||||
|
`DHE-RSA-CAMELLIA256-SHA256`,
|
||||||
|
`ECDHE-RSA-AES128-SHA256`,
|
||||||
|
`ECDHE-ECDSA-AES128-SHA256`,
|
||||||
|
`ECDH-RSA-AES128-SHA256`,
|
||||||
|
`ECDH-ECDSA-AES128-SHA256`,
|
||||||
|
`ECDHE-RSA-AES256-SHA384`,
|
||||||
|
`ECDHE-ECDSA-AES256-SHA384`,
|
||||||
|
`ECDH-RSA-AES256-SHA384`,
|
||||||
|
`ECDH-ECDSA-AES256-SHA384`,
|
||||||
|
`ECDHE-RSA-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-ECDSA-CHACHA20-POLY1305`,
|
||||||
|
`DHE-RSA-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-RSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`ECDHE-ECDSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`DHE-RSA-CHACHA20-POLY1305-OLD`,
|
||||||
|
`ADH-AES128-SHA`,
|
||||||
|
`QSH`,
|
||||||
|
`RENEGOTIATION-INFO`,
|
||||||
|
`IDEA-CBC-SHA`,
|
||||||
|
`ECDHE-ECDSA-NULL-SHA`,
|
||||||
|
`ECDHE-PSK-NULL-SHA256`,
|
||||||
|
`ECDHE-PSK-AES128-CBC-SHA256`,
|
||||||
|
`PSK-CHACHA20-POLY1305`,
|
||||||
|
`ECDHE-PSK-CHACHA20-POLY1305`,
|
||||||
|
`DHE-PSK-CHACHA20-POLY1305`,
|
||||||
|
`EDH-RSA-DES-CBC3-SHA`,
|
||||||
|
|
||||||
|
## Schannel
|
||||||
|
|
||||||
|
Schannel allows the enabling and disabling of encryption algorithms, but not
|
||||||
|
specific ciphersuites. They are
|
||||||
|
[defined](https://docs.microsoft.com/windows/desktop/SecCrypto/alg-id) by
|
||||||
|
Microsoft.
|
||||||
|
|
||||||
|
There is also the case that the selected algorithm is not supported by the
|
||||||
|
protocol or does not match the ciphers offered by the server during the SSL
|
||||||
|
negotiation. In this case curl will return error
|
||||||
|
`CURLE_SSL_CONNECT_ERROR (35) SEC_E_ALGORITHM_MISMATCH`
|
||||||
|
and the request will fail.
|
||||||
|
|
||||||
|
`CALG_MD2`,
|
||||||
|
`CALG_MD4`,
|
||||||
|
`CALG_MD5`,
|
||||||
|
`CALG_SHA`,
|
||||||
|
`CALG_SHA1`,
|
||||||
|
`CALG_MAC`,
|
||||||
|
`CALG_RSA_SIGN`,
|
||||||
|
`CALG_DSS_SIGN`,
|
||||||
|
`CALG_NO_SIGN`,
|
||||||
|
`CALG_RSA_KEYX`,
|
||||||
|
`CALG_DES`,
|
||||||
|
`CALG_3DES_112`,
|
||||||
|
`CALG_3DES`,
|
||||||
|
`CALG_DESX`,
|
||||||
|
`CALG_RC2`,
|
||||||
|
`CALG_RC4`,
|
||||||
|
`CALG_SEAL`,
|
||||||
|
`CALG_DH_SF`,
|
||||||
|
`CALG_DH_EPHEM`,
|
||||||
|
`CALG_AGREEDKEY_ANY`,
|
||||||
|
`CALG_HUGHES_MD5`,
|
||||||
|
`CALG_SKIPJACK`,
|
||||||
|
`CALG_TEK`,
|
||||||
|
`CALG_CYLINK_MEK`,
|
||||||
|
`CALG_SSL3_SHAMD5`,
|
||||||
|
`CALG_SSL3_MASTER`,
|
||||||
|
`CALG_SCHANNEL_MASTER_HASH`,
|
||||||
|
`CALG_SCHANNEL_MAC_KEY`,
|
||||||
|
`CALG_SCHANNEL_ENC_KEY`,
|
||||||
|
`CALG_PCT1_MASTER`,
|
||||||
|
`CALG_SSL2_MASTER`,
|
||||||
|
`CALG_TLS1_MASTER`,
|
||||||
|
`CALG_RC5`,
|
||||||
|
`CALG_HMAC`,
|
||||||
|
`CALG_TLS1PRF`,
|
||||||
|
`CALG_HASH_REPLACE_OWF`,
|
||||||
|
`CALG_AES_128`,
|
||||||
|
`CALG_AES_192`,
|
||||||
|
`CALG_AES_256`,
|
||||||
|
`CALG_AES`,
|
||||||
|
`CALG_SHA_256`,
|
||||||
|
`CALG_SHA_384`,
|
||||||
|
`CALG_SHA_512`,
|
||||||
|
`CALG_ECDH`,
|
||||||
|
`CALG_ECMQV`,
|
||||||
|
`CALG_ECDSA`,
|
||||||
|
`CALG_ECDH_EPHEM`,
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#add_subdirectory(examples)
|
||||||
|
add_subdirectory(libcurl)
|
||||||
|
add_subdirectory(cmdline-opts)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
Contributor Code of Conduct
|
||||||
|
===========================
|
||||||
|
|
||||||
|
As contributors and maintainers of this project, we pledge to respect all
|
||||||
|
people who contribute through reporting issues, posting feature requests,
|
||||||
|
updating documentation, submitting pull requests or patches, and other
|
||||||
|
activities.
|
||||||
|
|
||||||
|
We are committed to making participation in this project a harassment-free
|
||||||
|
experience for everyone, regardless of level of experience, gender, gender
|
||||||
|
identity and expression, sexual orientation, disability, personal appearance,
|
||||||
|
body size, race, ethnicity, age, or religion.
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include the use of sexual
|
||||||
|
language or imagery, derogatory comments or personal attacks, trolling, public
|
||||||
|
or private harassment, insults, or other unprofessional conduct.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct. Project maintainers who do not
|
||||||
|
follow the Code of Conduct may be removed from the project team.
|
||||||
|
|
||||||
|
This code of conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community.
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by opening an issue or contacting one or more of the project
|
||||||
|
maintainers.
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor
|
||||||
|
Covenant](https://contributor-covenant.org/), version 1.1.0, available at
|
||||||
|
[https://contributor-covenant.org/version/1/1/0/](https://contributor-covenant.org/version/1/1/0/)
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
# How to do code reviews for curl
|
||||||
|
|
||||||
|
Anyone and everyone is encouraged and welcome to review code submissions in
|
||||||
|
curl. This is a guide on what to check for and how to perform a successful
|
||||||
|
code review.
|
||||||
|
|
||||||
|
## All submissions should get reviewed
|
||||||
|
|
||||||
|
All pull requests and patches submitted to the project should be reviewed by
|
||||||
|
at least one experienced curl maintainer before that code is accepted and
|
||||||
|
merged.
|
||||||
|
|
||||||
|
## Let the tools and tests take the first rounds
|
||||||
|
|
||||||
|
On initial pull requests, let the tools and tests do their job first and then
|
||||||
|
start out by helping the submitter understand the test failures and tool
|
||||||
|
alerts.
|
||||||
|
|
||||||
|
## How to provide feedback to author
|
||||||
|
|
||||||
|
Be nice. Ask questions. Provide examples or suggestions of improvements.
|
||||||
|
Assume best intentions. Remember language barriers.
|
||||||
|
|
||||||
|
All first-time contributors can become regulars. Let's help them go there.
|
||||||
|
|
||||||
|
## Is this a change we want?
|
||||||
|
|
||||||
|
If this is not a change that seems to be aligned with the project's path
|
||||||
|
forward and as such cannot be accepted, inform the author about this sooner
|
||||||
|
rather than later. Do it gently and explain why and possibly what could be
|
||||||
|
done to make it more acceptable.
|
||||||
|
|
||||||
|
## API/ABI stability or changed behavior
|
||||||
|
|
||||||
|
Changing the API and the ABI may be fine in a change but it needs to be done
|
||||||
|
deliberately and carefully. If not, a reviewer must help the author to realize
|
||||||
|
the mistake.
|
||||||
|
|
||||||
|
curl and libcurl are similarly very strict on not modifying existing
|
||||||
|
behavior. API and ABI stability is not enough, the behavior should also remain
|
||||||
|
intact as far as possible.
|
||||||
|
|
||||||
|
## Code style
|
||||||
|
|
||||||
|
Most code style nits are detected by checksrc but not all. Only leave remarks
|
||||||
|
on style deviation once checksrc doesn't find any more.
|
||||||
|
|
||||||
|
Minor nits from fresh submitters can also be handled by the maintainer when
|
||||||
|
merging, in case it seems like the submitter isn't clear on what to do. We
|
||||||
|
want to make the process fun and exciting for new contributors.
|
||||||
|
|
||||||
|
## Encourage consistency
|
||||||
|
|
||||||
|
Make sure new code is written in a similar style as existing code. Naming,
|
||||||
|
logic, conditions, etc.
|
||||||
|
|
||||||
|
## Are pointers always non-NULL?
|
||||||
|
|
||||||
|
If a function or code rely on pointers being non-NULL, take an extra look if
|
||||||
|
that seems to be a fair assessment.
|
||||||
|
|
||||||
|
## Asserts
|
||||||
|
|
||||||
|
Conditions that should never be false can be verified with `DEBUGASSERT()`
|
||||||
|
calls to get caught in tests and debugging easier, while not having an impact
|
||||||
|
on final or release builds.
|
||||||
|
|
||||||
|
## Memory allocation
|
||||||
|
|
||||||
|
Can the mallocs be avoided? Do not introduce mallocs in any hot paths. If
|
||||||
|
there are (new) mallocs, can they be combined into fewer calls?
|
||||||
|
|
||||||
|
Are all allocations handled in errorpaths to avoid leaks and crashes?
|
||||||
|
|
||||||
|
## Thread-safety
|
||||||
|
|
||||||
|
We do not like static variables as they break thread-safety and prevent
|
||||||
|
functions from being reentrant.
|
||||||
|
|
||||||
|
## Should features be `#ifdef`ed?
|
||||||
|
|
||||||
|
Features and functionality may not be present everywhere and should therefore
|
||||||
|
be `#ifdef`ed. Additionally, some features should be possible to switch on/off
|
||||||
|
in the build.
|
||||||
|
|
||||||
|
Write `#ifdef`s to be as little of a "maze" as possible.
|
||||||
|
|
||||||
|
## Does it look portable enough?
|
||||||
|
|
||||||
|
curl runs "everywhere". Does the code take a reasonable stance and enough
|
||||||
|
precautions to be possible to build and run on most platforms?
|
||||||
|
|
||||||
|
Remember that we live by C89 restrictions.
|
||||||
|
|
||||||
|
## Tests and testability
|
||||||
|
|
||||||
|
New features should be added in conjunction with one or more test cases.
|
||||||
|
Ideally, functions should also be written so that unit tests can be done to
|
||||||
|
test individual functions.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
New features or changes to existing functionality **must** be accompanied with
|
||||||
|
updated documentation. Submitting that in a separate follow-up pull request is
|
||||||
|
not OK. A code review must also verify that the submitted documentation update
|
||||||
|
matches the code submission.
|
||||||
|
|
||||||
|
English isn't everyone's first language, be mindful of this and help the
|
||||||
|
submitter improve the text if it needs a rewrite to read better.
|
||||||
|
|
||||||
|
## Code shouldn't be hard to understand
|
||||||
|
|
||||||
|
Source code should be written to maximize readability and be easy to
|
||||||
|
understand.
|
||||||
|
|
||||||
|
## Functions shouldn't be large
|
||||||
|
|
||||||
|
A single function should never be large as that makes it hard to follow and
|
||||||
|
understand all the exit points and state changes. Some existing functions in
|
||||||
|
curl certainly violate this ground rule but when reviewing new code we should
|
||||||
|
propose splitting into smaller functions.
|
||||||
|
|
||||||
|
## Duplication is evil
|
||||||
|
|
||||||
|
Anything that looks like duplicated code is a red flag. Anything that seems to
|
||||||
|
introduce code that we *should* already have or provide needs a closer check.
|
||||||
|
|
||||||
|
## Sensitive data
|
||||||
|
|
||||||
|
When credentials are involved, take an extra look at what happens with this
|
||||||
|
data. Where it comes from and where it goes.
|
||||||
|
|
||||||
|
## Variable types differ
|
||||||
|
|
||||||
|
`size_t` is not a fixed size. `time_t` can be signed or unsigned and have
|
||||||
|
different sizes. Relying on variable sizes is a red flag.
|
||||||
|
|
||||||
|
Also remember that endianness and >= 32 bit accesses to unaligned addresses
|
||||||
|
are problematic areas.
|
||||||
|
|
||||||
|
## Integer overflows
|
||||||
|
|
||||||
|
Be careful about integer overflows. Some variable types can be either 32 bit
|
||||||
|
or 64 bit. Integer overflows must be detected and acted on *before* they
|
||||||
|
happen.
|
||||||
|
|
||||||
|
## Dangerous use of functions
|
||||||
|
|
||||||
|
Maybe use of `realloc()` should rather use the dynbuf functions?
|
||||||
|
|
||||||
|
Do not allow new code that grows buffers without using dynbuf.
|
||||||
|
|
||||||
|
Use of C functions that rely on a terminating zero must only be used on data
|
||||||
|
that really do have a zero terminating zero.
|
||||||
|
|
||||||
|
## Dangerous "data styles"
|
||||||
|
|
||||||
|
Make extra precautions and verify that memory buffers that need a terminating
|
||||||
|
zero always have exactly that. Buffers *without* a zero terminator must not be
|
||||||
|
used as input to string functions.
|
||||||
|
|
||||||
|
# Commit messages
|
||||||
|
|
||||||
|
Tightly coupled with a code review is making sure that the commit message is
|
||||||
|
good. It is the responsibility of the person who merges the code to make sure
|
||||||
|
that the commit message follows our standard (detailed in the
|
||||||
|
[CONTRIBUTE.md](CONTRIBUTE.md) document). This includes making sure the PR
|
||||||
|
identifies related issues and giving credit to reporters and helpers.
|
||||||
@@ -0,0 +1,309 @@
|
|||||||
|
# curl C code style
|
||||||
|
|
||||||
|
Source code that has a common style is easier to read than code that uses
|
||||||
|
different styles in different places. It helps making the code feel like one
|
||||||
|
single code base. Easy-to-read is a very important property of code and helps
|
||||||
|
making it easier to review when new things are added and it helps debugging
|
||||||
|
code when developers are trying to figure out why things go wrong. A unified
|
||||||
|
style is more important than individual contributors having their own personal
|
||||||
|
tastes satisfied.
|
||||||
|
|
||||||
|
Our C code has a few style rules. Most of them are verified and upheld by the
|
||||||
|
`lib/checksrc.pl` script. Invoked with `make checksrc` or even by default by
|
||||||
|
the build system when built after `./configure --enable-debug` has been used.
|
||||||
|
|
||||||
|
It is normally not a problem for anyone to follow the guidelines, as you just
|
||||||
|
need to copy the style already used in the source code and there are no
|
||||||
|
particularly unusual rules in our set of rules.
|
||||||
|
|
||||||
|
We also work hard on writing code that are warning-free on all the major
|
||||||
|
platforms and in general on as many platforms as possible. Code that obviously
|
||||||
|
will cause warnings will not be accepted as-is.
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
Try using a non-confusing naming scheme for your new functions and variable
|
||||||
|
names. It doesn't necessarily have to mean that you should use the same as in
|
||||||
|
other places of the code, just that the names should be logical,
|
||||||
|
understandable and be named according to what they're used for. File-local
|
||||||
|
functions should be made static. We like lower case names.
|
||||||
|
|
||||||
|
See the [INTERNALS](INTERNALS.md) document on how we name non-exported
|
||||||
|
library-global symbols.
|
||||||
|
|
||||||
|
## Indenting
|
||||||
|
|
||||||
|
We use only spaces for indentation, never TABs. We use two spaces for each new
|
||||||
|
open brace.
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(something_is_true) {
|
||||||
|
while(second_statement == fine) {
|
||||||
|
moo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Comments
|
||||||
|
|
||||||
|
Since we write C89 code, **//** comments are not allowed. They weren't
|
||||||
|
introduced in the C standard until C99. We use only **/* comments */**.
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* this is a comment */
|
||||||
|
```
|
||||||
|
|
||||||
|
## Long lines
|
||||||
|
|
||||||
|
Source code in curl may never be wider than 79 columns and there are two
|
||||||
|
reasons for maintaining this even in the modern era of very large and high
|
||||||
|
resolution screens:
|
||||||
|
|
||||||
|
1. Narrower columns are easier to read than very wide ones. There's a reason
|
||||||
|
newspapers have used columns for decades or centuries.
|
||||||
|
|
||||||
|
2. Narrower columns allow developers to easier show multiple pieces of code
|
||||||
|
next to each other in different windows. I often have two or three source
|
||||||
|
code windows next to each other on the same screen - as well as multiple
|
||||||
|
terminal and debugging windows.
|
||||||
|
|
||||||
|
## Braces
|
||||||
|
|
||||||
|
In if/while/do/for expressions, we write the open brace on the same line as
|
||||||
|
the keyword and we then set the closing brace on the same indentation level as
|
||||||
|
the initial keyword. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(age < 40) {
|
||||||
|
/* clearly a youngster */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You may omit the braces if they would contain only a one-line statement:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(!x)
|
||||||
|
continue;
|
||||||
|
```
|
||||||
|
|
||||||
|
For functions the opening brace should be on a separate line:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 'else' on the following line
|
||||||
|
|
||||||
|
When adding an **else** clause to a conditional expression using braces, we
|
||||||
|
add it on a new line after the closing brace. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(age < 40) {
|
||||||
|
/* clearly a youngster */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* probably grumpy */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## No space before parentheses
|
||||||
|
|
||||||
|
When writing expressions using if/while/do/for, there shall be no space
|
||||||
|
between the keyword and the open parenthesis. Like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
while(1) {
|
||||||
|
/* loop forever */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use boolean conditions
|
||||||
|
|
||||||
|
Rather than test a conditional value such as a bool against TRUE or FALSE, a
|
||||||
|
pointer against NULL or != NULL and an int against zero or not zero in
|
||||||
|
if/while conditions we prefer:
|
||||||
|
|
||||||
|
```c
|
||||||
|
result = do_something();
|
||||||
|
if(!result) {
|
||||||
|
/* something went wrong */
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## No assignments in conditions
|
||||||
|
|
||||||
|
To increase readability and reduce complexity of conditionals, we avoid
|
||||||
|
assigning variables within if/while conditions. We frown upon this style:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if((ptr = malloc(100)) == NULL)
|
||||||
|
return NULL;
|
||||||
|
```
|
||||||
|
|
||||||
|
and instead we encourage the above version to be spelled out more clearly:
|
||||||
|
|
||||||
|
```c
|
||||||
|
ptr = malloc(100);
|
||||||
|
if(!ptr)
|
||||||
|
return NULL;
|
||||||
|
```
|
||||||
|
|
||||||
|
## New block on a new line
|
||||||
|
|
||||||
|
We never write multiple statements on the same source line, even for very
|
||||||
|
short if() conditions.
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(a)
|
||||||
|
return TRUE;
|
||||||
|
else if(b)
|
||||||
|
return FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
and NEVER:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(a) return TRUE;
|
||||||
|
else if(b) return FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Space around operators
|
||||||
|
|
||||||
|
Please use spaces on both sides of operators in C expressions. Postfix **(),
|
||||||
|
[], ->, ., ++, --** and Unary **+, - !, ~, &** operators excluded they should
|
||||||
|
have no space.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```c
|
||||||
|
bla = func();
|
||||||
|
who = name[0];
|
||||||
|
age += 1;
|
||||||
|
true = !false;
|
||||||
|
size += -2 + 3 * (a + b);
|
||||||
|
ptr->member = a++;
|
||||||
|
struct.field = b--;
|
||||||
|
ptr = &address;
|
||||||
|
contents = *pointer;
|
||||||
|
complement = ~bits;
|
||||||
|
empty = (!*string) ? TRUE : FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
## No parentheses for return values
|
||||||
|
|
||||||
|
We use the 'return' statement without extra parentheses around the value:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int works(void)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Parentheses for sizeof arguments
|
||||||
|
|
||||||
|
When using the sizeof operator in code, we prefer it to be written with
|
||||||
|
parentheses around its argument:
|
||||||
|
|
||||||
|
```c
|
||||||
|
int size = sizeof(int);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Column alignment
|
||||||
|
|
||||||
|
Some statements cannot be completed on a single line because the line would be
|
||||||
|
too long, the statement too hard to read, or due to other style guidelines
|
||||||
|
above. In such a case the statement will span multiple lines.
|
||||||
|
|
||||||
|
If a continuation line is part of an expression or sub-expression then you
|
||||||
|
should align on the appropriate column so that it's easy to tell what part of
|
||||||
|
the statement it is. Operators should not start continuation lines. In other
|
||||||
|
cases follow the 2-space indent guideline. Here are some examples from
|
||||||
|
libcurl:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
|
||||||
|
(handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
|
||||||
|
(handle->set.httpreq == HTTPREQ_GET ||
|
||||||
|
handle->set.httpreq == HTTPREQ_HEAD))
|
||||||
|
/* didn't ask for HTTP/1.0 and a GET or HEAD */
|
||||||
|
return TRUE;
|
||||||
|
```
|
||||||
|
|
||||||
|
If no parenthesis, use the default indent:
|
||||||
|
|
||||||
|
```c
|
||||||
|
data->set.http_disable_hostname_check_before_authentication =
|
||||||
|
(0 != va_arg(param, long)) ? TRUE : FALSE;
|
||||||
|
```
|
||||||
|
|
||||||
|
Function invoke with an open parenthesis:
|
||||||
|
|
||||||
|
```c
|
||||||
|
if(option) {
|
||||||
|
result = parse_login_details(option, strlen(option),
|
||||||
|
(userp ? &user : NULL),
|
||||||
|
(passwdp ? &passwd : NULL),
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Align with the "current open" parenthesis:
|
||||||
|
|
||||||
|
```c
|
||||||
|
DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
|
||||||
|
"server response left\n",
|
||||||
|
(int)clipamount));
|
||||||
|
```
|
||||||
|
|
||||||
|
## Platform dependent code
|
||||||
|
|
||||||
|
Use **#ifdef HAVE_FEATURE** to do conditional code. We avoid checking for
|
||||||
|
particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE
|
||||||
|
shall be generated by the configure script for unix-like systems and they are
|
||||||
|
hard-coded in the `config-[system].h` files for the others.
|
||||||
|
|
||||||
|
We also encourage use of macros/functions that possibly are empty or defined
|
||||||
|
to constants when libcurl is built without that feature, to make the code
|
||||||
|
seamless. Like this example where the **magic()** function works differently
|
||||||
|
depending on a build-time conditional:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#ifdef HAVE_MAGIC
|
||||||
|
void magic(int a)
|
||||||
|
{
|
||||||
|
return a + 2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define magic(x) 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int content = magic(3);
|
||||||
|
```
|
||||||
|
|
||||||
|
## No typedefed structs
|
||||||
|
|
||||||
|
Use structs by all means, but do not typedef them. Use the `struct name` way
|
||||||
|
of identifying them:
|
||||||
|
|
||||||
|
```c
|
||||||
|
struct something {
|
||||||
|
void *valid;
|
||||||
|
size_t way_to_write;
|
||||||
|
};
|
||||||
|
struct something instance;
|
||||||
|
```
|
||||||
|
|
||||||
|
**Not okay**:
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef struct {
|
||||||
|
void *wrong;
|
||||||
|
size_t way_to_write;
|
||||||
|
} something;
|
||||||
|
something instance;
|
||||||
|
```
|
||||||
@@ -0,0 +1,307 @@
|
|||||||
|
# Contributing to the curl project
|
||||||
|
|
||||||
|
This document is intended to offer guidelines on how to best contribute to the
|
||||||
|
curl project. This concerns new features as well as corrections to existing
|
||||||
|
flaws or bugs.
|
||||||
|
|
||||||
|
## Learning curl
|
||||||
|
|
||||||
|
### Join the Community
|
||||||
|
|
||||||
|
Skip over to [https://curl.se/mail/](https://curl.se/mail/) and join
|
||||||
|
the appropriate mailing list(s). Read up on details before you post
|
||||||
|
questions. Read this file before you start sending patches! We prefer
|
||||||
|
questions sent to and discussions being held on the mailing list(s), not sent
|
||||||
|
to individuals.
|
||||||
|
|
||||||
|
Before posting to one of the curl mailing lists, please read up on the
|
||||||
|
[mailing list etiquette](https://curl.se/mail/etiquette.html).
|
||||||
|
|
||||||
|
We also hang out on IRC in #curl on irc.freenode.net
|
||||||
|
|
||||||
|
If you're at all interested in the code side of things, consider clicking
|
||||||
|
'watch' on the [curl repo on github](https://github.com/curl/curl) to be
|
||||||
|
notified of pull requests and new issues posted there.
|
||||||
|
|
||||||
|
### License and copyright
|
||||||
|
|
||||||
|
When contributing with code, you agree to put your changes and new code under
|
||||||
|
the same license curl and libcurl is already using unless stated and agreed
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
If you add a larger piece of code, you can opt to make that file or set of
|
||||||
|
files to use a different license as long as they don't enforce any changes to
|
||||||
|
the rest of the package and they make sense. Such "separate parts" can not be
|
||||||
|
GPL licensed (as we don't want copyleft to affect users of libcurl) but they
|
||||||
|
must use "GPL compatible" licenses (as we want to allow users to use libcurl
|
||||||
|
properly in GPL licensed environments).
|
||||||
|
|
||||||
|
When changing existing source code, you do not alter the copyright of the
|
||||||
|
original file(s). The copyright will still be owned by the original creator(s)
|
||||||
|
or those who have been assigned copyright by the original author(s).
|
||||||
|
|
||||||
|
By submitting a patch to the curl project, you are assumed to have the right
|
||||||
|
to the code and to be allowed by your employer or whatever to hand over that
|
||||||
|
patch/code to us. We will credit you for your changes as far as possible, to
|
||||||
|
give credit but also to keep a trace back to who made what changes. Please
|
||||||
|
always provide us with your full real name when contributing!
|
||||||
|
|
||||||
|
### What To Read
|
||||||
|
|
||||||
|
Source code, the man pages, the [INTERNALS
|
||||||
|
document](https://curl.se/dev/internals.html),
|
||||||
|
[TODO](https://curl.se/docs/todo.html),
|
||||||
|
[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) and the [most recent
|
||||||
|
changes](https://curl.se/dev/sourceactivity.html) in git. Just lurking on
|
||||||
|
the [curl-library mailing
|
||||||
|
list](https://curl.se/mail/list.cgi?list=curl-library) will give you a
|
||||||
|
lot of insights on what's going on right now. Asking there is a good idea too.
|
||||||
|
|
||||||
|
## Write a good patch
|
||||||
|
|
||||||
|
### Follow code style
|
||||||
|
|
||||||
|
When writing C code, follow the
|
||||||
|
[CODE_STYLE](https://curl.se/dev/code-style.html) already established in
|
||||||
|
the project. Consistent style makes code easier to read and mistakes less
|
||||||
|
likely to happen. Run `make checksrc` before you submit anything, to make sure
|
||||||
|
you follow the basic style. That script doesn't verify everything, but if it
|
||||||
|
complains you know you have work to do.
|
||||||
|
|
||||||
|
### Non-clobbering All Over
|
||||||
|
|
||||||
|
When you write new functionality or fix bugs, it is important that you don't
|
||||||
|
fiddle all over the source files and functions. Remember that it is likely
|
||||||
|
that other people have done changes in the same source files as you have and
|
||||||
|
possibly even in the same functions. If you bring completely new
|
||||||
|
functionality, try writing it in a new source file. If you fix bugs, try to
|
||||||
|
fix one bug at a time and send them as separate patches.
|
||||||
|
|
||||||
|
### Write Separate Changes
|
||||||
|
|
||||||
|
It is annoying when you get a huge patch from someone that is said to fix 511
|
||||||
|
odd problems, but discussions and opinions don't agree with 510 of them - or
|
||||||
|
509 of them were already fixed in a different way. Then the person merging
|
||||||
|
this change needs to extract the single interesting patch from somewhere
|
||||||
|
within the huge pile of source, and that creates a lot of extra work.
|
||||||
|
|
||||||
|
Preferably, each fix that corrects a problem should be in its own patch/commit
|
||||||
|
with its own description/commit message stating exactly what they correct so
|
||||||
|
that all changes can be selectively applied by the maintainer or other
|
||||||
|
interested parties.
|
||||||
|
|
||||||
|
Also, separate changes enable bisecting much better for tracking problems
|
||||||
|
and regression in the future.
|
||||||
|
|
||||||
|
### Patch Against Recent Sources
|
||||||
|
|
||||||
|
Please try to get the latest available sources to make your patches against.
|
||||||
|
It makes the lives of the developers so much easier. The very best is if you
|
||||||
|
get the most up-to-date sources from the git repository, but the latest
|
||||||
|
release archive is quite OK as well!
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
Writing docs is dead boring and one of the big problems with many open source
|
||||||
|
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.
|
||||||
|
|
||||||
|
The documentation is always made in man pages (nroff formatted) or plain
|
||||||
|
ASCII files. All HTML files on the website and in the release archives are
|
||||||
|
generated from the nroff/ASCII versions.
|
||||||
|
|
||||||
|
### Test Cases
|
||||||
|
|
||||||
|
Since the introduction of the test suite, we can quickly verify that the main
|
||||||
|
features are working as they're supposed to. To maintain this situation and
|
||||||
|
improve it, all new features and functions that are added need to be tested
|
||||||
|
in the test suite. Every feature that is added should get at least one valid
|
||||||
|
test case that verifies that it works as documented. If every submitter also
|
||||||
|
posts a few test cases, it won't end up as a heavy burden on a single person!
|
||||||
|
|
||||||
|
If you don't have test cases or perhaps you have done something that is very
|
||||||
|
hard to write tests for, do explain exactly how you have otherwise tested and
|
||||||
|
verified your changes.
|
||||||
|
|
||||||
|
## Sharing Your Changes
|
||||||
|
|
||||||
|
### How to get your changes into the main sources
|
||||||
|
|
||||||
|
Ideally you file a [pull request on
|
||||||
|
github](https://github.com/curl/curl/pulls), but you can also send your plain
|
||||||
|
patch to [the curl-library mailing
|
||||||
|
list](https://curl.se/mail/list.cgi?list=curl-library).
|
||||||
|
|
||||||
|
Either way, your change will be reviewed and discussed there and you will be
|
||||||
|
expected to correct flaws pointed out and update accordingly, or the change
|
||||||
|
risks stalling and eventually just getting deleted without action. As a
|
||||||
|
submitter of a change, you are the owner of that change until it has been merged.
|
||||||
|
|
||||||
|
Respond on the list or on github about the change and answer questions and/or
|
||||||
|
fix nits/flaws. This is very important. We will take lack of replies as a
|
||||||
|
sign that you're not very anxious to get your patch accepted and we tend to
|
||||||
|
simply drop such changes.
|
||||||
|
|
||||||
|
### About pull requests
|
||||||
|
|
||||||
|
With github it is easy to send a [pull
|
||||||
|
request](https://github.com/curl/curl/pulls) to the curl project to have
|
||||||
|
changes merged.
|
||||||
|
|
||||||
|
We strongly prefer pull requests to mailed patches, as it makes it a proper
|
||||||
|
git commit that is easy to merge and they are easy to track and not that easy
|
||||||
|
to loose in the flood of many emails, like they sometimes do on the mailing
|
||||||
|
lists.
|
||||||
|
|
||||||
|
Every pull request submitted will automatically be tested in several different
|
||||||
|
ways. Every pull request is verified for each of the following:
|
||||||
|
|
||||||
|
- ... it still builds, warning-free, on Linux and macOS, with both
|
||||||
|
clang and gcc
|
||||||
|
- ... it still builds fine on Windows with several MSVC versions
|
||||||
|
- ... it still builds with cmake on Linux, with gcc and clang
|
||||||
|
- ... it follows rudimentary code style rules
|
||||||
|
- ... the test suite still runs 100% fine
|
||||||
|
- ... the release tarball (the "dist") still works
|
||||||
|
- ... it builds fine in-tree as well as out-of-tree
|
||||||
|
- ... code coverage doesn't shrink drastically
|
||||||
|
|
||||||
|
If the pull-request fails one of these tests, it will show up as a red X and
|
||||||
|
you are expected to fix the problem. If you don't understand when the issue is
|
||||||
|
or have other problems to fix the complaint, just ask and other project
|
||||||
|
members will likely be able to help out.
|
||||||
|
|
||||||
|
Consider the following table while looking at pull request failures:
|
||||||
|
|
||||||
|
| CI platform as shown in PR | State | What to look at next |
|
||||||
|
| ----------------------------------- | ------ | -------------------------- |
|
||||||
|
| CI / codeql | stable | quality check results |
|
||||||
|
| CI / fuzzing | stable | fuzzing results |
|
||||||
|
| CI / macos ... | stable | all errors and failures |
|
||||||
|
| Code scanning results / CodeQL | stable | quality check results |
|
||||||
|
| FreeBSD FreeBSD: ... | stable | all errors and failures |
|
||||||
|
| LGTM analysis: Python | stable | new findings |
|
||||||
|
| LGTM analysis: C/C++ | stable | new findings |
|
||||||
|
| buildbot/curl_winssl_ ... | stable | all errors and failures |
|
||||||
|
| continuous-integration/appveyor/pr | stable | all errors and failures |
|
||||||
|
| continuous-integration/travis-ci/pr | stable | all errors and failures |
|
||||||
|
| curl.curl (linux ...) | stable | all errors and failures |
|
||||||
|
| curl.curl (windows ...) | flaky | repetitive errors/failures |
|
||||||
|
| deepcode-ci-bot | stable | new findings |
|
||||||
|
| musedev | stable | new findings |
|
||||||
|
|
||||||
|
Sometimes the tests fail due to a dependency service temporarily being offline
|
||||||
|
or otherwise unavailable, eg. package downloads. In this case you can just
|
||||||
|
try to update your pull requests to rerun the tests later as described below.
|
||||||
|
|
||||||
|
You can update your pull requests by pushing new commits or force-pushing
|
||||||
|
changes to existing commits. Force-pushing an amended commit without any
|
||||||
|
actual content changed also allows you to retrigger the tests for that commit.
|
||||||
|
|
||||||
|
When you adjust your pull requests after review, consider squashing the
|
||||||
|
commits so that we can review the full updated version more easily.
|
||||||
|
|
||||||
|
### Making quality patches
|
||||||
|
|
||||||
|
Make the patch against as recent source versions as possible.
|
||||||
|
|
||||||
|
If you've followed the tips in this document and your patch still hasn't been
|
||||||
|
incorporated or responded to after some weeks, consider resubmitting it to the
|
||||||
|
list or better yet: change it to a pull request.
|
||||||
|
|
||||||
|
### Write good commit messages
|
||||||
|
|
||||||
|
A short guide to how to write commit messages in the curl project.
|
||||||
|
|
||||||
|
---- start ----
|
||||||
|
[area]: [short line describing the main effect]
|
||||||
|
-- empty line --
|
||||||
|
[full description, no wider than 72 columns that describe as much as
|
||||||
|
possible as to why this change is made, and possibly what things
|
||||||
|
it fixes and everything else that is related]
|
||||||
|
-- empty line --
|
||||||
|
[Closes/Fixes #1234 - if this closes or fixes a github issue]
|
||||||
|
[Bug: URL to source of the report or more related discussion]
|
||||||
|
[Reported-by: John Doe - credit the reporter]
|
||||||
|
[whatever-else-by: credit all helpers, finders, doers]
|
||||||
|
---- stop ----
|
||||||
|
|
||||||
|
The first line is a succinct description of the change:
|
||||||
|
|
||||||
|
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||||
|
- don't capitalize first letter
|
||||||
|
- no dot (.) at the end
|
||||||
|
|
||||||
|
The `[area]` in the first line can be `http2`, `cookies`, `openssl` or
|
||||||
|
similar. There's no fixed list to select from but using the same "area" as
|
||||||
|
other related changes could make sense.
|
||||||
|
|
||||||
|
Don't forget to use commit --author="" if you commit someone else's work, and
|
||||||
|
make sure that you have your own user and email setup correctly in git before
|
||||||
|
you commit
|
||||||
|
|
||||||
|
### Write Access to git Repository
|
||||||
|
|
||||||
|
If you are a very frequent contributor, you may be given push access to the
|
||||||
|
git repository and then you'll be able to push your changes straight into the
|
||||||
|
git repo instead of sending changes as pull requests or by mail as patches.
|
||||||
|
|
||||||
|
Just ask if this is what you'd want. You will be required to have posted
|
||||||
|
several high quality patches first, before you can be granted push access.
|
||||||
|
|
||||||
|
### How To Make a Patch with git
|
||||||
|
|
||||||
|
You need to first checkout the repository:
|
||||||
|
|
||||||
|
git clone https://github.com/curl/curl.git
|
||||||
|
|
||||||
|
You then proceed and edit all the files you like and you commit them to your
|
||||||
|
local repository:
|
||||||
|
|
||||||
|
git commit [file]
|
||||||
|
|
||||||
|
As usual, group your commits so that you commit all changes at once that
|
||||||
|
constitute a logical change.
|
||||||
|
|
||||||
|
Once you have done all your commits and you're happy with what you see, you
|
||||||
|
can make patches out of your changes that are suitable for mailing:
|
||||||
|
|
||||||
|
git format-patch remotes/origin/master
|
||||||
|
|
||||||
|
This creates files in your local directory named NNNN-[name].patch for each
|
||||||
|
commit.
|
||||||
|
|
||||||
|
Now send those patches off to the curl-library list. You can of course opt to
|
||||||
|
do that with the 'git send-email' command.
|
||||||
|
|
||||||
|
### How To Make a Patch without git
|
||||||
|
|
||||||
|
Keep a copy of the unmodified curl sources. Make your changes in a separate
|
||||||
|
source tree. When you think you have something that you want to offer the
|
||||||
|
curl community, use GNU diff to generate patches.
|
||||||
|
|
||||||
|
If you have modified a single file, try something like:
|
||||||
|
|
||||||
|
diff -u unmodified-file.c my-changed-one.c > my-fixes.diff
|
||||||
|
|
||||||
|
If you have modified several files, possibly in different directories, you
|
||||||
|
can use diff recursively:
|
||||||
|
|
||||||
|
diff -ur curl-original-dir curl-modified-sources-dir > my-fixes.diff
|
||||||
|
|
||||||
|
The GNU diff and GNU patch tools exist for virtually all platforms, including
|
||||||
|
all kinds of Unixes and Windows:
|
||||||
|
|
||||||
|
For unix-like operating systems:
|
||||||
|
|
||||||
|
- [https://savannah.gnu.org/projects/patch/](https://savannah.gnu.org/projects/patch/)
|
||||||
|
- [https://www.gnu.org/software/diffutils/](https://www.gnu.org/software/diffutils/)
|
||||||
|
|
||||||
|
For Windows:
|
||||||
|
|
||||||
|
- [https://gnuwin32.sourceforge.io/packages/patch.htm](https://gnuwin32.sourceforge.io/packages/patch.htm)
|
||||||
|
- [https://gnuwin32.sourceforge.io/packages/diffutils.htm](https://gnuwin32.sourceforge.io/packages/diffutils.htm)
|
||||||
|
|
||||||
|
### Useful resources
|
||||||
|
* [Webinar on getting code into cURL](https://www.youtube.com/watch?v=QmZ3W1d6LQI)
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
# Code defines to disable features and protocols
|
||||||
|
|
||||||
|
## CURL_DISABLE_ALTSVC
|
||||||
|
|
||||||
|
Disable support for Alt-Svc: HTTP headers.
|
||||||
|
|
||||||
|
## CURL_DISABLE_COOKIES
|
||||||
|
|
||||||
|
Disable support for HTTP cookies.
|
||||||
|
|
||||||
|
## CURL_DISABLE_CRYPTO_AUTH
|
||||||
|
|
||||||
|
Disable support for authentication methods using crypto.
|
||||||
|
|
||||||
|
## CURL_DISABLE_DICT
|
||||||
|
|
||||||
|
Disable the DICT protocol
|
||||||
|
|
||||||
|
## CURL_DISABLE_DOH
|
||||||
|
|
||||||
|
Disable DNS-over-HTTPS
|
||||||
|
|
||||||
|
## CURL_DISABLE_FILE
|
||||||
|
|
||||||
|
Disable the FILE protocol
|
||||||
|
|
||||||
|
## CURL_DISABLE_FTP
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
## CURL_DISABLE_GOPHER
|
||||||
|
|
||||||
|
Disable the GOPHER protocol.
|
||||||
|
|
||||||
|
## CURL_DISABLE_HTTP
|
||||||
|
|
||||||
|
Disable the HTTP(S) protocols. Note that this then also disable HTTP proxy
|
||||||
|
support.
|
||||||
|
|
||||||
|
## CURL_DISABLE_HTTP_AUTH
|
||||||
|
|
||||||
|
Disable support for all HTTP authentication methods.
|
||||||
|
|
||||||
|
## CURL_DISABLE_IMAP
|
||||||
|
|
||||||
|
Disable the IMAP(S) protocols.
|
||||||
|
|
||||||
|
## CURL_DISABLE_LDAP
|
||||||
|
|
||||||
|
Disable the LDAP(S) protocols.
|
||||||
|
|
||||||
|
## CURL_DISABLE_LDAPS
|
||||||
|
|
||||||
|
Disable the LDAPS protocol.
|
||||||
|
|
||||||
|
## CURL_DISABLE_LIBCURL_OPTION
|
||||||
|
|
||||||
|
Disable the --libcurl option from the curl tool.
|
||||||
|
|
||||||
|
## CURL_DISABLE_MIME
|
||||||
|
|
||||||
|
Disable MIME support.
|
||||||
|
|
||||||
|
## CURL_DISABLE_MQTT
|
||||||
|
|
||||||
|
Disable MQTT support.
|
||||||
|
|
||||||
|
## CURL_DISABLE_NETRC
|
||||||
|
|
||||||
|
Disable the netrc parser.
|
||||||
|
|
||||||
|
## CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
|
||||||
|
|
||||||
|
Disable the auto load config support in the OpenSSL backend.
|
||||||
|
|
||||||
|
## CURL_DISABLE_PARSEDATE
|
||||||
|
|
||||||
|
Disable date parsing
|
||||||
|
|
||||||
|
## CURL_DISABLE_POP
|
||||||
|
|
||||||
|
Disable the POP(S) protocols
|
||||||
|
|
||||||
|
## CURL_DISABLE_PROGRESS_METER
|
||||||
|
|
||||||
|
Disable the built-in progress meter
|
||||||
|
|
||||||
|
## CURL_DISABLE_PROXY
|
||||||
|
|
||||||
|
Disable support for proxies
|
||||||
|
|
||||||
|
## CURL_DISABLE_RTSP
|
||||||
|
|
||||||
|
Disable the RTSP protocol.
|
||||||
|
|
||||||
|
## CURL_DISABLE_SHUFFLE_DNS
|
||||||
|
|
||||||
|
Disable the shuffle DNS feature
|
||||||
|
|
||||||
|
## CURL_DISABLE_SMB
|
||||||
|
|
||||||
|
Disable the SMB(S) protocols
|
||||||
|
|
||||||
|
## CURL_DISABLE_SMTP
|
||||||
|
|
||||||
|
Disable the SMTP(S) protocols
|
||||||
|
|
||||||
|
## CURL_DISABLE_SOCKETPAIR
|
||||||
|
|
||||||
|
Disable the use of socketpair internally to allow waking up and canceling
|
||||||
|
curl_multi_poll().
|
||||||
|
|
||||||
|
## CURL_DISABLE_TELNET
|
||||||
|
|
||||||
|
Disable the TELNET protocol
|
||||||
|
|
||||||
|
## CURL_DISABLE_TFTP
|
||||||
|
|
||||||
|
Disable the TFTP protocol
|
||||||
|
|
||||||
|
## CURL_DISABLE_VERBOSE_STRINGS
|
||||||
|
|
||||||
|
Disable verbose strings and error messages.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Items to be removed from future curl releases
|
||||||
|
|
||||||
|
If any of these deprecated features is a cause for concern for you, please
|
||||||
|
email the curl-library mailing list as soon as possible and explain to us why
|
||||||
|
this is a problem for you and how your use case can't be satisfied properly
|
||||||
|
using a work around.
|
||||||
|
|
||||||
|
## Past removals
|
||||||
|
|
||||||
|
- Pipelining
|
||||||
|
- axTLS
|
||||||
|
- PolarSSL
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# dynbuf
|
||||||
|
|
||||||
|
This is the internal module for creating and handling "dynamic buffers". This
|
||||||
|
means buffers that can be appended to, dynamically and grow in size to adapt.
|
||||||
|
|
||||||
|
There will always be a terminating zero put at the end of the dynamic buffer.
|
||||||
|
|
||||||
|
The `struct dynbuf` is used to hold data for each instance of a dynamic
|
||||||
|
buffer. The members of that struct **MUST NOT** be accessed or modified
|
||||||
|
without using the dedicated dynbuf API.
|
||||||
|
|
||||||
|
## init
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_init(struct dynbuf *s, size_t toobig);
|
||||||
|
```
|
||||||
|
|
||||||
|
This inits a struct to use for dynbuf and it can't fail. The `toobig` value
|
||||||
|
**must** be set to the maximum size we allow this buffer instance to grow to.
|
||||||
|
The functions below will return `CURLE_OUT_OF_MEMORY` when hitting this limit.
|
||||||
|
|
||||||
|
## free
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_free(struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Free the associated memory and clean up. After a free, the `dynbuf` struct can
|
||||||
|
be re-used to start appending new data to.
|
||||||
|
|
||||||
|
## addn
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_addn(struct dynbuf *s, const void *mem, size_t len);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append arbitrary data of a given length to the end of the buffer.
|
||||||
|
|
||||||
|
## add
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_add(struct dynbuf *s, const char *str);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a C string to the end of the buffer.
|
||||||
|
|
||||||
|
## addf
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_addf(struct dynbuf *s, const char *fmt, ...);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a `printf()`-style string to the end of the buffer.
|
||||||
|
|
||||||
|
## vaddf
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap);
|
||||||
|
```
|
||||||
|
|
||||||
|
Append a `vprintf()`-style string to the end of the buffer.
|
||||||
|
|
||||||
|
## reset
|
||||||
|
|
||||||
|
```c
|
||||||
|
void Curl_dyn_reset(struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Reset the buffer length, but leave the allocation.
|
||||||
|
|
||||||
|
## tail
|
||||||
|
|
||||||
|
```c
|
||||||
|
CURLcode Curl_dyn_tail(struct dynbuf *s, size_t length);
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep `length` bytes of the buffer tail (the last `length` bytes of the
|
||||||
|
buffer). The rest of the buffer is dropped. The specified `length` must not be
|
||||||
|
larger than the buffer length.
|
||||||
|
|
||||||
|
## ptr
|
||||||
|
|
||||||
|
```c
|
||||||
|
char *Curl_dyn_ptr(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns a `char *` to the buffer if it has a length, otherwise a NULL. Since
|
||||||
|
the buffer may be reallocated, this pointer should not be trusted or used
|
||||||
|
anymore after the next buffer manipulation call.
|
||||||
|
|
||||||
|
## uptr
|
||||||
|
|
||||||
|
```c
|
||||||
|
unsigned char *Curl_dyn_uptr(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns an `unsigned char *` to the buffer if it has a length, otherwise a
|
||||||
|
NULL. Since the buffer may be reallocated, this pointer should not be trusted
|
||||||
|
or used anymore after the next buffer manipulation call.
|
||||||
|
|
||||||
|
## len
|
||||||
|
|
||||||
|
```c
|
||||||
|
size_t Curl_dyn_len(const struct dynbuf *s);
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns the length of the buffer in bytes. Does not include the terminating
|
||||||
|
zero byte.
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
# TLS: ECH support in curl and libcurl
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
**ECH** means **Encrypted Client Hello**, a TLS 1.3 extension which is
|
||||||
|
currently the subject of an [IETF Draft][tlsesni]. (ECH was formerly known as
|
||||||
|
ESNI).
|
||||||
|
|
||||||
|
This file is intended to show the latest current state of ECH support
|
||||||
|
in **curl** and **libcurl**.
|
||||||
|
|
||||||
|
At end of August 2019, an [experimental fork of curl][niallorcurl], built
|
||||||
|
using an [experimental fork of OpenSSL][sftcdopenssl], which in turn provided
|
||||||
|
an implementation of ECH, was demonstrated interoperating with a server
|
||||||
|
belonging to the [DEfO Project][defoproj].
|
||||||
|
|
||||||
|
Further sections here describe
|
||||||
|
|
||||||
|
- resources needed for building and demonstrating **curl** support
|
||||||
|
for ECH,
|
||||||
|
|
||||||
|
- progress to date,
|
||||||
|
|
||||||
|
- TODO items, and
|
||||||
|
|
||||||
|
- additional details of specific stages of the progress.
|
||||||
|
|
||||||
|
## Resources needed
|
||||||
|
|
||||||
|
To build and demonstrate ECH support in **curl** and/or **libcurl**,
|
||||||
|
you will need
|
||||||
|
|
||||||
|
- a TLS library, supported by **libcurl**, which implements ECH;
|
||||||
|
|
||||||
|
- an edition of **curl** and/or **libcurl** which supports the ECH
|
||||||
|
implementation of the chosen TLS library;
|
||||||
|
|
||||||
|
- an environment for building and running **curl**, and at least
|
||||||
|
building **OpenSSL**;
|
||||||
|
|
||||||
|
- a server, supporting ECH, against which to run a demonstration
|
||||||
|
and perhaps a specific target URL;
|
||||||
|
|
||||||
|
- some instructions.
|
||||||
|
|
||||||
|
The following set of resources is currently known to be available.
|
||||||
|
|
||||||
|
| Set | Component | Location | Remarks |
|
||||||
|
|:-----|:-------------|:------------------------------|:-------------------------------------------|
|
||||||
|
| DEfO | TLS library | [sftcd/openssl][sftcdopenssl] | Tag *esni-2019-08-30* avoids bleeding edge |
|
||||||
|
| | curl fork | [niallor/curl][niallorcurl] | Tag *esni-2019-08-30* likewise |
|
||||||
|
| | instructions | [ESNI-README][niallorreadme] | |
|
||||||
|
|
||||||
|
## Progress
|
||||||
|
|
||||||
|
### PR 4011 (Jun 2019) expected in curl release 7.67.0 (Oct 2019)
|
||||||
|
|
||||||
|
- Details [below](#pr4011);
|
||||||
|
|
||||||
|
- New configuration option: `--enable-ech`;
|
||||||
|
|
||||||
|
- Build-time check for availability of resources needed for ECH
|
||||||
|
support;
|
||||||
|
|
||||||
|
- Pre-processor symbol `USE_ECH` for conditional compilation of
|
||||||
|
ECH support code, subject to configuration option and
|
||||||
|
availability of needed resources.
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
- (next PR) Add libcurl options to set ECH parameters.
|
||||||
|
|
||||||
|
- (next PR) Add curl tool command line options to set ECH parameters.
|
||||||
|
|
||||||
|
- (WIP) Extend DoH functions so that published ECH parameters can be
|
||||||
|
retrieved from DNS instead of being required as options.
|
||||||
|
|
||||||
|
- (WIP) Work with OpenSSL community to finalize ECH API.
|
||||||
|
|
||||||
|
- Track OpenSSL ECH API in libcurl
|
||||||
|
|
||||||
|
- Identify and implement any changes needed for CMake.
|
||||||
|
|
||||||
|
- Optimize build-time checking of available resources.
|
||||||
|
|
||||||
|
- Encourage ECH support work on other TLS/SSL backends.
|
||||||
|
|
||||||
|
## Additional detail
|
||||||
|
|
||||||
|
### PR 4011
|
||||||
|
|
||||||
|
**TLS: Provide ECH support framework for curl and libcurl**
|
||||||
|
|
||||||
|
The proposed change provides a framework to facilitate work to implement ECH
|
||||||
|
support in curl and libcurl. It is not intended either to provide ECH
|
||||||
|
functionality or to favour any particular TLS-providing backend. Specifically,
|
||||||
|
the change reserves a feature bit for ECH support (symbol
|
||||||
|
`CURL_VERSION_ECH`), implements setting and reporting of this bit, includes
|
||||||
|
dummy book-keeping for the symbol, adds a build-time configuration option
|
||||||
|
(`--enable-ech`), provides an extensible check for resources available to
|
||||||
|
provide ECH support, and defines a compiler pre-processor symbol (`USE_ECH`)
|
||||||
|
accordingly.
|
||||||
|
|
||||||
|
Proposed-by: @niallor (Niall O'Reilly)\
|
||||||
|
Encouraged-by: @sftcd (Stephen Farrell)\
|
||||||
|
See-also: [this message](https://curl.se/mail/lib-2019-05/0108.html)
|
||||||
|
|
||||||
|
Limitations:
|
||||||
|
- Book-keeping (symbols-in-versions) needs real release number, not 'DUMMY'.
|
||||||
|
|
||||||
|
- Framework is incomplete, as it covers autoconf, but not CMake.
|
||||||
|
|
||||||
|
- Check for available resources, although extensible, refers only to
|
||||||
|
specific work in progress ([described
|
||||||
|
here](https://github.com/sftcd/openssl/tree/master/esnistuff)) to
|
||||||
|
implement ECH for OpenSSL, as this is the immediate motivation
|
||||||
|
for the proposed change.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
Cloudflare blog: [Encrypting SNI: Fixing One of the Core Internet Bugs][corebug]
|
||||||
|
|
||||||
|
Cloudflare blog: [Encrypt it or lose it: how encrypted SNI works][esniworks]
|
||||||
|
|
||||||
|
IETF Draft: [Encrypted Server Name Indication for TLS 1.3][tlsesni]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[tlsesni]: https://datatracker.ietf.org/doc/draft-ietf-tls-esni/
|
||||||
|
[esniworks]: https://blog.cloudflare.com/encrypted-sni/
|
||||||
|
[corebug]: https://blog.cloudflare.com/esni/
|
||||||
|
[defoproj]: https://defo.ie/
|
||||||
|
[sftcdopenssl]: https://github.com/sftcd/openssl/
|
||||||
|
[niallorcurl]: https://github.com/niallor/curl/
|
||||||
|
[niallorreadme]: https://github.com/niallor/curl/blob/master/ESNI-README.md
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Experimental
|
||||||
|
|
||||||
|
Some features and functionality in curl and libcurl are considered
|
||||||
|
**EXPERIMENTAL**.
|
||||||
|
|
||||||
|
Experimental support in curl means:
|
||||||
|
|
||||||
|
1. Experimental features are provided to allow users to try them out and
|
||||||
|
provide feedback on functionality and API etc before they ship and get
|
||||||
|
"carved in stone".
|
||||||
|
2. You must enable the feature when invoking configure as otherwise curl will
|
||||||
|
not be built with the feature present.
|
||||||
|
3. We strongly advice against using this feature in production.
|
||||||
|
4. **We reserve the right to change behavior** of the feature without sticking
|
||||||
|
to our API/ABI rules as we do for regular features, as long as it is marked
|
||||||
|
experimental.
|
||||||
|
5. Experimental features are clearly marked so in documentation. Beware.
|
||||||
|
|
||||||
|
## Experimental features right now
|
||||||
|
|
||||||
|
- The Hyper HTTP backend
|
||||||
|
- HTTP/3 support and options
|
||||||
|
- CURLSSLOPT_NATIVE_CA (No configure option, feature built in when supported)
|
||||||
|
- HSTS support and options
|
||||||
+1496
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,223 @@
|
|||||||
|
# Features -- what curl can do
|
||||||
|
|
||||||
|
## curl tool
|
||||||
|
|
||||||
|
- config file support
|
||||||
|
- multiple URLs in a single command line
|
||||||
|
- range "globbing" support: [0-13], {one,two,three}
|
||||||
|
- multiple file upload on a single command line
|
||||||
|
- custom maximum transfer rate
|
||||||
|
- redirectable stderr
|
||||||
|
- metalink support (13)
|
||||||
|
- parallel transfers
|
||||||
|
|
||||||
|
## libcurl
|
||||||
|
|
||||||
|
- full URL syntax with no length limit
|
||||||
|
- custom maximum download time
|
||||||
|
- custom least download speed acceptable
|
||||||
|
- custom output result after completion
|
||||||
|
- guesses protocol from host name unless specified
|
||||||
|
- uses .netrc
|
||||||
|
- progress bar with time statistics while downloading
|
||||||
|
- "standard" proxy environment variables support
|
||||||
|
- compiles on win32 (reported builds on 70+ operating systems)
|
||||||
|
- selectable network interface for outgoing traffic
|
||||||
|
- IPv6 support on unix and Windows
|
||||||
|
- happy eyeballs dual-stack connects
|
||||||
|
- persistent connections
|
||||||
|
- SOCKS 4 + 5 support, with or without local name resolving
|
||||||
|
- supports user name and password in proxy environment variables
|
||||||
|
- operations through HTTP proxy "tunnel" (using CONNECT)
|
||||||
|
- replaceable memory functions (malloc, free, realloc, etc)
|
||||||
|
- asynchronous name resolving (6)
|
||||||
|
- both a push and a pull style interface
|
||||||
|
- international domain names (11)
|
||||||
|
|
||||||
|
## HTTP
|
||||||
|
|
||||||
|
- HTTP/0.9 responses are optionally accepted
|
||||||
|
- HTTP/1.0
|
||||||
|
- HTTP/1.1
|
||||||
|
- HTTP/2, including multiplexing and server push (5)
|
||||||
|
- GET
|
||||||
|
- PUT
|
||||||
|
- HEAD
|
||||||
|
- POST
|
||||||
|
- multipart formpost (RFC1867-style)
|
||||||
|
- authentication: Basic, Digest, NTLM (9) and Negotiate (SPNEGO) (3)
|
||||||
|
to server and proxy
|
||||||
|
- resume (both GET and PUT)
|
||||||
|
- follow redirects
|
||||||
|
- maximum amount of redirects to follow
|
||||||
|
- custom HTTP request
|
||||||
|
- cookie get/send fully parsed
|
||||||
|
- reads/writes the netscape cookie file format
|
||||||
|
- custom headers (replace/remove internally generated headers)
|
||||||
|
- custom user-agent string
|
||||||
|
- custom referrer string
|
||||||
|
- range
|
||||||
|
- proxy authentication
|
||||||
|
- time conditions
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- retrieve file modification date
|
||||||
|
- Content-Encoding support for deflate and gzip
|
||||||
|
- "Transfer-Encoding: chunked" support in uploads
|
||||||
|
- automatic data compression (12)
|
||||||
|
|
||||||
|
## HTTPS (1)
|
||||||
|
|
||||||
|
- (all the HTTP features)
|
||||||
|
- HTTP/3 experimental support
|
||||||
|
- using client certificates
|
||||||
|
- verify server certificate
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- select desired encryption
|
||||||
|
- select usage of a specific SSL version
|
||||||
|
|
||||||
|
## FTP
|
||||||
|
|
||||||
|
- download
|
||||||
|
- authentication
|
||||||
|
- Kerberos 5 (14)
|
||||||
|
- active/passive using PORT, EPRT, PASV or EPSV
|
||||||
|
- single file size information (compare to HTTP HEAD)
|
||||||
|
- 'type=' URL support
|
||||||
|
- dir listing
|
||||||
|
- dir listing names-only
|
||||||
|
- upload
|
||||||
|
- upload append
|
||||||
|
- upload via http-proxy as HTTP PUT
|
||||||
|
- download resume
|
||||||
|
- upload resume
|
||||||
|
- custom ftp commands (before and/or after the transfer)
|
||||||
|
- simple "range" support
|
||||||
|
- via HTTP proxy, HTTPS proxy or SOCKS proxy
|
||||||
|
- all operations can be tunneled through proxy
|
||||||
|
- customizable to retrieve file modification date
|
||||||
|
- no dir depth limit
|
||||||
|
|
||||||
|
## FTPS (1)
|
||||||
|
|
||||||
|
- implicit `ftps://` support that use SSL on both connections
|
||||||
|
- explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain `ftp://`
|
||||||
|
connection to use SSL for both or one of the connections
|
||||||
|
|
||||||
|
## SCP (8)
|
||||||
|
|
||||||
|
- both password and public key auth
|
||||||
|
|
||||||
|
## SFTP (7)
|
||||||
|
|
||||||
|
- both password and public key auth
|
||||||
|
- with custom commands sent before/after the transfer
|
||||||
|
|
||||||
|
## TFTP
|
||||||
|
|
||||||
|
- download
|
||||||
|
- upload
|
||||||
|
|
||||||
|
## TELNET
|
||||||
|
|
||||||
|
- connection negotiation
|
||||||
|
- custom telnet options
|
||||||
|
- stdin/stdout I/O
|
||||||
|
|
||||||
|
## LDAP (2)
|
||||||
|
|
||||||
|
- full LDAP URL support
|
||||||
|
|
||||||
|
## DICT
|
||||||
|
|
||||||
|
- extended DICT URL support
|
||||||
|
|
||||||
|
## FILE
|
||||||
|
|
||||||
|
- URL support
|
||||||
|
- upload
|
||||||
|
- resume
|
||||||
|
|
||||||
|
## SMB
|
||||||
|
|
||||||
|
- SMBv1 over TCP and SSL
|
||||||
|
- download
|
||||||
|
- upload
|
||||||
|
- authentication with NTLMv1
|
||||||
|
|
||||||
|
## SMTP
|
||||||
|
|
||||||
|
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9), Kerberos 5
|
||||||
|
(4) and External.
|
||||||
|
- send e-mails
|
||||||
|
- mail from support
|
||||||
|
- mail size support
|
||||||
|
- mail auth support for trusted server-to-server relaying
|
||||||
|
- multiple recipients
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## SMTPS (1)
|
||||||
|
|
||||||
|
- implicit `smtps://` support
|
||||||
|
- explicit "STARTTLS" usage to "upgrade" plain `smtp://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## POP3
|
||||||
|
|
||||||
|
- authentication: Clear Text, APOP and SASL
|
||||||
|
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
|
||||||
|
Kerberos 5 (4) and External.
|
||||||
|
- list e-mails
|
||||||
|
- retrieve e-mails
|
||||||
|
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
|
||||||
|
custom requests
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## POP3S (1)
|
||||||
|
|
||||||
|
- implicit `pop3s://` support
|
||||||
|
- explicit "STLS" usage to "upgrade" plain `pop3://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## IMAP
|
||||||
|
|
||||||
|
- authentication: Clear Text and SASL
|
||||||
|
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (9),
|
||||||
|
Kerberos 5 (4) and External.
|
||||||
|
- list the folders of a mailbox
|
||||||
|
- select a mailbox with support for verifying the UIDVALIDITY
|
||||||
|
- fetch e-mails with support for specifying the UID and SECTION
|
||||||
|
- upload e-mails via the append command
|
||||||
|
- enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
|
||||||
|
STORE, COPY and UID via custom requests
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## IMAPS (1)
|
||||||
|
|
||||||
|
- implicit `imaps://` support
|
||||||
|
- explicit "STARTTLS" usage to "upgrade" plain `imap://` connections to use SSL
|
||||||
|
- via http-proxy
|
||||||
|
|
||||||
|
## MQTT
|
||||||
|
|
||||||
|
- Subscribe to and publish topics using url scheme `mqtt://broker/topic`
|
||||||
|
|
||||||
|
## Footnotes
|
||||||
|
|
||||||
|
1. requires a TLS library
|
||||||
|
2. requires OpenLDAP or WinLDAP
|
||||||
|
3. requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
|
||||||
|
SSPI (native Windows)
|
||||||
|
4. requires a GSS-API implementation, however, only Windows SSPI is
|
||||||
|
currently supported
|
||||||
|
5. requires nghttp2
|
||||||
|
6. requires c-ares
|
||||||
|
7. requires libssh2, libssh or wolfSSH
|
||||||
|
8. requires libssh2 or libssh
|
||||||
|
9. requires OpenSSL, GnuTLS, mbedTLS, NSS, yassl, Secure Transport or SSPI
|
||||||
|
(native Windows)
|
||||||
|
10. -
|
||||||
|
11. requires libidn2 or Windows
|
||||||
|
12. requires libz, brotli and/or zstd
|
||||||
|
13. requires libmetalink, and either an Apple or Microsoft operating
|
||||||
|
system, or OpenSSL, or GnuTLS, or NSS
|
||||||
|
14. requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
# Decision making in the curl project
|
||||||
|
|
||||||
|
A rough guide to how we make decisions and who does what.
|
||||||
|
|
||||||
|
## BDFL
|
||||||
|
|
||||||
|
This project was started by and has to some extent been pushed forward over
|
||||||
|
the years with Daniel Stenberg as the driving force. It matches a standard
|
||||||
|
BDFL (Benevolent Dictator For Life) style project.
|
||||||
|
|
||||||
|
This setup has been used due to convenience and the fact that is has worked
|
||||||
|
fine this far. It is not because someone thinks of it as a superior project
|
||||||
|
leadership model. It will also only continue working as long as Daniel manages
|
||||||
|
to listen in to what the project and the general user population wants and
|
||||||
|
expects from us.
|
||||||
|
|
||||||
|
## Legal entity
|
||||||
|
|
||||||
|
There is no legal entity. The curl project is just a bunch of people scattered
|
||||||
|
around the globe with the common goal to produce source code that creates
|
||||||
|
great products. We are not part of any umbrella organization and we are not
|
||||||
|
located in any specific country. We are totally independent.
|
||||||
|
|
||||||
|
The copyrights in the project are owned by the individuals and organizations
|
||||||
|
that wrote those parts of the code.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
The curl project is not a democracy, but everyone is entitled to state their
|
||||||
|
opinion and may argue for their sake within the community.
|
||||||
|
|
||||||
|
All and any changes that have been done or will be done are eligible to bring
|
||||||
|
up for discussion, to object to or to praise. Ideally, we find consensus for
|
||||||
|
the appropriate way forward in any given situation or challenge.
|
||||||
|
|
||||||
|
If there is no obvious consensus, a maintainer who's knowledgeable in the
|
||||||
|
specific area will take an "executive" decision that they think is the right
|
||||||
|
for the project.
|
||||||
|
|
||||||
|
## Donations
|
||||||
|
|
||||||
|
Donating plain money to curl is best done to curl's [Open Collective
|
||||||
|
fund](https://opencollective.com/curl). Open Collective is a US based
|
||||||
|
non-profit organization that holds on to funds for us. This fund is then used
|
||||||
|
for paying the curl security bug bounties, to reimburse project related
|
||||||
|
expenses etc.
|
||||||
|
|
||||||
|
Donations to the project can also come in form of server hosting, providing
|
||||||
|
services and paying for people to work on curl related code etc. Usually, such
|
||||||
|
donations are services paid for directly by the sponsors.
|
||||||
|
|
||||||
|
We grade sponsors in a few different levels and if they meet the criteria,
|
||||||
|
they can be mentioned on the Sponsors page on the curl website.
|
||||||
|
|
||||||
|
## Commercial Support
|
||||||
|
|
||||||
|
The curl project does not do or offer commercial support. It only hosts
|
||||||
|
mailing lists, runs bug trackers etc to facilitate communication and work.
|
||||||
|
|
||||||
|
However, Daniel works for wolfSSL and we offer commercial curl support there.
|
||||||
|
|
||||||
|
## Key roles
|
||||||
|
|
||||||
|
### Maintainers
|
||||||
|
|
||||||
|
A maintainer in the curl project is an individual who has been given
|
||||||
|
permissions to push commits to one of the git repositories.
|
||||||
|
|
||||||
|
Maintainers are free to push commits to the repositories at their own will.
|
||||||
|
Maintainers are however expected to listen to feedback from users and any
|
||||||
|
change that is non-trivial in size or nature *should* be brought to the
|
||||||
|
project as a PR to allow others to comment/object before merge.
|
||||||
|
|
||||||
|
### Former maintainers
|
||||||
|
|
||||||
|
A maintainer who stops being active in the project will at some point get
|
||||||
|
their push permissions removed. We do this for security reasons but also to
|
||||||
|
make sure that we always have the list of maintainers as "the team that push
|
||||||
|
stuff to curl".
|
||||||
|
|
||||||
|
Getting push permissions removed is not a punishment. Everyone who ever worked
|
||||||
|
on maintaining curl is considered a hero, for all time hereafter.
|
||||||
|
|
||||||
|
### Security team members
|
||||||
|
|
||||||
|
We have a security team. That's the team of people who are subscribed to the
|
||||||
|
curl-security mailing list; the receivers of security reports from users and
|
||||||
|
developers. This list of people will vary over time but should be skilled
|
||||||
|
developers familiar with the curl project.
|
||||||
|
|
||||||
|
The security team works best when it consists of a small set of active
|
||||||
|
persons. We invite new members when the team seems to need it, and we also
|
||||||
|
expect to retire security team members as they "drift off" from the project or
|
||||||
|
just find themselves unable to perform their duties there.
|
||||||
|
|
||||||
|
### Server admins
|
||||||
|
|
||||||
|
We run a web server, a mailing list and more on the curl project's primary
|
||||||
|
server. That physical machine is owned and run by Haxx. Daniel is the primary
|
||||||
|
admin of all things curl related server stuff, but Björn Stenberg and Linus
|
||||||
|
Feltzing serve as backup admins for when Daniel is gone or unable.
|
||||||
|
|
||||||
|
The primary server is paid for by Haxx. The machine is physically located in a
|
||||||
|
server bunker in Stockholm Sweden, operated by the company Portlane.
|
||||||
|
|
||||||
|
The website contents are served to the web via Fastly and Daniel is the
|
||||||
|
primary curl contact with Fastly.
|
||||||
|
|
||||||
|
### BDFL
|
||||||
|
|
||||||
|
That's Daniel.
|
||||||
|
|
||||||
|
# Maintainers
|
||||||
|
|
||||||
|
A curl maintainer is a project volunteer who has the authority and rights to
|
||||||
|
merge changes into a git repository in the curl project.
|
||||||
|
|
||||||
|
Anyone can aspire to become a curl maintainer.
|
||||||
|
|
||||||
|
### Duties
|
||||||
|
|
||||||
|
There are no mandatory duties. We hope and wish that maintainers consider
|
||||||
|
reviewing patches and help merging them, especially when the changes are
|
||||||
|
within the area of personal expertise and experience.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
- only merge code that meets our quality and style guide requirements.
|
||||||
|
- *never* merge code without doing a PR first, unless the change is "trivial"
|
||||||
|
- if in doubt, ask for input/feedback from others
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
|
||||||
|
- we require two-factor authentication enabled on your github account to
|
||||||
|
reduce risk of malicious source code tampering
|
||||||
|
- consider enabling signed git commits for additional verification of changes
|
||||||
|
|
||||||
|
### Merge advice
|
||||||
|
|
||||||
|
When you're merging patches/PRs...
|
||||||
|
|
||||||
|
- make sure the commit messages follow our template
|
||||||
|
- squash patch sets into a few logical commits even if the PR didn't, if
|
||||||
|
necessary
|
||||||
|
- avoid the "merge" button on github, do it "manually" instead to get full
|
||||||
|
control and full audit trail (github leaves out you as "Committer:")
|
||||||
|
- remember to credit the reporter and the helpers!
|
||||||
|
|
||||||
|
## Who are maintainers?
|
||||||
|
|
||||||
|
The [list of maintainers](https://github.com/orgs/curl/people). Be aware that
|
||||||
|
the level of presence and activity in the project vary greatly between
|
||||||
|
different individuals and over time.
|
||||||
|
|
||||||
|
### Become a maintainer?
|
||||||
|
|
||||||
|
If you think you can help making the project better by shouldering some
|
||||||
|
maintaining responsibilities, then please get in touch.
|
||||||
|
|
||||||
|
You will be expected to be familiar with the curl project and its ways of
|
||||||
|
working. You need to have gotten a few quality patches merged as a proof of
|
||||||
|
this.
|
||||||
|
|
||||||
|
### Stop being a maintainer
|
||||||
|
|
||||||
|
If you (appear to) not be active in the project anymore, you may be removed as
|
||||||
|
a maintainer. Thank you for your service!
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
# How to get started helping out in the curl project
|
||||||
|
|
||||||
|
We are always in need of more help. If you are new to the project and are
|
||||||
|
looking for ways to contribute and help out, this document aims to give a few
|
||||||
|
good starting points.
|
||||||
|
|
||||||
|
A good idea is to start by subscribing to the [curl-library mailing
|
||||||
|
list](https://cool.haxx.se/mailman/listinfo/curl-library) to keep track of the
|
||||||
|
current discussion topics.
|
||||||
|
|
||||||
|
## Scratch your own itch
|
||||||
|
|
||||||
|
One of the best ways is to start working on any problems or issues you have
|
||||||
|
found yourself or perhaps got annoyed at in the past. It can be a spelling
|
||||||
|
error in an error text or a weirdly phrased section in a man page. Hunt it
|
||||||
|
down and report the bug. Or make your first pull request with a fix for that.
|
||||||
|
|
||||||
|
## Smaller tasks
|
||||||
|
|
||||||
|
Some projects mark small issues as "beginner friendly", "bite-sized" or
|
||||||
|
similar. We don't do that in curl since such issues never linger around long
|
||||||
|
enough. Simple issues get handled very fast.
|
||||||
|
|
||||||
|
If you're looking for a smaller or simpler task in the project to help out
|
||||||
|
with as an entry-point into the project, perhaps because you are a newcomer or
|
||||||
|
even maybe not a terribly experienced developer, here's our advice:
|
||||||
|
|
||||||
|
- Read through this document to get a grasp on a general approach to use
|
||||||
|
- Consider adding a test case for something not currently tested (correctly)
|
||||||
|
- Consider updating or adding documentation
|
||||||
|
- One way to get your feet wet gently in the project, is to participate in an
|
||||||
|
existing issue/PR and help out by reproducing the issue, review the code in
|
||||||
|
the PR etc.
|
||||||
|
|
||||||
|
## Help wanted
|
||||||
|
|
||||||
|
In the issue tracker we occasionally mark bugs with [help
|
||||||
|
wanted](https://github.com/curl/curl/labels/help%20wanted), as a sign that the
|
||||||
|
bug is acknowledged to exist and that there's nobody known to work on this
|
||||||
|
issue for the moment. Those are bugs that are fine to "grab" and provide a
|
||||||
|
pull request for. The complexity level of these will of course vary, so pick
|
||||||
|
one that piques your interest.
|
||||||
|
|
||||||
|
## Work on known bugs
|
||||||
|
|
||||||
|
Some bugs are known and haven't yet received attention and work enough to get
|
||||||
|
fixed. We collect such known existing flaws in the
|
||||||
|
[KNOWN_BUGS](https://curl.se/docs/knownbugs.html) page. Many of them link
|
||||||
|
to the original bug report with some additional details, but some may also
|
||||||
|
have aged a bit and may require some verification that the bug still exists in
|
||||||
|
the same way and that what was said about it in the past is still valid.
|
||||||
|
|
||||||
|
## Fix autobuild problems
|
||||||
|
|
||||||
|
On the [autobuilds page](https://curl.se/dev/builds.html) we show a
|
||||||
|
collection of test results from the automatic curl build and tests that are
|
||||||
|
performed by volunteers. Fixing compiler warnings and errors shown there is
|
||||||
|
something we value greatly. Also, if you own or run systems or architectures
|
||||||
|
that aren't already tested in the autobuilds, we also appreciate more
|
||||||
|
volunteers running builds automatically to help us keep curl portable.
|
||||||
|
|
||||||
|
## TODO items
|
||||||
|
|
||||||
|
Ideas for features and functions that we have considered worthwhile to
|
||||||
|
implement and provide are kept in the
|
||||||
|
[TODO](https://curl.se/docs/todo.html) file. Some of the ideas are
|
||||||
|
rough. Some are well thought out. Some probably aren't really suitable
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
Before you invest a lot of time on a TODO item, do bring it up for discussion
|
||||||
|
on the mailing list. For discussion on applicability but also for ideas and
|
||||||
|
brainstorming on specific ways to do the implementation etc.
|
||||||
|
|
||||||
|
## You decide
|
||||||
|
|
||||||
|
You can also come up with a completely new thing you think we should do. Or
|
||||||
|
not do. Or fix. Or add to the project. You then either bring it to the mailing
|
||||||
|
list first to see if people will shoot down the idea at once, or you bring a
|
||||||
|
first draft of the idea as a pull request and take the discussion there around
|
||||||
|
the specific implementation. Either way is fine.
|
||||||
|
|
||||||
|
## CONTRIBUTE
|
||||||
|
|
||||||
|
We offer [guidelines](https://curl.se/dev/contribute.html) that are
|
||||||
|
suitable to be familiar with before you decide to contribute to curl. If
|
||||||
|
you're used to open source development, you'll probably not find many
|
||||||
|
surprises in there.
|
||||||
@@ -0,0 +1,406 @@
|
|||||||
|
How curl Became Like This
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot
|
||||||
|
for an Amiga related channel on EFnet. He then came up with the idea to make
|
||||||
|
currency-exchange calculations available to Internet Relay Chat (IRC)
|
||||||
|
users. All the necessary data were published on the Web; he just needed to
|
||||||
|
automate their retrieval.
|
||||||
|
|
||||||
|
1996
|
||||||
|
----
|
||||||
|
|
||||||
|
On November 11, 1996 the Brazilian developer Rafael Sagula wrote and released
|
||||||
|
HttpGet version 0.1.
|
||||||
|
|
||||||
|
Daniel extended this existing command-line open-source tool. After a few minor
|
||||||
|
adjustments, it did just what he needed. The first release with Daniel's
|
||||||
|
additions was 0.2, released on December 17, 1996. Daniel quickly became the
|
||||||
|
new maintainer of the project.
|
||||||
|
|
||||||
|
1997
|
||||||
|
----
|
||||||
|
|
||||||
|
HttpGet 0.3 was released in January 1997 and now it accepted HTTP URLs on the
|
||||||
|
command line.
|
||||||
|
|
||||||
|
HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support.
|
||||||
|
|
||||||
|
We soon found and fixed support for getting currencies over GOPHER. Once FTP
|
||||||
|
download support was added, the name of the project was changed and urlget 2.0
|
||||||
|
was released in August 1997. The http-only days were already passed.
|
||||||
|
|
||||||
|
Version 2.2 was released on August 14 1997 and introduced support to build for
|
||||||
|
and run on Windows and Solaris.
|
||||||
|
|
||||||
|
November 24 1997: Version 3.1 added FTP upload support.
|
||||||
|
|
||||||
|
Version 3.5 added support for HTTP POST.
|
||||||
|
|
||||||
|
1998
|
||||||
|
----
|
||||||
|
|
||||||
|
February 4: urlget 3.10
|
||||||
|
|
||||||
|
February 9: urlget 3.11
|
||||||
|
|
||||||
|
March 14: urlget 3.12 added proxy authentication.
|
||||||
|
|
||||||
|
The project slowly grew bigger. With upload capabilities, the name was once
|
||||||
|
again misleading and a second name change was made. On March 20, 1998 curl 4
|
||||||
|
was released. (The version numbering from the previous names was kept.)
|
||||||
|
|
||||||
|
(Unrelated to this project a company called Curl Corporation registered a US
|
||||||
|
trademark on the name "CURL" on May 18 1998. That company had then already
|
||||||
|
registered the curl.com domain back in November of the previous year. All this
|
||||||
|
was revealed to us much later.)
|
||||||
|
|
||||||
|
SSL support was added, powered by the SSLeay library.
|
||||||
|
|
||||||
|
August: first announcement of curl on freshmeat.net.
|
||||||
|
|
||||||
|
October: with the curl 4.9 release and the introduction of cookie support,
|
||||||
|
curl was no longer released under the GPL license. Now we're at 4000 lines of
|
||||||
|
code, we switched over to the MPL license to restrict the effects of
|
||||||
|
"copyleft".
|
||||||
|
|
||||||
|
November: configure script and reported successful compiles on several
|
||||||
|
major operating systems. The never-quite-understood -F option was added and
|
||||||
|
curl could now simulate quite a lot of a browser. TELNET support was added.
|
||||||
|
|
||||||
|
Curl 5 was released in December 1998 and introduced the first ever curl man
|
||||||
|
page. People started making Linux RPM packages out of it.
|
||||||
|
|
||||||
|
1999
|
||||||
|
----
|
||||||
|
|
||||||
|
January: DICT support added.
|
||||||
|
|
||||||
|
OpenSSL took over and SSLeay was abandoned.
|
||||||
|
|
||||||
|
May: first Debian package.
|
||||||
|
|
||||||
|
August: LDAP:// and FILE:// support added. The curl website gets 1300 visits
|
||||||
|
weekly. Moved site to curl.haxx.nu.
|
||||||
|
|
||||||
|
September: Released curl 6.0. 15000 lines of code.
|
||||||
|
|
||||||
|
December 28: added the project on Sourceforge and started using its services
|
||||||
|
for managing the project.
|
||||||
|
|
||||||
|
2000
|
||||||
|
----
|
||||||
|
|
||||||
|
Spring: major internal overhaul to provide a suitable library interface.
|
||||||
|
The first non-beta release was named 7.1 and arrived in August. This offered
|
||||||
|
the easy interface and turned out to be the beginning of actually getting
|
||||||
|
other software and programs to be based on and powered by libcurl. Almost
|
||||||
|
20000 lines of code.
|
||||||
|
|
||||||
|
June: the curl site moves to "curl.haxx.se"
|
||||||
|
|
||||||
|
August, the curl website gets 4000 visits weekly.
|
||||||
|
|
||||||
|
The PHP guys adopted libcurl already the same month, when the first ever third
|
||||||
|
party libcurl binding showed up. CURL has been a supported module in PHP since
|
||||||
|
the release of PHP 4.0.2. This would soon get followers. More than 16
|
||||||
|
different bindings exist at the time of this writing.
|
||||||
|
|
||||||
|
September: kerberos4 support was added.
|
||||||
|
|
||||||
|
November: started the work on a test suite for curl. It was later re-written
|
||||||
|
from scratch again. The libcurl major SONAME number was set to 1.
|
||||||
|
|
||||||
|
2001
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||||
|
MPL). The MIT license is extremely liberal and can be combined with GPL
|
||||||
|
in other projects. This would finally put an end to the "complaints" from
|
||||||
|
people involved in GPLed projects that previously were prohibited from using
|
||||||
|
libcurl while it was released under MPL only. (Due to the fact that MPL is
|
||||||
|
deemed "GPL incompatible".)
|
||||||
|
|
||||||
|
March 22: curl supports HTTP 1.1 starting with the release of 7.7. This
|
||||||
|
also introduced libcurl's ability to do persistent connections. 24000 lines of
|
||||||
|
code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
|
||||||
|
The first experimental ftps:// support was added.
|
||||||
|
|
||||||
|
August: curl is bundled in Mac OS X, 10.1. It was already becoming more and
|
||||||
|
more of a standard utility of Linux distributions and a regular in the BSD
|
||||||
|
ports collections. The curl website gets 8000 visits weekly. Curl Corporation
|
||||||
|
contacted Daniel to discuss "the name issue". After Daniel's reply, they have
|
||||||
|
never since got back in touch again.
|
||||||
|
|
||||||
|
September: libcurl 7.9 introduces cookie jar and curl_formadd(). During the
|
||||||
|
forthcoming 7.9.x releases, we introduced the multi interface slowly and
|
||||||
|
without many whistles.
|
||||||
|
|
||||||
|
2002
|
||||||
|
----
|
||||||
|
|
||||||
|
June: the curl website gets 13000 visits weekly. curl and libcurl is
|
||||||
|
35000 lines of code. Reported successful compiles on more than 40 combinations
|
||||||
|
of CPUs and operating systems.
|
||||||
|
|
||||||
|
To estimate number of users of the curl tool or libcurl library is next to
|
||||||
|
impossible. Around 5000 downloaded packages each week from the main site gives
|
||||||
|
a hint, but the packages are mirrored extensively, bundled with numerous OS
|
||||||
|
distributions and otherwise retrieved as part of other software.
|
||||||
|
|
||||||
|
October 1: with the release of curl 7.10 it is released under the MIT license
|
||||||
|
only.
|
||||||
|
|
||||||
|
Starting with 7.10, curl verifies SSL server certificates by default.
|
||||||
|
|
||||||
|
2003
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Started working on the distributed curl tests. The autobuilds.
|
||||||
|
|
||||||
|
February: the curl site averages at 20000 visits weekly. At any given moment,
|
||||||
|
there's an average of 3 people browsing the website.
|
||||||
|
|
||||||
|
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
|
||||||
|
and Negotiate (June).
|
||||||
|
|
||||||
|
November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
|
||||||
|
to the website. Five official web mirrors.
|
||||||
|
|
||||||
|
December: full-fledged SSL for FTP is supported.
|
||||||
|
|
||||||
|
2004
|
||||||
|
----
|
||||||
|
|
||||||
|
January: curl 7.11.0 introduced large file support.
|
||||||
|
|
||||||
|
June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||||
|
|
||||||
|
This release bumped the major SONAME to 3 due to the removal of the
|
||||||
|
curl_formparse() function
|
||||||
|
|
||||||
|
August: Curl and libcurl 7.12.1
|
||||||
|
|
||||||
|
Public curl release number: 82
|
||||||
|
Releases counted from the very beginning: 109
|
||||||
|
Available command line options: 96
|
||||||
|
Available curl_easy_setopt() options: 120
|
||||||
|
Number of public functions in libcurl: 36
|
||||||
|
Amount of public website mirrors: 12
|
||||||
|
Number of known libcurl bindings: 26
|
||||||
|
|
||||||
|
2005
|
||||||
|
----
|
||||||
|
|
||||||
|
April: GnuTLS can now optionally be used for the secure layer when curl is
|
||||||
|
built.
|
||||||
|
|
||||||
|
April: Added the multi_socket() API
|
||||||
|
|
||||||
|
September: TFTP support was added.
|
||||||
|
|
||||||
|
More than 100,000 unique visitors of the curl website. 25 mirrors.
|
||||||
|
|
||||||
|
December: security vulnerability: libcurl URL Buffer Overflow
|
||||||
|
|
||||||
|
2006
|
||||||
|
----
|
||||||
|
|
||||||
|
January: We dropped support for Gopher. We found bugs in the implementation
|
||||||
|
that turned out to have been introduced years ago, so with the conclusion that
|
||||||
|
nobody had found out in all this time we removed it instead of fixing it.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
November: Added SCP and SFTP support
|
||||||
|
|
||||||
|
2007
|
||||||
|
----
|
||||||
|
|
||||||
|
February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
July: security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||||
|
|
||||||
|
2008
|
||||||
|
----
|
||||||
|
|
||||||
|
November:
|
||||||
|
|
||||||
|
Command line options: 128
|
||||||
|
curl_easy_setopt() options: 158
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 37
|
||||||
|
Contributors: 683
|
||||||
|
|
||||||
|
145,000 unique visitors. >100 GB downloaded.
|
||||||
|
|
||||||
|
2009
|
||||||
|
----
|
||||||
|
|
||||||
|
March: security vulnerability: libcurl Arbitrary File Access
|
||||||
|
|
||||||
|
April: added CMake support
|
||||||
|
|
||||||
|
August: security vulnerability: libcurl embedded zero in cert name
|
||||||
|
|
||||||
|
December: Added support for IMAP, POP3 and SMTP
|
||||||
|
|
||||||
|
2010
|
||||||
|
----
|
||||||
|
|
||||||
|
January: Added support for RTSP
|
||||||
|
|
||||||
|
February: security vulnerability: libcurl data callback excessive length
|
||||||
|
|
||||||
|
March: The project switched over to use git (hosted by github) instead of CVS
|
||||||
|
for source code control
|
||||||
|
|
||||||
|
May: Added support for RTMP
|
||||||
|
|
||||||
|
Added support for PolarSSL to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
August:
|
||||||
|
|
||||||
|
Public curl releases: 117
|
||||||
|
Command line options: 138
|
||||||
|
curl_easy_setopt() options: 180
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 39
|
||||||
|
Contributors: 808
|
||||||
|
|
||||||
|
Gopher support added (re-added actually, see January 2006)
|
||||||
|
|
||||||
|
2011
|
||||||
|
----
|
||||||
|
|
||||||
|
February: added support for the axTLS backend
|
||||||
|
|
||||||
|
April: added the cyassl backend (later renamed to WolfSSL)
|
||||||
|
|
||||||
|
2012
|
||||||
|
----
|
||||||
|
|
||||||
|
July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
|
||||||
|
(Native Mac OS X and iOS TLS backend).
|
||||||
|
|
||||||
|
Supports metalink
|
||||||
|
|
||||||
|
October: SSH-agent support.
|
||||||
|
|
||||||
|
2013
|
||||||
|
----
|
||||||
|
|
||||||
|
February: Cleaned up internals to always uses the "multi" non-blocking
|
||||||
|
approach internally and only expose the blocking API with a wrapper.
|
||||||
|
|
||||||
|
September: First small steps on supporting HTTP/2 with nghttp2.
|
||||||
|
|
||||||
|
October: Removed krb4 support.
|
||||||
|
|
||||||
|
December: Happy eyeballs.
|
||||||
|
|
||||||
|
2014
|
||||||
|
----
|
||||||
|
|
||||||
|
March: first real release supporting HTTP/2
|
||||||
|
|
||||||
|
September: Website had 245,000 unique visitors and served 236GB data
|
||||||
|
|
||||||
|
SMB and SMBS support
|
||||||
|
|
||||||
|
2015
|
||||||
|
----
|
||||||
|
|
||||||
|
June: support for multiplexing with HTTP/2
|
||||||
|
|
||||||
|
August: support for HTTP/2 server push
|
||||||
|
|
||||||
|
December: Public Suffix List
|
||||||
|
|
||||||
|
2016
|
||||||
|
----
|
||||||
|
|
||||||
|
January: the curl tool defaults to HTTP/2 for HTTPS URLs
|
||||||
|
|
||||||
|
December: curl 7.52.0 introduced support for HTTPS-proxy!
|
||||||
|
|
||||||
|
First TLS 1.3 support
|
||||||
|
|
||||||
|
2017
|
||||||
|
----
|
||||||
|
|
||||||
|
July: OSS-Fuzz started fuzzing libcurl
|
||||||
|
|
||||||
|
September: Added Multi-SSL support
|
||||||
|
|
||||||
|
The website serves 3100 GB/month
|
||||||
|
|
||||||
|
Public curl releases: 169
|
||||||
|
Command line options: 211
|
||||||
|
curl_easy_setopt() options: 249
|
||||||
|
Public functions in libcurl: 74
|
||||||
|
Contributors: 1609
|
||||||
|
|
||||||
|
October: SSLKEYLOGFILE support, new MIME API
|
||||||
|
|
||||||
|
October: Daniel received the Polhem Prize for his work on curl
|
||||||
|
|
||||||
|
November: brotli
|
||||||
|
|
||||||
|
2018
|
||||||
|
----
|
||||||
|
|
||||||
|
January: new SSH backend powered by libssh
|
||||||
|
|
||||||
|
March: starting with the 1803 release of Windows 10, curl is shipped bundled
|
||||||
|
with Microsoft's operating system.
|
||||||
|
|
||||||
|
July: curl shows headers using bold type face
|
||||||
|
|
||||||
|
October: added DNS-over-HTTPS (DoH) and the URL API
|
||||||
|
|
||||||
|
MesaLink is a new supported TLS backend
|
||||||
|
|
||||||
|
libcurl now does HTTP/2 (and multiplexing) by default on HTTPS URLs
|
||||||
|
|
||||||
|
curl and libcurl are installed in an estimated 5 *billion* instances
|
||||||
|
world-wide.
|
||||||
|
|
||||||
|
October 31: Curl and libcurl 7.62.0
|
||||||
|
|
||||||
|
Public curl releases: 177
|
||||||
|
Command line options: 219
|
||||||
|
curl_easy_setopt() options: 261
|
||||||
|
Public functions in libcurl: 80
|
||||||
|
Contributors: 1808
|
||||||
|
|
||||||
|
December: removed axTLS support
|
||||||
|
|
||||||
|
2019
|
||||||
|
----
|
||||||
|
|
||||||
|
March: added experimental alt-svc support
|
||||||
|
|
||||||
|
August: the first HTTP/3 requests with curl.
|
||||||
|
|
||||||
|
September: 7.66.0 is released and the tool offers parallel downloads
|
||||||
|
|
||||||
|
2020
|
||||||
|
----
|
||||||
|
|
||||||
|
curl and libcurl are installed in an estimated 10 *billion* instances
|
||||||
|
world-wide.
|
||||||
|
|
||||||
|
January: added BearSSL support
|
||||||
|
|
||||||
|
March: removed support for PolarSSL, added wolfSSH support
|
||||||
|
|
||||||
|
April: experimental MQTT support
|
||||||
|
|
||||||
|
August: zstd support
|
||||||
|
|
||||||
|
November: the website moves to www.curl.se. The website serves 10TB data
|
||||||
|
monthly.
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# HSTS support
|
||||||
|
|
||||||
|
curl features **EXPERIMENTAL** support for the Strict-Transport-Security: HTTP
|
||||||
|
header. Added in curl 7.74.0
|
||||||
|
|
||||||
|
## Standard
|
||||||
|
|
||||||
|
[HTTP Strict Transport Security](https://tools.ietf.org/html/rfc6797)
|
||||||
|
|
||||||
|
## Behavior
|
||||||
|
|
||||||
|
libcurl features an in-memory cache for HSTS hosts, so that subsequent
|
||||||
|
HTTP-only requests to a host name present in the cache will get internally
|
||||||
|
"redirected" to the HTTPS version.
|
||||||
|
|
||||||
|
## `curl_easy_setopt()` options:
|
||||||
|
|
||||||
|
- `CURLOPT_HSTS_CTRL` - enable HSTS for this easy handle
|
||||||
|
- `CURLOPT_HSTS` - specify file name where to store the HSTS cache on close
|
||||||
|
(and possibly read from at startup)
|
||||||
|
|
||||||
|
## curl cmdline options
|
||||||
|
|
||||||
|
- `--hsts [filename]` - enable HSTS, use the file as HSTS cache. If filename
|
||||||
|
is `""` (no length) then no file will be used, only in-memory cache.
|
||||||
|
|
||||||
|
## HSTS cache file format
|
||||||
|
|
||||||
|
Lines starting with `#` are ignored.
|
||||||
|
|
||||||
|
For each hsts entry:
|
||||||
|
|
||||||
|
[host name] "YYYYMMDD HH:MM:SS"
|
||||||
|
|
||||||
|
The `[host name]` is dot-prefixed if it is a includeSubDomain.
|
||||||
|
|
||||||
|
The time stamp is when the entry expires.
|
||||||
|
|
||||||
|
I considered using wget's file format for the HSTS cache. However, they store the time stamp as the epoch (number of seconds since 1970) and I strongly disagree with using that format. Instead I opted to use a format similar to the curl alt-svc cache file format.
|
||||||
|
|
||||||
|
## Possible future additions
|
||||||
|
|
||||||
|
- `CURLOPT_HSTS_PRELOAD` - provide a set of preloaded HSTS host names
|
||||||
|
- ability to save to something else than a file
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
# HTTP Cookies
|
||||||
|
|
||||||
|
## Cookie overview
|
||||||
|
|
||||||
|
Cookies are `name=contents` pairs that a HTTP server tells the client to
|
||||||
|
hold and then the client sends back those to the server on subsequent
|
||||||
|
requests to the same domains and paths for which the cookies were set.
|
||||||
|
|
||||||
|
Cookies are either "session cookies" which typically are forgotten when the
|
||||||
|
session is over which is often translated to equal when browser quits, or
|
||||||
|
the cookies aren't session cookies they have expiration dates after which
|
||||||
|
the client will throw them away.
|
||||||
|
|
||||||
|
Cookies are set to the client with the Set-Cookie: header and are sent to
|
||||||
|
servers with the Cookie: header.
|
||||||
|
|
||||||
|
For a very long time, the only spec explaining how to use cookies was the
|
||||||
|
original [Netscape spec from 1994](https://curl.se/rfc/cookie_spec.html).
|
||||||
|
|
||||||
|
In 2011, [RFC6265](https://www.ietf.org/rfc/rfc6265.txt) was finally
|
||||||
|
published and details how cookies work within HTTP. In 2016, an update which
|
||||||
|
added support for prefixes was
|
||||||
|
[proposed](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00),
|
||||||
|
and in 2017, another update was
|
||||||
|
[drafted](https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01)
|
||||||
|
to deprecate modification of 'secure' cookies from non-secure origins. Both
|
||||||
|
of these drafts have been incorporated into a proposal to
|
||||||
|
[replace](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02)
|
||||||
|
RFC6265. Cookie prefixes and secure cookie modification protection has been
|
||||||
|
implemented by curl.
|
||||||
|
|
||||||
|
## Cookies saved to disk
|
||||||
|
|
||||||
|
Netscape once created a file format for storing cookies on disk so that they
|
||||||
|
would survive browser restarts. curl adopted that file format to allow
|
||||||
|
sharing the cookies with browsers, only to see browsers move away from that
|
||||||
|
format. Modern browsers no longer use it, while curl still does.
|
||||||
|
|
||||||
|
The netscape cookie file format stores one cookie per physical line in the
|
||||||
|
file with a bunch of associated meta data, each field separated with
|
||||||
|
TAB. That file is called the cookiejar in curl terminology.
|
||||||
|
|
||||||
|
When libcurl saves a cookiejar, it creates a file header of its own in which
|
||||||
|
there is a URL mention that will link to the web version of this document.
|
||||||
|
|
||||||
|
## Cookie file format
|
||||||
|
|
||||||
|
The cookie file format is text based and stores one cookie per line. Lines
|
||||||
|
that start with `#` are treated as comments.
|
||||||
|
|
||||||
|
Each line that each specifies a single cookie consists of seven text fields
|
||||||
|
separated with TAB characters. A valid line must end with a newline
|
||||||
|
character.
|
||||||
|
|
||||||
|
### Fields in the file
|
||||||
|
|
||||||
|
Field number, what type and example data and the meaning of it:
|
||||||
|
|
||||||
|
0. string `example.com` - the domain name
|
||||||
|
1. boolean `FALSE` - include subdomains
|
||||||
|
2. string `/foobar/` - path
|
||||||
|
3. boolean `TRUE` - send/receive over HTTPS only
|
||||||
|
4. number `1462299217` - expires at - seconds since Jan 1st 1970, or 0
|
||||||
|
5. string `person` - name of the cookie
|
||||||
|
6. string `daniel` - value of the cookie
|
||||||
|
|
||||||
|
## Cookies with curl the command line tool
|
||||||
|
|
||||||
|
curl has a full cookie "engine" built in. If you just activate it, you can
|
||||||
|
have curl receive and send cookies exactly as mandated in the specs.
|
||||||
|
|
||||||
|
Command line options:
|
||||||
|
|
||||||
|
`-b, --cookie`
|
||||||
|
|
||||||
|
tell curl a file to read cookies from and start the cookie engine, or if it
|
||||||
|
isn't a file it will pass on the given string. -b name=var works and so does
|
||||||
|
-b cookiefile.
|
||||||
|
|
||||||
|
`-j, --junk-session-cookies`
|
||||||
|
|
||||||
|
when used in combination with -b, it will skip all "session cookies" on load
|
||||||
|
so as to appear to start a new cookie session.
|
||||||
|
|
||||||
|
`-c, --cookie-jar`
|
||||||
|
|
||||||
|
tell curl to start the cookie engine and write cookies to the given file
|
||||||
|
after the request(s)
|
||||||
|
|
||||||
|
## Cookies with libcurl
|
||||||
|
|
||||||
|
libcurl offers several ways to enable and interface the cookie engine. These
|
||||||
|
options are the ones provided by the native API. libcurl bindings may offer
|
||||||
|
access to them using other means.
|
||||||
|
|
||||||
|
`CURLOPT_COOKIE`
|
||||||
|
|
||||||
|
Is used when you want to specify the exact contents of a cookie header to
|
||||||
|
send to the server.
|
||||||
|
|
||||||
|
`CURLOPT_COOKIEFILE`
|
||||||
|
|
||||||
|
Tell libcurl to activate the cookie engine, and to read the initial set of
|
||||||
|
cookies from the given file. Read-only.
|
||||||
|
|
||||||
|
`CURLOPT_COOKIEJAR`
|
||||||
|
|
||||||
|
Tell libcurl to activate the cookie engine, and when the easy handle is
|
||||||
|
closed save all known cookies to the given cookiejar file. Write-only.
|
||||||
|
|
||||||
|
`CURLOPT_COOKIELIST`
|
||||||
|
|
||||||
|
Provide detailed information about a single cookie to add to the internal
|
||||||
|
storage of cookies. Pass in the cookie as a HTTP header with all the details
|
||||||
|
set, or pass in a line from a netscape cookie file. This option can also be
|
||||||
|
used to flush the cookies etc.
|
||||||
|
|
||||||
|
`CURLINFO_COOKIELIST`
|
||||||
|
|
||||||
|
Extract cookie information from the internal cookie storage as a linked
|
||||||
|
list.
|
||||||
|
|
||||||
|
## Cookies with javascript
|
||||||
|
|
||||||
|
These days a lot of the web is built up by javascript. The webbrowser loads
|
||||||
|
complete programs that render the page you see. These javascript programs
|
||||||
|
can also set and access cookies.
|
||||||
|
|
||||||
|
Since curl and libcurl are plain HTTP clients without any knowledge of or
|
||||||
|
capability to handle javascript, such cookies will not be detected or used.
|
||||||
|
|
||||||
|
Often, if you want to mimic what a browser does on such websites, you can
|
||||||
|
record web browser HTTP traffic when using such a site and then repeat the
|
||||||
|
cookie operations using curl or libcurl.
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
HTTP/2 with curl
|
||||||
|
================
|
||||||
|
|
||||||
|
[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
|
||||||
|
[http2 explained](https://daniel.haxx.se/http2/)
|
||||||
|
|
||||||
|
Build prerequisites
|
||||||
|
-------------------
|
||||||
|
- nghttp2
|
||||||
|
- OpenSSL, libressl, BoringSSL, NSS, GnuTLS, mbedTLS, wolfSSL or Schannel
|
||||||
|
with a new enough version.
|
||||||
|
|
||||||
|
[nghttp2](https://nghttp2.org/)
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
libcurl uses this 3rd party library for the low level protocol handling
|
||||||
|
parts. The reason for this is that HTTP/2 is much more complex at that layer
|
||||||
|
than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
|
||||||
|
existing and well functional library.
|
||||||
|
|
||||||
|
We require at least version 1.12.0.
|
||||||
|
|
||||||
|
Over an http:// URL
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
|
||||||
|
include an upgrade header in the initial request to the host to allow
|
||||||
|
upgrading to HTTP/2.
|
||||||
|
|
||||||
|
Possibly we can later introduce an option that will cause libcurl to fail if
|
||||||
|
not possible to upgrade. Possibly we introduce an option that makes libcurl
|
||||||
|
use HTTP/2 at once over http://
|
||||||
|
|
||||||
|
Over an https:// URL
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
|
||||||
|
ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
|
||||||
|
an option that will cause libcurl to fail if not possible to use HTTP/2.
|
||||||
|
|
||||||
|
`CURL_HTTP_VERSION_2TLS` was added in 7.47.0 as a way to ask libcurl to prefer
|
||||||
|
HTTP/2 for HTTPS but stick to 1.1 by default for plain old HTTP connections.
|
||||||
|
|
||||||
|
ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
|
||||||
|
for a similar purpose, was made prior to ALPN and is used for SPDY so early
|
||||||
|
HTTP/2 servers are implemented using NPN before ALPN support is widespread.
|
||||||
|
|
||||||
|
`CURLOPT_SSL_ENABLE_ALPN` and `CURLOPT_SSL_ENABLE_NPN` are offered to allow
|
||||||
|
applications to explicitly disable ALPN or NPN.
|
||||||
|
|
||||||
|
SSL libs
|
||||||
|
--------
|
||||||
|
|
||||||
|
The challenge is the ALPN and NPN support and all our different SSL
|
||||||
|
backends. You may need a fairly updated SSL library version for it to provide
|
||||||
|
the necessary TLS features. Right now we support:
|
||||||
|
|
||||||
|
- OpenSSL: ALPN and NPN
|
||||||
|
- libressl: ALPN and NPN
|
||||||
|
- BoringSSL: ALPN and NPN
|
||||||
|
- NSS: ALPN and NPN
|
||||||
|
- GnuTLS: ALPN
|
||||||
|
- mbedTLS: ALPN
|
||||||
|
- Schannel: ALPN
|
||||||
|
- wolfSSL: ALPN
|
||||||
|
- Secure Transport: ALPN
|
||||||
|
|
||||||
|
Multiplexing
|
||||||
|
------------
|
||||||
|
|
||||||
|
Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
|
||||||
|
term for doing multiple independent transfers over the same physical TCP
|
||||||
|
connection.
|
||||||
|
|
||||||
|
To take advantage of multiplexing, you need to use the multi interface and set
|
||||||
|
`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
|
||||||
|
attempt to re-use existing HTTP/2 connections and just add a new stream over
|
||||||
|
that when doing subsequent parallel requests.
|
||||||
|
|
||||||
|
While libcurl sets up a connection to a HTTP server there is a period during
|
||||||
|
which it doesn't know if it can pipeline or do multiplexing and if you add new
|
||||||
|
transfers in that period, libcurl will default to start new connections for
|
||||||
|
those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
|
||||||
|
can ask that a transfer should rather wait and see in case there's a
|
||||||
|
connection for the same host in progress that might end up being possible to
|
||||||
|
multiplex on. It favours keeping the number of connections low to the cost of
|
||||||
|
slightly longer time to first byte transferred.
|
||||||
|
|
||||||
|
Applications
|
||||||
|
------------
|
||||||
|
|
||||||
|
We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
|
||||||
|
in HTTP 1.1 style. This allows applications to work unmodified.
|
||||||
|
|
||||||
|
curl tool
|
||||||
|
---------
|
||||||
|
|
||||||
|
curl offers the `--http2` command line option to enable use of HTTP/2.
|
||||||
|
|
||||||
|
curl offers the `--http2-prior-knowledge` command line option to enable use of
|
||||||
|
HTTP/2 without HTTP/1.1 Upgrade.
|
||||||
|
|
||||||
|
Since 7.47.0, the curl tool enables HTTP/2 by default for HTTPS connections.
|
||||||
|
|
||||||
|
curl tool limitations
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The command line tool won't do any HTTP/2 multiplexing even though libcurl
|
||||||
|
supports it, simply because the curl tool is not written to take advantage of
|
||||||
|
the libcurl API that's necessary for this (the multi interface). We have an
|
||||||
|
outstanding TODO item for this and **you** can help us make it happen.
|
||||||
|
|
||||||
|
The command line tool also doesn't support HTTP/2 server push for the same
|
||||||
|
reason it doesn't do multiplexing: it needs to use the multi interface for
|
||||||
|
that so that multiplexing is supported.
|
||||||
|
|
||||||
|
HTTP Alternative Services
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Alt-Svc is an extension with a corresponding frame (ALTSVC) in HTTP/2 that
|
||||||
|
tells the client about an alternative "route" to the same content for the same
|
||||||
|
origin server that you get the response from. A browser or long-living client
|
||||||
|
can use that hint to create a new connection asynchronously. For libcurl, we
|
||||||
|
may introduce a way to bring such clues to the application and/or let a
|
||||||
|
subsequent request use the alternate route automatically.
|
||||||
|
|
||||||
|
[Detailed in RFC 7838](https://tools.ietf.org/html/rfc7838)
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
# HTTP3 (and QUIC)
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
[HTTP/3 Explained](https://daniel.haxx.se/http3-explained/) - the online free
|
||||||
|
book describing the protocols involved.
|
||||||
|
|
||||||
|
[QUIC implementation](https://github.com/curl/curl/wiki/QUIC-implementation) -
|
||||||
|
the wiki page describing the plan for how to support QUIC and HTTP/3 in curl
|
||||||
|
and libcurl.
|
||||||
|
|
||||||
|
[quicwg.org](https://quicwg.org/) - home of the official protocol drafts
|
||||||
|
|
||||||
|
## QUIC libraries
|
||||||
|
|
||||||
|
QUIC libraries we're experimenting with:
|
||||||
|
|
||||||
|
[ngtcp2](https://github.com/ngtcp2/ngtcp2)
|
||||||
|
|
||||||
|
[quiche](https://github.com/cloudflare/quiche)
|
||||||
|
|
||||||
|
## Experimental!
|
||||||
|
|
||||||
|
HTTP/3 and QUIC support in curl is considered **EXPERIMENTAL** until further
|
||||||
|
notice. It needs to be enabled at build-time.
|
||||||
|
|
||||||
|
Further development and tweaking of the HTTP/3 support in curl will happen in
|
||||||
|
in the master branch using pull-requests, just like ordinary changes.
|
||||||
|
|
||||||
|
# ngtcp2 version
|
||||||
|
|
||||||
|
## Build with OpenSSL
|
||||||
|
|
||||||
|
Build (patched) OpenSSL
|
||||||
|
|
||||||
|
% git clone --depth 1 -b OpenSSL_1_1_1g-quic-draft-29 https://github.com/tatsuhiro-t/openssl
|
||||||
|
% cd openssl
|
||||||
|
% ./config enable-tls1_3 --prefix=<somewhere1>
|
||||||
|
% make
|
||||||
|
% make install_sw
|
||||||
|
|
||||||
|
Build nghttp3
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/ngtcp2/nghttp3
|
||||||
|
% cd nghttp3
|
||||||
|
% autoreconf -i
|
||||||
|
% ./configure --prefix=<somewhere2> --enable-lib-only
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Build ngtcp2
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/ngtcp2/ngtcp2
|
||||||
|
% cd ngtcp2
|
||||||
|
% autoreconf -i
|
||||||
|
% ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Build curl
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/curl/curl
|
||||||
|
% cd curl
|
||||||
|
% ./buildconf
|
||||||
|
% LDFLAGS="-Wl,-rpath,<somewhere1>/lib" ./configure --with-ssl=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3>
|
||||||
|
% make
|
||||||
|
|
||||||
|
## Build with GnuTLS
|
||||||
|
|
||||||
|
Build GnuTLS
|
||||||
|
|
||||||
|
% git clone --depth 1 https://gitlab.com/gnutls/gnutls.git
|
||||||
|
% cd gnutls
|
||||||
|
% ./bootstrap
|
||||||
|
% ./configure --disable-doc --prefix=<somewhere1>
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Build nghttp3
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/ngtcp2/nghttp3
|
||||||
|
% cd nghttp3
|
||||||
|
% autoreconf -i
|
||||||
|
% ./configure --prefix=<somewhere2> --enable-lib-only
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Build ngtcp2
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/ngtcp2/ngtcp2
|
||||||
|
% cd ngtcp2
|
||||||
|
% autoreconf -i
|
||||||
|
% ./configure PKG_CONFIG_PATH=<somewhere1>/lib/pkgconfig:<somewhere2>/lib/pkgconfig LDFLAGS="-Wl,-rpath,<somewhere1>/lib" --prefix=<somewhere3> --enable-lib-only
|
||||||
|
% make
|
||||||
|
% make install
|
||||||
|
|
||||||
|
Build curl
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/curl/curl
|
||||||
|
% cd curl
|
||||||
|
% ./buildconf
|
||||||
|
% ./configure --without-ssl --with-gnutls=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3>
|
||||||
|
% make
|
||||||
|
|
||||||
|
# quiche version
|
||||||
|
|
||||||
|
## build
|
||||||
|
|
||||||
|
Build quiche and BoringSSL:
|
||||||
|
|
||||||
|
% git clone --recursive https://github.com/cloudflare/quiche
|
||||||
|
% cd quiche
|
||||||
|
% cargo build --release --features ffi,pkg-config-meta,qlog
|
||||||
|
% mkdir deps/boringssl/src/lib
|
||||||
|
% ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) deps/boringssl/src/lib/
|
||||||
|
|
||||||
|
Build curl:
|
||||||
|
|
||||||
|
% cd ..
|
||||||
|
% git clone https://github.com/curl/curl
|
||||||
|
% cd curl
|
||||||
|
% ./buildconf
|
||||||
|
% ./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-ssl=$PWD/../quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release
|
||||||
|
% make
|
||||||
|
|
||||||
|
## Run
|
||||||
|
|
||||||
|
Use HTTP/3 directly:
|
||||||
|
|
||||||
|
curl --http3 https://nghttp2.org:8443/
|
||||||
|
|
||||||
|
Upgrade via Alt-Svc:
|
||||||
|
|
||||||
|
curl --alt-svc altsvc.cache https://quic.aiortc.org/
|
||||||
|
|
||||||
|
See this [list of public HTTP/3 servers](https://bagder.github.io/HTTP3-test/)
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
# Hyper
|
||||||
|
|
||||||
|
Hyper is a separate HTTP library written in Rust. curl can be told to use this
|
||||||
|
library as a backend to deal with HTTP.
|
||||||
|
|
||||||
|
## Experimental!
|
||||||
|
|
||||||
|
Hyper support in curl is considered **EXPERIMENTAL** until further notice. It
|
||||||
|
needs to be explicitly enabled at build-time.
|
||||||
|
|
||||||
|
Further development and tweaking of the Hyper backend support in curl will
|
||||||
|
happen in in the master branch using pull-requests, just like ordinary
|
||||||
|
changes.
|
||||||
|
|
||||||
|
## Hyper version
|
||||||
|
|
||||||
|
The C API for Hyper is brand new and under development. This description
|
||||||
|
assumes that you get and build that C API off [the branch in Hyper's git
|
||||||
|
repository](https://github.com/hyperium/hyper/tree/hyper-capi).
|
||||||
|
|
||||||
|
## build curl with hyper
|
||||||
|
|
||||||
|
Build hyper and enable the C API:
|
||||||
|
|
||||||
|
% git clone https://github.com/hyperium/hyper
|
||||||
|
% cd hyper
|
||||||
|
% RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi
|
||||||
|
|
||||||
|
Build curl to use hyper's C API:
|
||||||
|
|
||||||
|
% git clone https://github.com/curl/curl
|
||||||
|
% cd curl
|
||||||
|
% ./buildconf
|
||||||
|
% ./configure --with-hyper=<hyper dir>
|
||||||
|
% make
|
||||||
|
|
||||||
|
# using Hyper internally
|
||||||
|
|
||||||
|
Hyper is a low level HTTP transport library. curl itself provides all HTTP
|
||||||
|
headers and Hyper provides all received headers back to curl.
|
||||||
|
|
||||||
|
Therefore, most of the "header logic" in curl as in responding to and acting
|
||||||
|
on specific input and output headers are done the same way in curl code.
|
||||||
|
|
||||||
|
The API in Hyper delivers received HTTP headers as (cleaned up) name=value
|
||||||
|
pairs, making it impossible for curl to know the exact byte representation
|
||||||
|
over the wire with Hyper.
|
||||||
|
|
||||||
|
## Remaining issues
|
||||||
|
|
||||||
|
This backend is still not feature complete with the native backend. Areas that
|
||||||
|
still need attention and verification include:
|
||||||
|
|
||||||
|
- multiplexed HTTP/2
|
||||||
|
- h2 Upgrade:
|
||||||
|
- pausing transfers
|
||||||
|
- co-exist with a HTTP/3 build
|
||||||
|
- receiving HTTP/1 trailers
|
||||||
|
- sending HTTP/1 trailers
|
||||||
|
- accept-encoding
|
||||||
|
- transfer encoding
|
||||||
|
- alt-svc
|
||||||
|
- hsts
|
||||||
|
- DoH ([#6389](https://github.com/curl/curl/issues/6389))
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
How To Compile
|
||||||
|
|
||||||
|
see INSTALL.md
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
How To Compile with CMake
|
||||||
|
|
||||||
|
Building with CMake
|
||||||
|
==========================
|
||||||
|
This document describes how to compile, build and install curl and libcurl
|
||||||
|
from source code using the CMake build tool. To build with CMake, you will
|
||||||
|
of course have to first install CMake. The minimum required version of
|
||||||
|
CMake is specified in the file CMakeLists.txt found in the top of the curl
|
||||||
|
source tree. Once the correct version of CMake is installed you can follow
|
||||||
|
the instructions below for the platform you are building on.
|
||||||
|
|
||||||
|
CMake builds can be configured either from the command line, or from one
|
||||||
|
of CMake's GUI's.
|
||||||
|
|
||||||
|
Current flaws in the curl CMake build
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Missing features in the cmake build:
|
||||||
|
|
||||||
|
- Builds libcurl without large file support
|
||||||
|
- Does not support all SSL libraries (only OpenSSL, Schannel,
|
||||||
|
Secure Transport, and mbed TLS, NSS, WolfSSL)
|
||||||
|
- Doesn't allow different resolver backends (no c-ares build support)
|
||||||
|
- No RTMP support built
|
||||||
|
- Doesn't allow build curl and libcurl debug enabled
|
||||||
|
- Doesn't allow a custom CA bundle path
|
||||||
|
- Doesn't allow you to disable specific protocols from the build
|
||||||
|
- Doesn't find or use krb4 or GSS
|
||||||
|
- Rebuilds test files too eagerly, but still can't run the tests
|
||||||
|
- Doesn't detect the correct strerror_r flavor when cross-compiling (issue #1123)
|
||||||
|
|
||||||
|
|
||||||
|
Command Line CMake
|
||||||
|
==================
|
||||||
|
A CMake build of curl is similar to the autotools build of curl. It
|
||||||
|
consists of the following steps after you have unpacked the source.
|
||||||
|
|
||||||
|
1. Create an out of source build tree parallel to the curl source
|
||||||
|
tree and change into that directory
|
||||||
|
|
||||||
|
$ mkdir curl-build
|
||||||
|
$ cd curl-build
|
||||||
|
|
||||||
|
2. Run CMake from the build tree, giving it the path to the top of
|
||||||
|
the curl source tree. CMake will pick a compiler for you. If you
|
||||||
|
want to specify the compile, you can set the CC environment
|
||||||
|
variable prior to running CMake.
|
||||||
|
|
||||||
|
$ cmake ../curl
|
||||||
|
$ make
|
||||||
|
|
||||||
|
3. Install to default location:
|
||||||
|
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
(The test suite does not work with the cmake build)
|
||||||
|
|
||||||
|
ccmake
|
||||||
|
=========
|
||||||
|
CMake comes with a curses based interface called ccmake. To run ccmake on
|
||||||
|
a curl use the instructions for the command line cmake, but substitute
|
||||||
|
ccmake ../curl for cmake ../curl. This will bring up a curses interface
|
||||||
|
with instructions on the bottom of the screen. You can press the "c" key
|
||||||
|
to configure the project, and the "g" key to generate the project. After
|
||||||
|
the project is generated, you can run make.
|
||||||
|
|
||||||
|
cmake-gui
|
||||||
|
=========
|
||||||
|
CMake also comes with a Qt based GUI called cmake-gui. To configure with
|
||||||
|
cmake-gui, you run cmake-gui and follow these steps:
|
||||||
|
1. Fill in the "Where is the source code" combo box with the path to
|
||||||
|
the curl source tree.
|
||||||
|
2. Fill in the "Where to build the binaries" combo box with the path
|
||||||
|
to the directory for your build tree, ideally this should not be the
|
||||||
|
same as the source tree, but a parallel directory called curl-build or
|
||||||
|
something similar.
|
||||||
|
3. Once the source and binary directories are specified, press the
|
||||||
|
"Configure" button.
|
||||||
|
4. Select the native build tool that you want to use.
|
||||||
|
5. At this point you can change any of the options presented in the
|
||||||
|
GUI. Once you have selected all the options you want, click the
|
||||||
|
"Generate" button.
|
||||||
|
6. Run the native build tool that you used CMake to generate.
|
||||||
@@ -0,0 +1,471 @@
|
|||||||
|
# how to install curl and libcurl
|
||||||
|
|
||||||
|
## Installing Binary Packages
|
||||||
|
|
||||||
|
Lots of people download binary distributions of curl and libcurl. This
|
||||||
|
document does not describe how to install curl or libcurl using such a binary
|
||||||
|
package. This document describes how to compile, build and install curl and
|
||||||
|
libcurl from source code.
|
||||||
|
|
||||||
|
## Building using vcpkg
|
||||||
|
|
||||||
|
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
|
||||||
|
cd vcpkg
|
||||||
|
./bootstrap-vcpkg.sh
|
||||||
|
./vcpkg integrate install
|
||||||
|
vcpkg install curl[tool]
|
||||||
|
|
||||||
|
The curl port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||||
|
|
||||||
|
## Building from git
|
||||||
|
|
||||||
|
If you get your code off a git repository instead of a release tarball, see
|
||||||
|
the `GIT-INFO` file in the root directory for specific instructions on how to
|
||||||
|
proceed.
|
||||||
|
|
||||||
|
# Unix
|
||||||
|
|
||||||
|
A normal Unix installation is made in three or four steps (after you've
|
||||||
|
unpacked the source archive):
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make test (optional)
|
||||||
|
make install
|
||||||
|
|
||||||
|
You probably need to be root when doing the last command.
|
||||||
|
|
||||||
|
Get a full listing of all available configure options by invoking it like:
|
||||||
|
|
||||||
|
./configure --help
|
||||||
|
|
||||||
|
If you want to install curl in a different file hierarchy than `/usr/local`,
|
||||||
|
specify that when running configure:
|
||||||
|
|
||||||
|
./configure --prefix=/path/to/curl/tree
|
||||||
|
|
||||||
|
If you have write permission in that directory, you can do 'make install'
|
||||||
|
without being root. An example of this would be to make a local install in
|
||||||
|
your own home directory:
|
||||||
|
|
||||||
|
./configure --prefix=$HOME
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
The configure script always tries to find a working SSL library unless
|
||||||
|
explicitly told not to. If you have OpenSSL installed in the default search
|
||||||
|
path for your compiler/linker, you don't need to do anything special. If you
|
||||||
|
have OpenSSL installed in `/usr/local/ssl`, you can run configure like:
|
||||||
|
|
||||||
|
./configure --with-ssl
|
||||||
|
|
||||||
|
If you have OpenSSL installed somewhere else (for example, `/opt/OpenSSL`) and
|
||||||
|
you have pkg-config installed, set the pkg-config path first, like this:
|
||||||
|
|
||||||
|
env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
|
||||||
|
|
||||||
|
Without pkg-config installed, use this:
|
||||||
|
|
||||||
|
./configure --with-ssl=/opt/OpenSSL
|
||||||
|
|
||||||
|
If you insist on forcing a build without SSL support, even though you may
|
||||||
|
have OpenSSL installed in your system, you can run configure like this:
|
||||||
|
|
||||||
|
./configure --without-ssl
|
||||||
|
|
||||||
|
If you have OpenSSL installed, but with the libraries in one place and the
|
||||||
|
header files somewhere else, you have to set the `LDFLAGS` and `CPPFLAGS`
|
||||||
|
environment variables prior to running configure. Something like this should
|
||||||
|
work:
|
||||||
|
|
||||||
|
CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" ./configure
|
||||||
|
|
||||||
|
If you have shared SSL libs installed in a directory where your run-time
|
||||||
|
linker doesn't find them (which usually causes configure failures), you can
|
||||||
|
provide this option to gcc to set a hard-coded path to the run-time linker:
|
||||||
|
|
||||||
|
LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure --with-ssl
|
||||||
|
|
||||||
|
## More Options
|
||||||
|
|
||||||
|
To force a static library compile, disable the shared library creation by
|
||||||
|
running configure like:
|
||||||
|
|
||||||
|
./configure --disable-shared
|
||||||
|
|
||||||
|
To tell the configure script to skip searching for thread-safe functions, add
|
||||||
|
an option like:
|
||||||
|
|
||||||
|
./configure --disable-thread
|
||||||
|
|
||||||
|
If you're a curl developer and use gcc, you might want to enable more debug
|
||||||
|
options with the `--enable-debug` option.
|
||||||
|
|
||||||
|
curl can be built to use a whole range of libraries to provide various useful
|
||||||
|
services, and configure will try to auto-detect a decent default. But if you
|
||||||
|
want to alter it, you can select how to deal with each individual library.
|
||||||
|
|
||||||
|
## Select TLS backend
|
||||||
|
|
||||||
|
The default OpenSSL configure check will also detect and use BoringSSL or
|
||||||
|
libressl.
|
||||||
|
|
||||||
|
- GnuTLS: `--without-ssl --with-gnutls`.
|
||||||
|
- wolfSSL: `--without-ssl --with-wolfssl`
|
||||||
|
- NSS: `--without-ssl --with-nss`
|
||||||
|
- mbedTLS: `--without-ssl --with-mbedtls`
|
||||||
|
- schannel: `--without-ssl --with-schannel`
|
||||||
|
- secure transport: `--without-ssl --with-secure-transport`
|
||||||
|
- MesaLink: `--without-ssl --with-mesalink`
|
||||||
|
- BearSSL: `--without-ssl --with-bearssl`
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
|
||||||
|
## Building Windows DLLs and C run-time (CRT) linkage issues
|
||||||
|
|
||||||
|
As a general rule, building a DLL with static CRT linkage is highly
|
||||||
|
discouraged, and intermixing CRTs in the same app is something to avoid at
|
||||||
|
any cost.
|
||||||
|
|
||||||
|
Reading and comprehending Microsoft Knowledge Base articles KB94248 and
|
||||||
|
KB140584 is a must for any Windows developer. Especially important is full
|
||||||
|
understanding if you are not going to follow the advice given above.
|
||||||
|
|
||||||
|
- [How To Use the C Run-Time](https://support.microsoft.com/help/94248/how-to-use-the-c-run-time)
|
||||||
|
- [Run-Time Library Compiler Options](https://docs.microsoft.com/cpp/build/reference/md-mt-ld-use-run-time-library)
|
||||||
|
- [Potential Errors Passing CRT Objects Across DLL Boundaries](https://docs.microsoft.com/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries)
|
||||||
|
|
||||||
|
If your app is misbehaving in some strange way, or it is suffering from
|
||||||
|
memory corruption, before asking for further help, please try first to
|
||||||
|
rebuild every single library your app uses as well as your app using the
|
||||||
|
debug multithreaded dynamic C runtime.
|
||||||
|
|
||||||
|
If you get linkage errors read section 5.7 of the FAQ document.
|
||||||
|
|
||||||
|
## MingW32
|
||||||
|
|
||||||
|
Make sure that MinGW32's bin dir is in the search path, for example:
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
set PATH=c:\mingw32\bin;%PATH%
|
||||||
|
```
|
||||||
|
|
||||||
|
then run `mingw32-make mingw32` in the root dir. There are other
|
||||||
|
make targets available to build libcurl with more features, use:
|
||||||
|
|
||||||
|
- `mingw32-make mingw32-zlib` to build with Zlib support;
|
||||||
|
- `mingw32-make mingw32-ssl-zlib` to build with SSL and Zlib enabled;
|
||||||
|
- `mingw32-make mingw32-ssh2-ssl-zlib` to build with SSH2, SSL, Zlib;
|
||||||
|
- `mingw32-make mingw32-ssh2-ssl-sspi-zlib` to build with SSH2, SSL, Zlib
|
||||||
|
and SSPI support.
|
||||||
|
|
||||||
|
If you have any problems linking libraries or finding header files, be sure
|
||||||
|
to verify that the provided `Makefile.m32` files use the proper paths, and
|
||||||
|
adjust as necessary. It is also possible to override these paths with
|
||||||
|
environment variables, for example:
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
set ZLIB_PATH=c:\zlib-1.2.8
|
||||||
|
set OPENSSL_PATH=c:\openssl-1.0.2c
|
||||||
|
set LIBSSH2_PATH=c:\libssh2-1.6.0
|
||||||
|
```
|
||||||
|
|
||||||
|
It is also possible to build with other LDAP SDKs than MS LDAP; currently
|
||||||
|
it is possible to build with native Win32 OpenLDAP, or with the Novell CLDAP
|
||||||
|
SDK. If you want to use these you need to set these vars:
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
set LDAP_SDK=c:\openldap
|
||||||
|
set USE_LDAP_OPENLDAP=1
|
||||||
|
```
|
||||||
|
|
||||||
|
or for using the Novell SDK:
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
set USE_LDAP_NOVELL=1
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to enable LDAPS support then set LDAPS=1.
|
||||||
|
|
||||||
|
## Cygwin
|
||||||
|
|
||||||
|
Almost identical to the unix installation. Run the configure script in the
|
||||||
|
curl source tree root with `sh configure`. Make sure you have the `sh`
|
||||||
|
executable in `/bin/` or you'll see the configure fail toward the end.
|
||||||
|
|
||||||
|
Run `make`
|
||||||
|
|
||||||
|
## Disabling Specific Protocols in Windows builds
|
||||||
|
|
||||||
|
The configure utility, unfortunately, is not available for the Windows
|
||||||
|
environment, therefore, you cannot use the various disable-protocol options of
|
||||||
|
the configure utility on this platform.
|
||||||
|
|
||||||
|
You can use specific defines to disable specific protocols and features. See
|
||||||
|
[CURL-DISABLE.md](CURL-DISABLE-md) for the full list.
|
||||||
|
|
||||||
|
If you want to set any of these defines you have the following options:
|
||||||
|
|
||||||
|
- Modify `lib/config-win32.h`
|
||||||
|
- Modify `lib/curl_setup.h`
|
||||||
|
- Modify `winbuild/Makefile.vc`
|
||||||
|
- Modify the "Preprocessor Definitions" in the libcurl project
|
||||||
|
|
||||||
|
Note: The pre-processor settings can be found using the Visual Studio IDE
|
||||||
|
under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
|
||||||
|
Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
|
||||||
|
versions.
|
||||||
|
|
||||||
|
## Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
|
||||||
|
|
||||||
|
In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack it is
|
||||||
|
necessary to make definition of preprocessor symbol `USE_LWIPSOCK` visible to
|
||||||
|
libcurl and curl compilation processes. To set this definition you have the
|
||||||
|
following alternatives:
|
||||||
|
|
||||||
|
- Modify `lib/config-win32.h` and `src/config-win32.h`
|
||||||
|
- Modify `winbuild/Makefile.vc`
|
||||||
|
- Modify the "Preprocessor Definitions" in the libcurl project
|
||||||
|
|
||||||
|
Note: The pre-processor settings can be found using the Visual Studio IDE
|
||||||
|
under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
|
||||||
|
Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
|
||||||
|
versions.
|
||||||
|
|
||||||
|
Once that libcurl has been built with BSD-style lwIP TCP/IP stack support, in
|
||||||
|
order to use it with your program it is mandatory that your program includes
|
||||||
|
lwIP header file `<lwip/opt.h>` (or another lwIP header that includes this)
|
||||||
|
before including any libcurl header. Your program does not need the
|
||||||
|
`USE_LWIPSOCK` preprocessor definition which is for libcurl internals only.
|
||||||
|
|
||||||
|
Compilation has been verified with [lwIP
|
||||||
|
1.4.0](https://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip) and
|
||||||
|
[contrib-1.4.0](https://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip).
|
||||||
|
|
||||||
|
This BSD-style lwIP TCP/IP stack support must be considered experimental given
|
||||||
|
that it has been verified that lwIP 1.4.0 still needs some polish, and libcurl
|
||||||
|
might yet need some additional adjustment, caveat emptor.
|
||||||
|
|
||||||
|
## Important static libcurl usage note
|
||||||
|
|
||||||
|
When building an application that uses the static libcurl library on Windows,
|
||||||
|
you must add `-DCURL_STATICLIB` to your `CFLAGS`. Otherwise the linker will
|
||||||
|
look for dynamic import symbols.
|
||||||
|
|
||||||
|
## Legacy Windows and SSL
|
||||||
|
|
||||||
|
Schannel (from Windows SSPI), is the native SSL library in Windows. However,
|
||||||
|
Schannel in Windows <= XP is unable to connect to servers that
|
||||||
|
no longer support the legacy handshakes and algorithms used by those
|
||||||
|
versions. If you will be using curl in one of those earlier versions of
|
||||||
|
Windows you should choose another SSL backend such as OpenSSL.
|
||||||
|
|
||||||
|
# Apple iOS and macOS
|
||||||
|
|
||||||
|
On modern Apple operating systems, curl can be built to use Apple's SSL/TLS
|
||||||
|
implementation, Secure Transport, instead of OpenSSL. To build with Secure
|
||||||
|
Transport for SSL/TLS, use the configure option `--with-secure-transport`. (It
|
||||||
|
is not necessary to use the option `--without-ssl`.) This feature requires iOS
|
||||||
|
5.0 or later, or OS X 10.5 ("Leopard") or later.
|
||||||
|
|
||||||
|
When Secure Transport is in use, the curl options `--cacert` and `--capath`
|
||||||
|
and their libcurl equivalents, will be ignored, because Secure Transport uses
|
||||||
|
the certificates stored in the Keychain to evaluate whether or not to trust
|
||||||
|
the server. This, of course, includes the root certificates that ship with the
|
||||||
|
OS. The `--cert` and `--engine` options, and their libcurl equivalents, are
|
||||||
|
currently unimplemented in curl with Secure Transport.
|
||||||
|
|
||||||
|
For macOS users: In OS X 10.8 ("Mountain Lion"), Apple made a major overhaul
|
||||||
|
to the Secure Transport API that, among other things, added support for the
|
||||||
|
newer TLS 1.1 and 1.2 protocols. To get curl to support TLS 1.1 and 1.2, you
|
||||||
|
must build curl on Mountain Lion or later, or by using the equivalent SDK. If
|
||||||
|
you set the `MACOSX_DEPLOYMENT_TARGET` environmental variable to an earlier
|
||||||
|
version of macOS prior to building curl, then curl will use the new Secure
|
||||||
|
Transport API on Mountain Lion and later, and fall back on the older API when
|
||||||
|
the same curl binary is executed on older cats. For example, running these
|
||||||
|
commands in curl's directory in the shell will build the code such that it
|
||||||
|
will run on cats as old as OS X 10.6 ("Snow Leopard") (using bash):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET="10.6"
|
||||||
|
./configure --with-secure-transport
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
# Android
|
||||||
|
|
||||||
|
When building curl for Android it's recommended to use a Linux environment
|
||||||
|
since using curl's `configure` script is the easiest way to build curl
|
||||||
|
for Android. Before you can build curl for Android, you need to install the
|
||||||
|
Android NDK first. This can be done using the SDK Manager that is part of
|
||||||
|
Android Studio. Once you have installed the Android NDK, you need to figure out
|
||||||
|
where it has been installed and then set up some environment variables before
|
||||||
|
launching `configure`. On macOS, those variables could look like this to compile
|
||||||
|
for `aarch64` and API level 29:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NDK=~/Library/Android/sdk/ndk/20.1.5948944
|
||||||
|
export HOST_TAG=darwin-x86_64
|
||||||
|
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
|
||||||
|
export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
|
||||||
|
export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
|
||||||
|
export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang
|
||||||
|
export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++
|
||||||
|
export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
|
||||||
|
export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
|
||||||
|
export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
|
||||||
|
```
|
||||||
|
|
||||||
|
When building on Linux or targeting other API levels or architectures, you need
|
||||||
|
to adjust those variables accordingly. After that you can build curl like this:
|
||||||
|
|
||||||
|
./configure --host aarch64-linux-android --with-pic --disable-shared
|
||||||
|
|
||||||
|
Note that this won't give you SSL/TLS support. If you need SSL/TLS, you have
|
||||||
|
to build curl against a SSL/TLS layer, e.g. OpenSSL, because it's impossible for
|
||||||
|
curl to access Android's native SSL/TLS layer. To build curl for Android using
|
||||||
|
OpenSSL, follow the OpenSSL build instructions and then install `libssl.a` and
|
||||||
|
`libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy `include/openssl` to
|
||||||
|
`$TOOLCHAIN/sysroot/usr/include`. Now you can build curl for Android using
|
||||||
|
OpenSSL like this:
|
||||||
|
|
||||||
|
./configure --host aarch64-linux-android --with-pic --disable-shared --with-ssl="$TOOLCHAIN/sysroot/usr"
|
||||||
|
|
||||||
|
Note, however, that you must target at least Android M (API level 23) or `configure`
|
||||||
|
won't be able to detect OpenSSL since `stderr` (and the like) weren't defined
|
||||||
|
before Android M.
|
||||||
|
|
||||||
|
# Cross compile
|
||||||
|
|
||||||
|
Download and unpack the curl package.
|
||||||
|
|
||||||
|
`cd` to the new directory. (e.g. `cd curl-7.12.3`)
|
||||||
|
|
||||||
|
Set environment variables to point to the cross-compile toolchain and call
|
||||||
|
configure with any options you need. Be sure and specify the `--host` and
|
||||||
|
`--build` parameters at configuration time. The following script is an
|
||||||
|
example of cross-compiling for the IBM 405GP PowerPC processor using the
|
||||||
|
toolchain from MonteVista for Hardhat Linux.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin
|
||||||
|
export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include"
|
||||||
|
export AR=ppc_405-ar
|
||||||
|
export AS=ppc_405-as
|
||||||
|
export LD=ppc_405-ld
|
||||||
|
export RANLIB=ppc_405-ranlib
|
||||||
|
export CC=ppc_405-gcc
|
||||||
|
export NM=ppc_405-nm
|
||||||
|
|
||||||
|
./configure --target=powerpc-hardhat-linux
|
||||||
|
--host=powerpc-hardhat-linux
|
||||||
|
--build=i586-pc-linux-gnu
|
||||||
|
--prefix=/opt/hardhat/devkit/ppc/405/target/usr/local
|
||||||
|
--exec-prefix=/usr/local
|
||||||
|
```
|
||||||
|
|
||||||
|
You may also need to provide a parameter like `--with-random=/dev/urandom` to
|
||||||
|
configure as it cannot detect the presence of a random number generating
|
||||||
|
device for a target system. The `--prefix` parameter specifies where curl
|
||||||
|
will be installed. If `configure` completes successfully, do `make` and `make
|
||||||
|
install` as usual.
|
||||||
|
|
||||||
|
In some cases, you may be able to simplify the above commands to as little as:
|
||||||
|
|
||||||
|
./configure --host=ARCH-OS
|
||||||
|
|
||||||
|
# REDUCING SIZE
|
||||||
|
|
||||||
|
There are a number of configure options that can be used to reduce the size of
|
||||||
|
libcurl for embedded applications where binary size is an important factor.
|
||||||
|
First, be sure to set the `CFLAGS` variable when configuring with any relevant
|
||||||
|
compiler optimization flags to reduce the size of the binary. For gcc, this
|
||||||
|
would mean at minimum the -Os option, and potentially the `-march=X`,
|
||||||
|
`-mdynamic-no-pic` and `-flto` options as well, e.g.
|
||||||
|
|
||||||
|
./configure CFLAGS='-Os' LDFLAGS='-Wl,-Bsymbolic'...
|
||||||
|
|
||||||
|
Note that newer compilers often produce smaller code than older versions
|
||||||
|
due to improved optimization.
|
||||||
|
|
||||||
|
Be sure to specify as many `--disable-` and `--without-` flags on the
|
||||||
|
configure command-line as you can to disable all the libcurl features that you
|
||||||
|
know your application is not going to need. Besides specifying the
|
||||||
|
`--disable-PROTOCOL` flags for all the types of URLs your application will not
|
||||||
|
use, here are some other flags that can reduce the size of the library:
|
||||||
|
|
||||||
|
- `--disable-ares` (disables support for the C-ARES DNS library)
|
||||||
|
- `--disable-cookies` (disables support for HTTP cookies)
|
||||||
|
- `--disable-crypto-auth` (disables HTTP cryptographic authentication)
|
||||||
|
- `--disable-ipv6` (disables support for IPv6)
|
||||||
|
- `--disable-manual` (disables support for the built-in documentation)
|
||||||
|
- `--disable-proxy` (disables support for HTTP and SOCKS proxies)
|
||||||
|
- `--disable-unix-sockets` (disables support for UNIX sockets)
|
||||||
|
- `--disable-verbose` (eliminates debugging strings and error code strings)
|
||||||
|
- `--disable-versioned-symbols` (disables support for versioned symbols)
|
||||||
|
- `--enable-hidden-symbols` (eliminates unneeded symbols in the shared library)
|
||||||
|
- `--without-libidn` (disables support for the libidn DNS library)
|
||||||
|
- `--without-librtmp` (disables support for RTMP)
|
||||||
|
- `--without-ssl` (disables support for SSL/TLS)
|
||||||
|
- `--without-zlib` (disables support for on-the-fly decompression)
|
||||||
|
|
||||||
|
The GNU compiler and linker have a number of options that can reduce the
|
||||||
|
size of the libcurl dynamic libraries on some platforms even further.
|
||||||
|
Specify them by providing appropriate `CFLAGS` and `LDFLAGS` variables on
|
||||||
|
the configure command-line, e.g.
|
||||||
|
|
||||||
|
CFLAGS="-Os -ffunction-sections -fdata-sections
|
||||||
|
-fno-unwind-tables -fno-asynchronous-unwind-tables -flto"
|
||||||
|
LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
|
||||||
|
|
||||||
|
Be sure also to strip debugging symbols from your binaries after compiling
|
||||||
|
using 'strip' (or the appropriate variant if cross-compiling). If space is
|
||||||
|
really tight, you may be able to remove some unneeded sections of the shared
|
||||||
|
library using the -R option to objcopy (e.g. the .comment section).
|
||||||
|
|
||||||
|
Using these techniques it is possible to create a basic HTTP-only shared
|
||||||
|
libcurl library for i386 Linux platforms that is only 113 KiB in size, and an
|
||||||
|
FTP-only library that is 113 KiB in size (as of libcurl version 7.50.3, using
|
||||||
|
gcc 5.4.0).
|
||||||
|
|
||||||
|
You may find that statically linking libcurl to your application will result
|
||||||
|
in a lower total size than dynamically linking.
|
||||||
|
|
||||||
|
Note that the curl test harness can detect the use of some, but not all, of
|
||||||
|
the `--disable` statements suggested above. Use will cause tests relying on
|
||||||
|
those features to fail. The test harness can be manually forced to skip the
|
||||||
|
relevant tests by specifying certain key words on the `runtests.pl` command
|
||||||
|
line. Following is a list of appropriate key words:
|
||||||
|
|
||||||
|
- `--disable-cookies` !cookies
|
||||||
|
- `--disable-manual` !--manual
|
||||||
|
- `--disable-proxy` !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
|
||||||
|
|
||||||
|
# PORTS
|
||||||
|
|
||||||
|
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 isn't listed, please let us know!
|
||||||
|
|
||||||
|
## 85 Operating Systems
|
||||||
|
|
||||||
|
AIX, AmigaOS, Android, Aros, BeOS, Blackberry 10, Blackberry Tablet OS, Cell
|
||||||
|
OS, ChromeOS, Cisco IOS, Cygwin, Dragonfly BSD, eCOS, FreeBSD, FreeDOS,
|
||||||
|
FreeRTOS, Fuchsia, Garmin OS, Genode, Haiku, HardenedBSD, HP-UX, Hurd,
|
||||||
|
Illumos, Integrity, iOS, ipadOS, IRIX, LineageOS, Linux, Lua RTOS, Mac OS 9,
|
||||||
|
macOS, Mbed, Micrium, MINIX, MorphOS, MPE/iX, MS-DOS, NCR MP-RAS, NetBSD,
|
||||||
|
Netware, Nintendo Switch, NonStop OS, NuttX, OpenBSD, OpenStep, Orbis OS,
|
||||||
|
OS/2, OS/400, OS21, Plan 9, PlayStation Portable, QNX, Qubes OS, ReactOS,
|
||||||
|
Redox, RICS OS, Sailfish OS, SCO Unix, Serenity, SINIX-Z, Solaris, SunOS,
|
||||||
|
Syllable OS, Symbian, Tizen, TPF, Tru64, tvOS, ucLinux, Ultrix, UNICOS,
|
||||||
|
UnixWare, VMS, vxWorks, WebOS, Wii system software, Windows, Windows CE, Xbox
|
||||||
|
System, z/OS, z/TPF, z/VM, z/VSE
|
||||||
|
|
||||||
|
## 22 CPU Architectures
|
||||||
|
|
||||||
|
Alpha, ARC, ARM, AVR32, Cell, HP-PA, Itanium, m68k, MicroBlaze, MIPS, Nios,
|
||||||
|
OpenRISC, POWER, PowerPC, RISC-V, s390, SH4, SPARC, VAX, x86, x86-64, Xtensa
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,990 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
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
|
||||||
|
1.2 Multiple methods in a single WWW-Authenticate: header
|
||||||
|
1.3 STARTTRANSFER time is wrong for HTTP POSTs
|
||||||
|
1.4 multipart formposts file name encoding
|
||||||
|
1.5 Expect-100 meets 417
|
||||||
|
1.6 Unnecessary close when 401 received waiting for 100
|
||||||
|
1.7 Deflate error after all content was received
|
||||||
|
1.8 DoH isn't used for all name resolves when enabled
|
||||||
|
1.9 HTTP/2 frames while in the connection pool kill reuse
|
||||||
|
1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM
|
||||||
|
|
||||||
|
2. TLS
|
||||||
|
2.1 CURLINFO_SSL_VERIFYRESULT has limited support
|
||||||
|
2.2 DER in keychain
|
||||||
|
2.3 Unable to use PKCS12 certificate with Secure Transport
|
||||||
|
2.4 Secure Transport won't import PKCS#12 client certificates without a password
|
||||||
|
2.5 Client cert handling with Issuer DN differs between backends
|
||||||
|
2.6 CURL_GLOBAL_SSL
|
||||||
|
2.7 Client cert (MTLS) issues with Schannel
|
||||||
|
2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname
|
||||||
|
2.9 TLS session cache doesn't work with TFO
|
||||||
|
2.10 Store TLS context per transfer instead of per connection
|
||||||
|
2.11 Schannel TLS 1.2 handshake bug in old Windows versions
|
||||||
|
2.12 FTPS with Schannel times out file list operation
|
||||||
|
2.14 Secure Transport disabling hostname validation also disables SNI
|
||||||
|
|
||||||
|
3. Email protocols
|
||||||
|
3.1 IMAP SEARCH ALL truncated response
|
||||||
|
3.2 No disconnect command
|
||||||
|
3.3 POP3 expects "CRLF.CRLF" eob for some single-line responses
|
||||||
|
3.4 AUTH PLAIN for SMTP is not working on all servers
|
||||||
|
|
||||||
|
4. Command line
|
||||||
|
4.1 -J and -O with %-encoded file names
|
||||||
|
4.2 -J with -C - fails
|
||||||
|
4.3 --retry and transfer timeouts
|
||||||
|
4.4 Improve --data-urlencode space encoding
|
||||||
|
|
||||||
|
5. Build and portability issues
|
||||||
|
5.1 OS400 port requires deprecated IBM library
|
||||||
|
5.2 curl-config --libs contains private details
|
||||||
|
5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10
|
||||||
|
5.4 Build with statically built dependency
|
||||||
|
5.5 can't handle Unicode arguments in non-Unicode builds on Windows
|
||||||
|
5.7 Visual Studio project gaps
|
||||||
|
5.8 configure finding libs in wrong directory
|
||||||
|
5.9 Utilize Requires.private directives in libcurl.pc
|
||||||
|
5.10 SMB tests fail with Python 2
|
||||||
|
5.11 configure --with-gssapi with Heimdal is ignored on macOS
|
||||||
|
|
||||||
|
6. Authentication
|
||||||
|
6.1 NTLM authentication and unicode
|
||||||
|
6.2 MIT Kerberos for Windows build
|
||||||
|
6.3 NTLM in system context uses wrong name
|
||||||
|
6.4 Negotiate and Kerberos V5 need a fake user name
|
||||||
|
6.5 NTLM doesn't support password with § character
|
||||||
|
6.6 libcurl can fail to try alternatives with --proxy-any
|
||||||
|
6.7 Don't clear digest for single realm
|
||||||
|
6.8 RTSP authentication breaks without redirect support
|
||||||
|
6.9 SHA-256 digest not supported in Windows SSPI builds
|
||||||
|
6.10 curl never completes Negotiate over HTTP
|
||||||
|
|
||||||
|
7. FTP
|
||||||
|
7.1 FTP without or slow 220 response
|
||||||
|
7.2 FTP with CONNECT and slow server
|
||||||
|
7.3 FTP with NOBODY and FAILONERROR
|
||||||
|
7.4 FTP with ACCT
|
||||||
|
7.5 ASCII FTP
|
||||||
|
7.6 FTP with NULs in URL parts
|
||||||
|
7.7 FTP and empty path parts in the URL
|
||||||
|
7.8 Premature transfer end but healthy control channel
|
||||||
|
7.9 Passive transfer tries only one IP address
|
||||||
|
7.10 FTPS needs session reuse
|
||||||
|
|
||||||
|
8. TELNET
|
||||||
|
8.1 TELNET and time limitations don't work
|
||||||
|
8.2 Microsoft telnet server
|
||||||
|
|
||||||
|
9. SFTP and SCP
|
||||||
|
9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct
|
||||||
|
9.2 wolfssh: publickey auth doesn't work
|
||||||
|
9.3 Remote recursive folder creation with SFTP
|
||||||
|
|
||||||
|
10. SOCKS
|
||||||
|
10.3 FTPS over SOCKS
|
||||||
|
10.4 active FTP over a SOCKS
|
||||||
|
|
||||||
|
11. Internals
|
||||||
|
11.1 Curl leaks .onion hostnames in DNS
|
||||||
|
11.2 error buffer not set if connection to multiple addresses fails
|
||||||
|
11.3 c-ares deviates from stock resolver on http://1346569778
|
||||||
|
11.4 HTTP test server 'connection-monitor' problems
|
||||||
|
11.5 Connection information when using TCP Fast Open
|
||||||
|
11.6 slow connect to localhost on Windows
|
||||||
|
11.7 signal-based resolver timeouts
|
||||||
|
11.8 DoH leaks memory after followlocation
|
||||||
|
11.9 DoH doesn't inherit all transfer options
|
||||||
|
11.10 Blocking socket operations in non-blocking API
|
||||||
|
11.11 A shared connection cache is not thread-safe
|
||||||
|
11.12 'no_proxy' string-matches IPv6 numerical addresses
|
||||||
|
11.13 wakeup socket disconnect causes havoc
|
||||||
|
11.14 Multi perform hangs waiting for threaded resolver
|
||||||
|
|
||||||
|
12. LDAP
|
||||||
|
12.1 OpenLDAP hangs after returning results
|
||||||
|
12.2 LDAP on Windows does authentication wrong?
|
||||||
|
12.3 LDAP on Windows doesn't work
|
||||||
|
12.4 LDAPS with NSS is slow
|
||||||
|
|
||||||
|
13. TCP/IP
|
||||||
|
13.1 --interface for ipv6 binds to unusable IP address
|
||||||
|
|
||||||
|
14. DICT
|
||||||
|
14.1 DICT responses show the underlying protocol
|
||||||
|
|
||||||
|
15. CMake
|
||||||
|
15.1 use correct SONAME
|
||||||
|
15.2 support build with GnuTLS
|
||||||
|
15.3 unusable tool_hugehelp.c with MinGW
|
||||||
|
15.4 build docs/curl.1
|
||||||
|
15.5 build on Linux links libcurl to libdl
|
||||||
|
15.6 uses -lpthread instead of Threads::Threads
|
||||||
|
15.7 generated .pc file contains strange entries
|
||||||
|
15.8 libcurl.pc uses absolute library paths
|
||||||
|
15.9 cert paths autodetected when cross-compiling
|
||||||
|
15.10 libspsl is not supported
|
||||||
|
15.11 ExternalProject_Add does not set CURL_CA_PATH
|
||||||
|
|
||||||
|
16. Applications
|
||||||
|
16.1 pulseUI VPN client
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
1. HTTP
|
||||||
|
|
||||||
|
1.2 Multiple methods in a single WWW-Authenticate: header
|
||||||
|
|
||||||
|
The HTTP responses headers WWW-Authenticate: can provide information about
|
||||||
|
multiple authentication methods as multiple headers or as several methods
|
||||||
|
within a single header. The latter way, several methods in the same physical
|
||||||
|
line, is not supported by libcurl's parser. (For no good reason.)
|
||||||
|
|
||||||
|
1.3 STARTTRANSFER time is wrong for HTTP POSTs
|
||||||
|
|
||||||
|
Wrong STARTTRANSFER timer accounting for POST requests Timer works fine with
|
||||||
|
GET requests, but while using POST the time for CURLINFO_STARTTRANSFER_TIME
|
||||||
|
is wrong. While using POST CURLINFO_STARTTRANSFER_TIME minus
|
||||||
|
CURLINFO_PRETRANSFER_TIME is near to zero every time.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/218
|
||||||
|
https://curl.se/bug/view.cgi?id=1213
|
||||||
|
|
||||||
|
1.4 multipart formposts file name encoding
|
||||||
|
|
||||||
|
When creating multipart formposts. The file name part can be encoded with
|
||||||
|
something beyond ascii but currently libcurl will only pass in the verbatim
|
||||||
|
string the app provides. There are several browsers that already do this
|
||||||
|
encoding. The key seems to be the updated draft to RFC2231:
|
||||||
|
https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||||
|
|
||||||
|
1.5 Expect-100 meets 417
|
||||||
|
|
||||||
|
If an upload using Expect: 100-continue receives an HTTP 417 response, it
|
||||||
|
ought to be automatically resent without the Expect:. A workaround is for
|
||||||
|
the client application to redo the transfer after disabling Expect:.
|
||||||
|
https://curl.se/mail/archive-2008-02/0043.html
|
||||||
|
|
||||||
|
1.6 Unnecessary close when 401 received waiting for 100
|
||||||
|
|
||||||
|
libcurl closes the connection if an HTTP 401 reply is received while it is
|
||||||
|
waiting for the 100-continue response.
|
||||||
|
https://curl.se/mail/lib-2008-08/0462.html
|
||||||
|
|
||||||
|
1.7 Deflate error after all content was received
|
||||||
|
|
||||||
|
There's a situation where we can get an error in a HTTP response that is
|
||||||
|
compressed, when that error is detected after all the actual body contents
|
||||||
|
have been received and delivered to the application. This is tricky, but is
|
||||||
|
ultimately a broken server.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/2719
|
||||||
|
|
||||||
|
1.8 DoH isn't used for all name resolves when enabled
|
||||||
|
|
||||||
|
Even if DoH is specified to be used, there are some name resolves that are
|
||||||
|
done without it. This should be fixed. When the internal function
|
||||||
|
`Curl_resolver_wait_resolv()` is called, it doesn't use DoH to complete the
|
||||||
|
resolve as it otherwise should.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/pull/3857 and
|
||||||
|
https://github.com/curl/curl/pull/3850
|
||||||
|
|
||||||
|
1.9 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 will
|
||||||
|
be found readable when considered for reuse and that makes curl think it is
|
||||||
|
dead and then it will be 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.
|
||||||
|
|
||||||
|
1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM
|
||||||
|
|
||||||
|
I'm using libcurl to POST form data using a FILE* with the CURLFORM_STREAM
|
||||||
|
option of curl_formadd(). I've noticed that if the connection drops at just
|
||||||
|
the right time, the POST is reattempted without the data from the file. It
|
||||||
|
seems like the file stream position isn't getting reset to the beginning of
|
||||||
|
the file. I found the CURLOPT_SEEKFUNCTION option and set that with a
|
||||||
|
function that performs an fseek() on the FILE*. However, setting that didn't
|
||||||
|
seem to fix the issue or even get called. See
|
||||||
|
https://github.com/curl/curl/issues/768
|
||||||
|
|
||||||
|
|
||||||
|
2. TLS
|
||||||
|
|
||||||
|
2.1 CURLINFO_SSL_VERIFYRESULT has limited support
|
||||||
|
|
||||||
|
CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL, NSS and
|
||||||
|
GnuTLS backends, so relying on this information in a generic app is flaky.
|
||||||
|
|
||||||
|
2.2 DER in keychain
|
||||||
|
|
||||||
|
Curl doesn't recognize certificates in DER format in keychain, but it works
|
||||||
|
with PEM. https://curl.se/bug/view.cgi?id=1065
|
||||||
|
|
||||||
|
2.3 Unable to use PKCS12 certificate with Secure Transport
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5403
|
||||||
|
|
||||||
|
2.4 Secure Transport won't import PKCS#12 client certificates without a password
|
||||||
|
|
||||||
|
libcurl calls SecPKCS12Import with the PKCS#12 client certificate, but that
|
||||||
|
function rejects certificates that do not have a password.
|
||||||
|
https://github.com/curl/curl/issues/1308
|
||||||
|
|
||||||
|
2.5 Client cert handling with Issuer DN differs between backends
|
||||||
|
|
||||||
|
When the specified client certificate doesn't 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.6 CURL_GLOBAL_SSL
|
||||||
|
|
||||||
|
Since libcurl 7.57.0, the flag CURL_GLOBAL_SSL is a no-op. The change was
|
||||||
|
merged in https://github.com/curl/curl/commit/d661b0afb571a
|
||||||
|
|
||||||
|
It was removed since it was
|
||||||
|
|
||||||
|
A) never clear for applications on how to deal with init in the light of
|
||||||
|
different SSL backends (the option was added back in the days when life
|
||||||
|
was simpler)
|
||||||
|
|
||||||
|
B) multissl introduced dynamic switching between SSL backends which
|
||||||
|
emphasized (A) even more
|
||||||
|
|
||||||
|
C) libcurl uses some TLS backend functionality even for non-TLS functions (to
|
||||||
|
get "good" random) so applications trying to avoid the init for
|
||||||
|
performance reasons would do wrong anyway
|
||||||
|
|
||||||
|
D) never very carefully documented so all this mostly just happened to work
|
||||||
|
for some users
|
||||||
|
|
||||||
|
However, in spite of the problems with the feature, there were some users who
|
||||||
|
apparently depended on this feature and who now claim libcurl is broken for
|
||||||
|
them. The fix for this situation is not obvious as a downright revert of the
|
||||||
|
patch is totally ruled out due to those reasons above.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/2276
|
||||||
|
|
||||||
|
2.7 Client cert (MTLS) issues with Schannel
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/3145
|
||||||
|
|
||||||
|
2.8 Schannel disable CURLOPT_SSL_VERIFYPEER and verify hostname
|
||||||
|
|
||||||
|
This seems to be a limitation in the underlying Schannel API.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/3284
|
||||||
|
|
||||||
|
2.9 TLS session cache doesn't work with TFO
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/4301
|
||||||
|
|
||||||
|
2.10 Store TLS context per transfer instead of per connection
|
||||||
|
|
||||||
|
The GnuTLS `backend->cred` and the OpenSSL `backend->ctx` data and their
|
||||||
|
proxy versions (and possibly other TLS backends), could be better moved to be
|
||||||
|
stored in the Curl_easy handle instead of in per connection so that a single
|
||||||
|
transfer that makes multiple connections can reuse the context and reduce
|
||||||
|
memory consumption.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/5102
|
||||||
|
|
||||||
|
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.12 FTPS with Schannel times out file list operation
|
||||||
|
|
||||||
|
"Instead of the command completing, it just sits there until the timeout
|
||||||
|
expires." - the same command line seems to work with other TLS backends and
|
||||||
|
other operating systems. See https://github.com/curl/curl/issues/5284.
|
||||||
|
|
||||||
|
2.14 Secure Transport disabling hostname validation also disables SNI
|
||||||
|
|
||||||
|
SNI is the hostname that is sent by the TLS library to the server as part of
|
||||||
|
the TLS handshake. Secure Transport does not send SNI when hostname validation
|
||||||
|
is disabled. Servers that host multiple websites may not know which
|
||||||
|
certificate to serve without SNI or which backend server to connect to. The
|
||||||
|
server may serve the certificate of a default server or abort.
|
||||||
|
|
||||||
|
If a server aborts a handshake then curl shows error "SSL peer handshake
|
||||||
|
failed, the server most likely requires a client certificate to connect".
|
||||||
|
In this case the error may also have been caused by lack of SNI.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/6347
|
||||||
|
|
||||||
|
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.3 POP3 expects "CRLF.CRLF" eob for some single-line responses
|
||||||
|
|
||||||
|
You have to tell libcurl not to expect a body, when dealing with one line
|
||||||
|
response commands. Please see the POP3 examples and test cases which show
|
||||||
|
this for the NOOP and DELE commands. https://curl.se/bug/?i=740
|
||||||
|
|
||||||
|
3.4 AUTH PLAIN for SMTP is not working on all servers
|
||||||
|
|
||||||
|
Specifying "--login-options AUTH=PLAIN" on the command line doesn't seem to
|
||||||
|
work correctly.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/4080
|
||||||
|
|
||||||
|
4. Command line
|
||||||
|
|
||||||
|
4.1 -J and -O with %-encoded file names
|
||||||
|
|
||||||
|
-J/--remote-header-name doesn't decode %-encoded file names. RFC6266 details
|
||||||
|
how it should be done. The can of worm is basically that we have no charset
|
||||||
|
handling in curl and ascii >=128 is a challenge for us. Not to mention that
|
||||||
|
decoding also means that we need to check for nastiness that is attempted,
|
||||||
|
like "../" sequences and the like. Probably everything to the left of any
|
||||||
|
embedded slashes should be cut off.
|
||||||
|
https://curl.se/bug/view.cgi?id=1294
|
||||||
|
|
||||||
|
-O also doesn't decode %-encoded names, and while it has even less
|
||||||
|
information about the charset involved the process is similar to the -J case.
|
||||||
|
|
||||||
|
Note that we won't add decoding to -O without the user asking for it with
|
||||||
|
some other means as well, since -O has always been documented to use the name
|
||||||
|
exactly as specified in the URL.
|
||||||
|
|
||||||
|
4.2 -J with -C - fails
|
||||||
|
|
||||||
|
When using -J (with -O), automatically resumed downloading together with "-C
|
||||||
|
-" fails. Without -J the same command line works! This happens because the
|
||||||
|
resume logic is worked out before the target file name (and thus its
|
||||||
|
pre-transfer size) has been figured out!
|
||||||
|
https://curl.se/bug/view.cgi?id=1169
|
||||||
|
|
||||||
|
4.3 --retry and transfer timeouts
|
||||||
|
|
||||||
|
If using --retry and the transfer timeouts (possibly due to using -m or
|
||||||
|
-y/-Y) the next attempt doesn't resume the transfer properly from what was
|
||||||
|
downloaded in the previous attempt but will truncate and restart at the
|
||||||
|
original position where it was at before the previous failed attempt. See
|
||||||
|
https://curl.se/mail/lib-2008-01/0080.html and Mandriva bug report
|
||||||
|
https://qa.mandriva.com/show_bug.cgi?id=22565
|
||||||
|
|
||||||
|
4.4 Improve --data-urlencode space encoding
|
||||||
|
|
||||||
|
ASCII space characters in --data-urlencode are currently encoded as %20
|
||||||
|
rather than +, which RFC 1866 says should be used.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/3229
|
||||||
|
|
||||||
|
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" will 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 curl compiled on OSX 10.13 failed to run on OSX 10.10
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/2905
|
||||||
|
|
||||||
|
5.4 Build with statically built dependency
|
||||||
|
|
||||||
|
The build scripts in curl (autotools, cmake and others) are primarily done to
|
||||||
|
work with shared/dynamic third party dependencies. When linking with shared
|
||||||
|
libraries, the dependency "chain" is handled automatically by the library
|
||||||
|
loader - on all modern systems.
|
||||||
|
|
||||||
|
If you instead link with a static library, we need to provide all the
|
||||||
|
dependency libraries already at the link command line.
|
||||||
|
|
||||||
|
Figuring out all the dependency libraries for a given library is hard, as it
|
||||||
|
might also involve figuring out the dependencies of the dependencies and they
|
||||||
|
may vary between platforms and even change between versions.
|
||||||
|
|
||||||
|
When using static dependencies, the build scripts will mostly assume that
|
||||||
|
you, the user, will provide all the necessary additional dependency libraries
|
||||||
|
as additional arguments in the build. With configure, by setting LIBS/LDFLAGS
|
||||||
|
on the command line.
|
||||||
|
|
||||||
|
We welcome help to improve curl's ability to link with static libraries, but
|
||||||
|
it is likely a task that we can never fully support.
|
||||||
|
|
||||||
|
5.5 can't handle Unicode arguments in non-Unicode builds on Windows
|
||||||
|
|
||||||
|
If a URL or filename can't 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. And, except for Cygwin, Windows can't use UTF-8
|
||||||
|
as a locale.
|
||||||
|
|
||||||
|
https://curl.se/bug/?i=345
|
||||||
|
https://curl.se/bug/?i=731
|
||||||
|
https://curl.se/bug/?i=3747
|
||||||
|
|
||||||
|
5.7 Visual Studio project gaps
|
||||||
|
|
||||||
|
The Visual Studio projects lack some features that the autoconf and nmake
|
||||||
|
builds offer, such as the following:
|
||||||
|
|
||||||
|
- support for zlib and nghttp2
|
||||||
|
- use of static runtime libraries
|
||||||
|
- add the test suite components
|
||||||
|
|
||||||
|
In addition to this the following could be implemented:
|
||||||
|
|
||||||
|
- support for other development IDEs
|
||||||
|
- add PATH environment variables for third-party DLLs
|
||||||
|
|
||||||
|
5.8 configure finding libs in wrong directory
|
||||||
|
|
||||||
|
When the configure script checks for third-party libraries, it adds those
|
||||||
|
directories to the LDFLAGS variable and then tries linking to see if it
|
||||||
|
works. When successful, the found directory is kept in the LDFLAGS variable
|
||||||
|
when the script continues to execute and do more tests and possibly check for
|
||||||
|
more libraries.
|
||||||
|
|
||||||
|
This can make subsequent checks for libraries wrongly detect another
|
||||||
|
installation in a directory that was previously added to LDFLAGS by another
|
||||||
|
library check!
|
||||||
|
|
||||||
|
A possibly better way to do these checks would be to keep the pristine LDFLAGS
|
||||||
|
even after successful checks and instead add those verified paths to a
|
||||||
|
separate variable that only after all library checks have been performed gets
|
||||||
|
appended to LDFLAGS.
|
||||||
|
|
||||||
|
5.9 Utilize Requires.private directives in libcurl.pc
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/864
|
||||||
|
|
||||||
|
5.10 SMB tests fail with Python 2
|
||||||
|
|
||||||
|
The error message says "TreeConnectAndX not found".
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5983
|
||||||
|
|
||||||
|
5.11 configure --with-gssapi with Heimdal is ignored on macOS
|
||||||
|
|
||||||
|
... unless you also pass --with-gssapi-libs
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/3841
|
||||||
|
|
||||||
|
6. Authentication
|
||||||
|
|
||||||
|
6.1 NTLM authentication and unicode
|
||||||
|
|
||||||
|
NTLM authentication involving unicode user name 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.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" will make it use wrong(?) user name - at least when compared
|
||||||
|
to what winhttp does. See https://curl.se/bug/view.cgi?id=535
|
||||||
|
|
||||||
|
6.4 Negotiate and Kerberos V5 need a fake user name
|
||||||
|
|
||||||
|
In order to get Negotiate (SPNEGO) authentication to work in HTTP or Kerberos
|
||||||
|
V5 in the e-mail protocols, you need to provide a (fake) user name (this
|
||||||
|
concerns both curl and the lib) because the code wrongly only considers
|
||||||
|
authentication if there's a user name provided by setting
|
||||||
|
conn->bits.user_passwd in url.c https://curl.se/bug/view.cgi?id=440 How?
|
||||||
|
https://curl.se/mail/lib-2004-08/0182.html A possible solution is to
|
||||||
|
either modify this variable to be set or introduce a variable such as
|
||||||
|
new conn->bits.want_authentication which is set when any of the authentication
|
||||||
|
options are set.
|
||||||
|
|
||||||
|
6.5 NTLM doesn't support password with § character
|
||||||
|
|
||||||
|
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 will cause 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 won't proceed to try authentication
|
||||||
|
using NTLM.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/876
|
||||||
|
|
||||||
|
6.7 Don't clear digest for single realm
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/3267
|
||||||
|
|
||||||
|
6.8 RTSP authentication breaks without redirect support
|
||||||
|
|
||||||
|
RTSP authentication broke in 7.66.0. A work-around is to enable RTSP in
|
||||||
|
CURLOPT_REDIR_PROTOCOLS. Authentication should however not be considered an
|
||||||
|
actual redirect so a "proper" fix needs to be different and not require users
|
||||||
|
to allow redirects to RTSP to work.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/pull/4750
|
||||||
|
|
||||||
|
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 isn't working correctly...?
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5235
|
||||||
|
|
||||||
|
7. FTP
|
||||||
|
|
||||||
|
7.1 FTP without or slow 220 response
|
||||||
|
|
||||||
|
If a connection is made to a FTP server but the server then just never sends
|
||||||
|
the 220 response or otherwise is dead slow, libcurl will not acknowledge the
|
||||||
|
connection timeout during that phase but only the "real" timeout - which may
|
||||||
|
surprise users as it is probably considered to be the connect phase to most
|
||||||
|
people. Brought up (and is being misunderstood) in:
|
||||||
|
https://curl.se/bug/view.cgi?id=856
|
||||||
|
|
||||||
|
7.2 FTP with CONNECT and slow server
|
||||||
|
|
||||||
|
When doing FTP over a socks proxy or CONNECT through HTTP proxy and the multi
|
||||||
|
interface is used, libcurl will fail if the (passive) TCP connection for the
|
||||||
|
data transfer isn't more or less instant as the code does not properly wait
|
||||||
|
for the connect to be confirmed. See test case 564 for a first shot at a test
|
||||||
|
case.
|
||||||
|
|
||||||
|
7.3 FTP with NOBODY and FAILONERROR
|
||||||
|
|
||||||
|
It seems sensible to be able to use CURLOPT_NOBODY and CURLOPT_FAILONERROR
|
||||||
|
with FTP to detect if a file exists or not, but it is not working:
|
||||||
|
https://curl.se/mail/lib-2008-07/0295.html
|
||||||
|
|
||||||
|
7.4 FTP with ACCT
|
||||||
|
|
||||||
|
When doing an operation over FTP that requires the ACCT command (but not when
|
||||||
|
logging in), the operation will fail since libcurl doesn't detect this and
|
||||||
|
thus fails to issue the correct command:
|
||||||
|
https://curl.se/bug/view.cgi?id=635
|
||||||
|
|
||||||
|
7.5 ASCII FTP
|
||||||
|
|
||||||
|
FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||||
|
accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
|
||||||
|
clearly describes how this should be done:
|
||||||
|
|
||||||
|
The sender converts the data from an internal character representation to
|
||||||
|
the standard 8-bit NVT-ASCII representation (see the Telnet
|
||||||
|
specification). The receiver will convert the data from the standard
|
||||||
|
form to his own internal form.
|
||||||
|
|
||||||
|
Since 7.15.4 at least line endings are converted.
|
||||||
|
|
||||||
|
7.6 FTP with NULs in URL parts
|
||||||
|
|
||||||
|
FTP URLs passed to curl may contain NUL (0x00) in the RFC 1738 <user>,
|
||||||
|
<password>, and <fpath> components, encoded as "%00". The problem is that
|
||||||
|
curl_unescape does not detect this, but instead returns a shortened C string.
|
||||||
|
From a strict FTP protocol standpoint, NUL is a valid character within RFC
|
||||||
|
959 <string>, so the way to handle this correctly in curl would be to use a
|
||||||
|
data structure other than a plain C string, one that can handle embedded NUL
|
||||||
|
characters. From a practical standpoint, most FTP servers would not
|
||||||
|
meaningfully support NUL characters within RFC 959 <string>, anyway (e.g.,
|
||||||
|
Unix pathnames may not contain NUL).
|
||||||
|
|
||||||
|
7.7 FTP and empty path parts in the URL
|
||||||
|
|
||||||
|
libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that
|
||||||
|
such parts should be sent to the server as 'CWD ' (without an argument). The
|
||||||
|
only exception to this rule, is that we knowingly break this if the empty
|
||||||
|
part is first in the path, as then we use the double slashes to indicate that
|
||||||
|
the user wants to reach the root dir (this exception SHALL remain even when
|
||||||
|
this bug is fixed).
|
||||||
|
|
||||||
|
7.8 Premature transfer end but healthy control channel
|
||||||
|
|
||||||
|
When 'multi_done' is called before the transfer has been completed the normal
|
||||||
|
way, it is considered a "premature" transfer end. In this situation, libcurl
|
||||||
|
closes the connection assuming it doesn't know the state of the connection so
|
||||||
|
it can't be reused for subsequent requests.
|
||||||
|
|
||||||
|
With FTP however, this isn't necessarily true but there are a bunch of
|
||||||
|
situations (listed in the ftp_done code) where it *could* keep the connection
|
||||||
|
alive even in this situation - but the current code doesn't. Fixing this would
|
||||||
|
allow libcurl to reuse FTP connections better.
|
||||||
|
|
||||||
|
7.9 Passive transfer tries only one IP address
|
||||||
|
|
||||||
|
When doing FTP operations through a proxy at localhost, the reported spotted
|
||||||
|
that curl only tried to connect once to the proxy, while it had multiple
|
||||||
|
addresses and a failed connect on one address should make it try the next.
|
||||||
|
|
||||||
|
After switching to passive mode (EPSV), curl should try all IP addresses for
|
||||||
|
"localhost". Currently it tries ::1, but it should also try 127.0.0.1.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/1508
|
||||||
|
|
||||||
|
7.10 FTPS needs session reuse
|
||||||
|
|
||||||
|
When the control connection is reused for a subsequent transfer, some FTPS
|
||||||
|
servers complain about "missing session reuse" for the data channel for the
|
||||||
|
second transfer.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/4654
|
||||||
|
|
||||||
|
8. TELNET
|
||||||
|
|
||||||
|
8.1 TELNET and time limitations don't work
|
||||||
|
|
||||||
|
When using telnet, the time limitation options don't work.
|
||||||
|
https://curl.se/bug/view.cgi?id=846
|
||||||
|
|
||||||
|
8.2 Microsoft telnet server
|
||||||
|
|
||||||
|
There seems to be a problem when connecting to the Microsoft telnet server.
|
||||||
|
https://curl.se/bug/view.cgi?id=649
|
||||||
|
|
||||||
|
|
||||||
|
9. SFTP and SCP
|
||||||
|
|
||||||
|
9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct
|
||||||
|
|
||||||
|
When libcurl sends CURLOPT_POSTQUOTE commands when connected to a 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.2 wolfssh: publickey auth doesn't work
|
||||||
|
|
||||||
|
When building curl to use the wolfSSH backend for SFTP, the publickey
|
||||||
|
authentication doesn't work. This is simply functionality not written for curl
|
||||||
|
yet, the necessary API for make this work is provided by wolfSSH.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/4820
|
||||||
|
|
||||||
|
9.3 Remote recursive folder creation with SFTP
|
||||||
|
|
||||||
|
On this servers, the curl fails to create directories on the remote server
|
||||||
|
even when CURLOPT_FTP_CREATE_MISSING_DIRS option is set.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5204
|
||||||
|
|
||||||
|
|
||||||
|
10. SOCKS
|
||||||
|
|
||||||
|
10.3 FTPS over SOCKS
|
||||||
|
|
||||||
|
libcurl doesn't support FTPS over a SOCKS proxy.
|
||||||
|
|
||||||
|
10.4 active FTP over a SOCKS
|
||||||
|
|
||||||
|
libcurl doesn't support active FTP over a SOCKS proxy
|
||||||
|
|
||||||
|
|
||||||
|
11. Internals
|
||||||
|
|
||||||
|
11.1 Curl leaks .onion hostnames in DNS
|
||||||
|
|
||||||
|
Curl sends DNS requests for hostnames with a .onion TLD. This leaks
|
||||||
|
information about what the user is attempting to access, and violates this
|
||||||
|
requirement of RFC7686: https://tools.ietf.org/html/rfc7686
|
||||||
|
|
||||||
|
Issue: https://github.com/curl/curl/issues/543
|
||||||
|
|
||||||
|
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
|
||||||
|
only. But you only have IPv4 connectivity. libcurl will correctly fail with
|
||||||
|
CURLE_COULDNT_CONNECT. But the error buffer set by CURLOPT_ERRORBUFFER
|
||||||
|
remains empty. Issue: https://github.com/curl/curl/issues/544
|
||||||
|
|
||||||
|
11.3 c-ares deviates from stock resolver on http://1346569778
|
||||||
|
|
||||||
|
When using the socket resolvers, that URL becomes:
|
||||||
|
|
||||||
|
* Rebuilt URL to: http://1346569778/
|
||||||
|
* Trying 80.67.6.50...
|
||||||
|
|
||||||
|
but with c-ares it instead says "Could not resolve: 1346569778 (Domain name
|
||||||
|
not found)"
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/893
|
||||||
|
|
||||||
|
11.4 HTTP test server 'connection-monitor' problems
|
||||||
|
|
||||||
|
The 'connection-monitor' feature of the sws HTTP test server doesn't 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 slow connect to localhost on Windows
|
||||||
|
|
||||||
|
When connecting to "localhost" on Windows, curl will resolve the name for
|
||||||
|
both ipv4 and ipv6 and try to connect to both happy eyeballs-style. Something
|
||||||
|
in there does however make it take 200 milliseconds to succeed - which is the
|
||||||
|
HAPPY_EYEBALLS_TIMEOUT define exactly. Lowering that define speeds up the
|
||||||
|
connection, suggesting a problem in the HE handling.
|
||||||
|
|
||||||
|
If we can *know* that we're talking to a local host, we should lower the
|
||||||
|
happy eyeballs delay timeout for IPv6 (related: hardcode the "localhost"
|
||||||
|
addresses, mentioned in TODO). Possibly we should reduce that delay for all.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/2281
|
||||||
|
|
||||||
|
11.7 signal-based resolver timeouts
|
||||||
|
|
||||||
|
libcurl built without an asynchronous resolver library uses alarm() to time
|
||||||
|
out DNS lookups. When a timeout occurs, this causes libcurl to jump from the
|
||||||
|
signal handler back into the library with a sigsetjmp, which effectively
|
||||||
|
causes libcurl to continue running within the signal handler. This is
|
||||||
|
non-portable and could cause problems on some platforms. A discussion on the
|
||||||
|
problem is available at https://curl.se/mail/lib-2008-09/0197.html
|
||||||
|
|
||||||
|
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||||
|
ought to be replaced by setitimer on systems that support it.
|
||||||
|
|
||||||
|
11.8 DoH leaks memory after followlocation
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/4592
|
||||||
|
|
||||||
|
11.9 DoH doesn't inherit all transfer options
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/4578
|
||||||
|
|
||||||
|
11.10 Blocking socket operations in non-blocking API
|
||||||
|
|
||||||
|
The list of blocking socket operations is in TODO section "More non-blocking".
|
||||||
|
|
||||||
|
11.11 A shared connection cache is not thread-safe
|
||||||
|
|
||||||
|
The share interface offers CURL_LOCK_DATA_CONNECT to have multiple easy
|
||||||
|
handle share a connection cache, but due to how connections are used they are
|
||||||
|
still not thread-safe when used shared.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/4915 and lib1541.c
|
||||||
|
|
||||||
|
11.12 'no_proxy' string-matches IPv6 numerical addresses
|
||||||
|
|
||||||
|
This has the downside that "::1" for example doesn't match "::0:1" even
|
||||||
|
though they are in fact the same address.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5745
|
||||||
|
|
||||||
|
11.13 wakeup socket disconnect causes havoc
|
||||||
|
|
||||||
|
waking an iPad breaks the wakeup socket pair, triggering a POLLIN event and
|
||||||
|
resulting in SOCKERRNO being set to ENOTCONN.
|
||||||
|
|
||||||
|
This condition, and other possible error conditions on the wakeup socket, are
|
||||||
|
not handled, so the condition remains on the FD and curl_multi_poll will
|
||||||
|
never block again.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6132 and
|
||||||
|
https://github.com/curl/curl/pull/6133
|
||||||
|
|
||||||
|
11.14 Multi perform hangs waiting for threaded resolver
|
||||||
|
|
||||||
|
If a threaded resolver takes a long time to complete, libcurl can be blocked
|
||||||
|
waiting for it for a longer time than expected - and longer than the set
|
||||||
|
timeouts.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/2975 and
|
||||||
|
https://github.com/curl/curl/issues/4852
|
||||||
|
|
||||||
|
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 doesn't 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 with NSS is slow
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/5874
|
||||||
|
|
||||||
|
13. TCP/IP
|
||||||
|
|
||||||
|
13.1 --interface for ipv6 binds to unusable IP address
|
||||||
|
|
||||||
|
Since IPv6 provides a lot of addresses with different scope, binding to an
|
||||||
|
IPv6 address needs to take the proper care so that it doesn't bind to a
|
||||||
|
locally scoped address as that is bound to fail.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/686
|
||||||
|
|
||||||
|
14. DICT
|
||||||
|
|
||||||
|
14.1 DICT responses show the underlying protocol
|
||||||
|
|
||||||
|
When getting a DICT response, the protocol parts of DICT aren't stripped off
|
||||||
|
from the output.
|
||||||
|
|
||||||
|
https://github.com/curl/curl/issues/1809
|
||||||
|
|
||||||
|
15. CMake
|
||||||
|
|
||||||
|
15.1 use correct SONAME
|
||||||
|
|
||||||
|
The autotools build sets the SONAME properly according to VERSIONINFO in
|
||||||
|
lib/Makefile.am and so should cmake to make comparable build.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/pull/5935
|
||||||
|
|
||||||
|
15.2 support build with GnuTLS
|
||||||
|
|
||||||
|
15.3 unusable tool_hugehelp.c with MinGW
|
||||||
|
|
||||||
|
see https://github.com/curl/curl/issues/3125
|
||||||
|
|
||||||
|
15.4 build docs/curl.1
|
||||||
|
|
||||||
|
The cmake build doesn't create the docs/curl.1 file and therefor must rely on
|
||||||
|
it being there already. This makes the --manual option not work and test
|
||||||
|
cases like 1139 can't function.
|
||||||
|
|
||||||
|
15.5 build on Linux links libcurl to libdl
|
||||||
|
|
||||||
|
... which it shouldn't need to!
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6165
|
||||||
|
|
||||||
|
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.8 libcurl.pc uses absolute library paths
|
||||||
|
|
||||||
|
The libcurl.pc file generated by cmake contains things like Libs.private:
|
||||||
|
/usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so. The
|
||||||
|
autotools equivalent would say Libs.private: -lssl -lcrypto -lz
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6169
|
||||||
|
|
||||||
|
15.9 cert paths autodetected when cross-compiling
|
||||||
|
|
||||||
|
The autotools build disables the ca_path/ca_bundle detection when
|
||||||
|
cross-compiling. The cmake build keeps doing the detection.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6178
|
||||||
|
|
||||||
|
15.10 libspsl is not supported
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6214
|
||||||
|
|
||||||
|
15.11 ExternalProject_Add does not set CURL_CA_PATH
|
||||||
|
|
||||||
|
CURL_CA_BUNDLE and CURL_CA_PATH are not set properly when cmake's
|
||||||
|
ExternalProject_Add is used to build curl as a dependency.
|
||||||
|
|
||||||
|
See https://github.com/curl/curl/issues/6313
|
||||||
|
|
||||||
|
16. Applications
|
||||||
|
|
||||||
|
16.1 pulseUI VPN client
|
||||||
|
|
||||||
|
This application crashes at startup with libcurl 7.74.0 (and presumably later
|
||||||
|
versions too) after we cleaned up OpenSSL initialization. Since this is the
|
||||||
|
only known application to do this, we suspect it is related to something they
|
||||||
|
are doing in their setup that isn't kosher. We have not been able to get in
|
||||||
|
contact with them nor got any technical details to help us debug this
|
||||||
|
further.
|
||||||
|
|
||||||
|
See
|
||||||
|
https://community.pulsesecure.net/t5/Pulse-Desktop-Clients/Linux-Pulse-Client-does-not-work-with-curl-7-74/m-p/44378
|
||||||
|
and https://github.com/curl/curl/issues/6306
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
MAIL ETIQUETTE
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
1.1 Mailing Lists
|
||||||
|
1.2 Netiquette
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
1.4 Subscription Required
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
1.7 How to unsubscribe
|
||||||
|
1.8 I posted, now what?
|
||||||
|
1.9 Your emails are public
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
2.2 Reply to the List
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
2.6 Quoting
|
||||||
|
2.7 Digest
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
|
||||||
|
1.1 Mailing Lists
|
||||||
|
|
||||||
|
The mailing lists we have are all listed and described at
|
||||||
|
https://curl.se/mail/
|
||||||
|
|
||||||
|
Each mailing list is targeted to a specific set of users and subjects,
|
||||||
|
please use the one or the ones that suit you the most.
|
||||||
|
|
||||||
|
Each mailing list has hundreds up to thousands of readers, meaning that
|
||||||
|
each mail sent will be received and read by a very large number of people.
|
||||||
|
People from various cultures, regions, religions and continents.
|
||||||
|
|
||||||
|
1.2 Netiquette
|
||||||
|
|
||||||
|
Netiquette is a common term for how to behave on the internet. Of course, in
|
||||||
|
each particular group and subculture there will be differences in what is
|
||||||
|
acceptable and what is considered good manners.
|
||||||
|
|
||||||
|
This document outlines what we in the curl project consider to be good
|
||||||
|
etiquette, and primarily this focus on how to behave on and how to use our
|
||||||
|
mailing lists.
|
||||||
|
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
|
||||||
|
Many people send one question to one person. One person gets many mails, and
|
||||||
|
there is only one person who can give you a reply. The question may be
|
||||||
|
something that other people would also like to ask. These other people have
|
||||||
|
no way to read the reply, but to ask the one person the question. The one
|
||||||
|
person consequently gets overloaded with mail.
|
||||||
|
|
||||||
|
If you really want to contact an individual and perhaps pay for his or her
|
||||||
|
services, by all means go ahead, but if it's just another curl question,
|
||||||
|
take it to a suitable list instead.
|
||||||
|
|
||||||
|
1.4 Subscription Required
|
||||||
|
|
||||||
|
All curl mailing lists require that you are subscribed to allow a mail to go
|
||||||
|
through to all the subscribers.
|
||||||
|
|
||||||
|
If you post without being subscribed (or from a different mail address than
|
||||||
|
the one you are subscribed with), your mail will simply be silently
|
||||||
|
discarded. You have to subscribe first, then post.
|
||||||
|
|
||||||
|
The reason for this unfortunate and strict subscription policy is of course
|
||||||
|
to stop spam from pestering the lists.
|
||||||
|
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
|
||||||
|
Several of the curl mailing lists automatically make all posts from new
|
||||||
|
subscribers be moderated. This means that after you've subscribed and
|
||||||
|
sent your first mail to a list, that mail will not be let through to the
|
||||||
|
list until a mailing list administrator has verified that it is OK and
|
||||||
|
permits it to get posted.
|
||||||
|
|
||||||
|
Once a first post has been made that proves the sender is actually talking
|
||||||
|
about curl-related subjects, the moderation "flag" will be switched off and
|
||||||
|
future posts will go through without being moderated.
|
||||||
|
|
||||||
|
The reason for this moderation policy is that we do suffer from spammers who
|
||||||
|
actually subscribe and send spam to our lists.
|
||||||
|
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
|
||||||
|
Despite our good intentions and hard work to keep spam off the lists and to
|
||||||
|
maintain a friendly and positive atmosphere, there will be times when spam
|
||||||
|
and or trolls get through.
|
||||||
|
|
||||||
|
Troll - "someone who posts inflammatory, extraneous, or off-topic messages
|
||||||
|
in an online community"
|
||||||
|
|
||||||
|
Spam - "use of electronic messaging systems to send unsolicited bulk
|
||||||
|
messages"
|
||||||
|
|
||||||
|
No matter what, we NEVER EVER respond to trolls or spammers on the list. If
|
||||||
|
you believe the list admin should do something in particular, contact him/her
|
||||||
|
off-list. The subject will be taken care of as much as possible to prevent
|
||||||
|
repeated offenses, but responding on the list to such messages never leads to
|
||||||
|
anything good and only puts the light even more on the offender: which was
|
||||||
|
the entire purpose of it getting sent to the list in the first place.
|
||||||
|
|
||||||
|
Don't feed the trolls!
|
||||||
|
|
||||||
|
1.7 How to unsubscribe
|
||||||
|
|
||||||
|
You can unsubscribe the same way you subscribed in the first place. You go
|
||||||
|
to the page for the particular mailing list you're subscribed to and you enter
|
||||||
|
your email address and password and press the unsubscribe button.
|
||||||
|
|
||||||
|
Also, the instructions to unsubscribe are included in the headers of every
|
||||||
|
mail that is sent out to all curl related mailing lists and there's a footer
|
||||||
|
in each mail that links to the "admin" page on which you can unsubscribe and
|
||||||
|
change other options.
|
||||||
|
|
||||||
|
You NEVER EVER email the mailing list requesting someone else to take you off
|
||||||
|
the list.
|
||||||
|
|
||||||
|
1.8 I posted, now what?
|
||||||
|
|
||||||
|
If you aren't subscribed with the exact same email address that you used to
|
||||||
|
send the email, your post will just be silently discarded.
|
||||||
|
|
||||||
|
If you posted for the first time to the mailing list, you first need to wait
|
||||||
|
for an administrator to allow your email to go through (moderated). This normally
|
||||||
|
happens very quickly but in case we're asleep, you may have to wait a few
|
||||||
|
hours.
|
||||||
|
|
||||||
|
Once your email goes through it is sent out to several hundred or even
|
||||||
|
thousands of recipients. Your email may cover an area that not that many people
|
||||||
|
know about or are interested in. Or possibly the person who knows about it
|
||||||
|
is on vacation or under a very heavy work load right now. You may have to wait
|
||||||
|
for a response and you should not expect to get a response at all, but
|
||||||
|
hopefully you get an answer within a couple of days.
|
||||||
|
|
||||||
|
You do yourself and all of us a service when you include as many details as
|
||||||
|
possible already in your first email. Mention your operating system and
|
||||||
|
environment. Tell us which curl version you're using and tell us what you
|
||||||
|
did, what happened and what you expected would happen. Preferably, show us
|
||||||
|
what you did with details enough to allow others to help point out the problem
|
||||||
|
or repeat the same steps in their locations.
|
||||||
|
|
||||||
|
Failing to include details will only delay responses and make people respond
|
||||||
|
and ask for more details and you will have to send a follow-up email that
|
||||||
|
includes them.
|
||||||
|
|
||||||
|
Expect the responses to primarily help YOU debug the issue, or ask YOU
|
||||||
|
questions that can lead you or others towards a solution or explanation to
|
||||||
|
whatever you experience.
|
||||||
|
|
||||||
|
If you are a repeat offender to the guidelines outlined in this document,
|
||||||
|
chances are that people will ignore you at will and your chances to get
|
||||||
|
responses in the future will greatly diminish.
|
||||||
|
|
||||||
|
1.9 Your emails are public
|
||||||
|
|
||||||
|
Your email, its contents and all its headers and the details in those
|
||||||
|
headers will be received by every subscriber of the mailing list that you
|
||||||
|
send your email to.
|
||||||
|
|
||||||
|
Your email as sent to a curl mailing list will end up in mail archives, on
|
||||||
|
the curl website and elsewhere, for others to see and read. Today and in
|
||||||
|
the future. In addition to the archives, the mail is sent out to thousands
|
||||||
|
of individuals. There is no way to undo a sent email.
|
||||||
|
|
||||||
|
When sending emails to a curl mailing list, do not include sensitive
|
||||||
|
information such as user names and passwords; use fake ones, temporary ones
|
||||||
|
or just remove them completely from the mail. Note that this includes base64
|
||||||
|
encoded HTTP Basic auth headers.
|
||||||
|
|
||||||
|
This public nature of the curl mailing lists makes automatically inserted mail
|
||||||
|
footers about mails being "private" or "only meant for the recipient" or
|
||||||
|
similar even more silly than usual. Because they are absolutely not private
|
||||||
|
when sent to a public mailing list.
|
||||||
|
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
|
||||||
|
Please do not reply to an existing message as a short-cut to post a message
|
||||||
|
to the lists.
|
||||||
|
|
||||||
|
Many mail programs and web archivers use information within mails to keep
|
||||||
|
them together as "threads", as collections of posts that discuss a certain
|
||||||
|
subject. If you don't intend to reply on the same or similar subject, don't
|
||||||
|
just hit reply on an existing mail and change subject, create a new mail.
|
||||||
|
|
||||||
|
2.2 Reply to the List
|
||||||
|
|
||||||
|
When replying to a message from the list, make sure that you do "group
|
||||||
|
reply" or "reply to all", and not just reply to the author of the single
|
||||||
|
mail you reply to.
|
||||||
|
|
||||||
|
We're actively discouraging replying back to the single person by setting
|
||||||
|
the Reply-To: field in outgoing mails back to the mailing list address,
|
||||||
|
making it harder for people to mail the author directly, if only by mistake.
|
||||||
|
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
|
||||||
|
Please use a subject of the mail that makes sense and that is related to the
|
||||||
|
contents of your mail. It makes it a lot easier to find your mail afterwards
|
||||||
|
and it makes it easier to track mail threads and topics.
|
||||||
|
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
|
||||||
|
If you reply to a message, don't use top-posting. Top-posting is when you
|
||||||
|
write the new text at the top of a mail and you insert the previous quoted
|
||||||
|
mail conversation below. It forces users to read the mail in a backwards
|
||||||
|
order to properly understand it.
|
||||||
|
|
||||||
|
This is why top posting is so bad (in top posting order):
|
||||||
|
|
||||||
|
A: Because it messes up the order in which people normally read text.
|
||||||
|
Q: Why is top-posting such a bad thing?
|
||||||
|
A: Top-posting.
|
||||||
|
Q: What is the most annoying thing in e-mail?
|
||||||
|
|
||||||
|
Apart from the screwed up read order (especially when mixed together in a
|
||||||
|
thread when someone responds using the mandated bottom-posting style), it
|
||||||
|
also makes it impossible to quote only parts of the original mail.
|
||||||
|
|
||||||
|
When you reply to a mail. You let the mail client insert the previous mail
|
||||||
|
quoted. Then you put the cursor on the first line of the mail and you move
|
||||||
|
down through the mail, deleting all parts of the quotes that don't add
|
||||||
|
context for your comments. When you want to add a comment you do so, inline,
|
||||||
|
right after the quotes that relate to your comment. Then you continue
|
||||||
|
downwards again.
|
||||||
|
|
||||||
|
When most of the quotes have been removed and you've added your own words,
|
||||||
|
you're done!
|
||||||
|
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
|
||||||
|
Please switch off those HTML encoded messages. You can mail all those funny
|
||||||
|
mails to your friends. We speak plain text mails.
|
||||||
|
|
||||||
|
2.6 Quoting
|
||||||
|
|
||||||
|
Quote as little as possible. Just enough to provide the context you cannot
|
||||||
|
leave out. A lengthy description can be found here:
|
||||||
|
|
||||||
|
https://www.netmeister.org/news/learn2quote.html
|
||||||
|
|
||||||
|
2.7 Digest
|
||||||
|
|
||||||
|
We allow subscribers to subscribe to the "digest" version of the mailing
|
||||||
|
lists. A digest is a collection of mails lumped together in one single mail.
|
||||||
|
|
||||||
|
Should you decide to reply to a mail sent out as a digest, there are two
|
||||||
|
things you MUST consider if you really really cannot subscribe normally
|
||||||
|
instead:
|
||||||
|
|
||||||
|
Cut off all mails and chatter that is not related to the mail you want to
|
||||||
|
reply to.
|
||||||
|
|
||||||
|
Change the subject name to something sensible and related to the subject,
|
||||||
|
preferably even the actual subject of the single mail you wanted to reply to
|
||||||
|
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
Many people mail questions to the list, people spend some of their time and
|
||||||
|
make an effort in providing good answers to these questions.
|
||||||
|
|
||||||
|
If you are the one who asks, please consider responding once more in case
|
||||||
|
one of the hints was what solved your problems. The guys who write answers
|
||||||
|
feel good to know that they provided a good answer and that you fixed the
|
||||||
|
problem. Far too often, the person who asked the question is never heard from
|
||||||
|
again, and we never get to know if he/she is gone because the problem was
|
||||||
|
solved or perhaps because the problem was unsolvable!
|
||||||
|
|
||||||
|
Getting the solution posted also helps other users that experience the same
|
||||||
|
problem(s). They get to see (possibly in the web archives) that the
|
||||||
|
suggested fixes actually has helped at least one person.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# MQTT in curl
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
A plain "GET" subscribes to the topic and prints all published messages.
|
||||||
|
Doing a "POST" publishes the post data to the topic and exits.
|
||||||
|
|
||||||
|
Example subscribe:
|
||||||
|
|
||||||
|
curl mqtt://host/home/bedroom/temp
|
||||||
|
|
||||||
|
Example publish:
|
||||||
|
|
||||||
|
curl -d 75 mqtt://host/home/bedroom/dimmer
|
||||||
|
|
||||||
|
## What does curl deliver as a response to a subscribe
|
||||||
|
|
||||||
|
It outputs two bytes topic length (MSB | LSB), the topic followed by the
|
||||||
|
payload.
|
||||||
|
|
||||||
|
## Caveats
|
||||||
|
|
||||||
|
Remaining limitations:
|
||||||
|
- No username support
|
||||||
|
- Only QoS level 0 is implemented for publish
|
||||||
|
- No way to set retain flag for publish
|
||||||
|
- No username/password support
|
||||||
|
- No TLS (mqtts) support
|
||||||
|
- Naive EAGAIN handling won't handle split messages
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
|
# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable
|
||||||
|
# but distribute it (using the relative file name) in the next variable
|
||||||
|
man_MANS = $(abs_builddir)/curl.1
|
||||||
|
noinst_man_MANS = curl.1 mk-ca-bundle.1
|
||||||
|
dist_man_MANS = curl-config.1
|
||||||
|
GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
|
||||||
|
PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
|
||||||
|
MANDISTPAGES = curl.1.dist curl-config.1.dist
|
||||||
|
|
||||||
|
HTMLPAGES = $(GENHTMLPAGES) index.html
|
||||||
|
|
||||||
|
# Build targets in this file (.) before cmdline-opts to ensure that
|
||||||
|
# the curl.1 rule below runs first
|
||||||
|
SUBDIRS = . cmdline-opts
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) examples libcurl
|
||||||
|
|
||||||
|
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(noinst_man_MANS) \
|
||||||
|
ALTSVC.md \
|
||||||
|
BINDINGS.md \
|
||||||
|
BUG-BOUNTY.md \
|
||||||
|
BUGS.md \
|
||||||
|
CHECKSRC.md \
|
||||||
|
CIPHERS.md \
|
||||||
|
CMakeLists.txt \
|
||||||
|
CODE_OF_CONDUCT.md \
|
||||||
|
CODE_REVIEW.md \
|
||||||
|
CODE_STYLE.md \
|
||||||
|
CONTRIBUTE.md \
|
||||||
|
CURL-DISABLE.md \
|
||||||
|
DEPRECATE.md \
|
||||||
|
DYNBUF.md \
|
||||||
|
ECH.md \
|
||||||
|
EXPERIMENTAL.md \
|
||||||
|
FAQ \
|
||||||
|
FEATURES.md \
|
||||||
|
GOVERNANCE.md \
|
||||||
|
HELP-US.md \
|
||||||
|
HISTORY.md \
|
||||||
|
HSTS.md \
|
||||||
|
HTTP-COOKIES.md \
|
||||||
|
HTTP2.md \
|
||||||
|
HTTP3.md \
|
||||||
|
HYPER.md \
|
||||||
|
INSTALL \
|
||||||
|
INSTALL.cmake \
|
||||||
|
INSTALL.md \
|
||||||
|
INTERNALS.md \
|
||||||
|
KNOWN_BUGS \
|
||||||
|
MAIL-ETIQUETTE \
|
||||||
|
MQTT.md \
|
||||||
|
NEW-PROTOCOL.md \
|
||||||
|
options-in-versions \
|
||||||
|
PARALLEL-TRANSFERS.md \
|
||||||
|
README.md \
|
||||||
|
RELEASE-PROCEDURE.md \
|
||||||
|
ROADMAP.md \
|
||||||
|
SECURITY-PROCESS.md \
|
||||||
|
SSL-PROBLEMS.md \
|
||||||
|
SSLCERTS.md \
|
||||||
|
THANKS \
|
||||||
|
TODO \
|
||||||
|
TheArtOfHttpScripting.md \
|
||||||
|
URL-SYNTAX.md \
|
||||||
|
VERSIONS.md
|
||||||
|
|
||||||
|
MAN2HTML= roffit $< >$@
|
||||||
|
|
||||||
|
SUFFIXES = .1 .html .pdf
|
||||||
|
|
||||||
|
# $(abs_builddir) is to disable VPATH when searching for this file, which
|
||||||
|
# would otherwise find the copy in $(srcdir) which breaks the $(HUGE)
|
||||||
|
# rule in src/Makefile.am in out-of-tree builds that references the file in the
|
||||||
|
# build directory.
|
||||||
|
#
|
||||||
|
# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree
|
||||||
|
# build), then run make recursively to rebuild it only if its dependencies
|
||||||
|
# have changed.
|
||||||
|
$(abs_builddir)/curl.1:
|
||||||
|
if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \
|
||||||
|
$(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi
|
||||||
|
cd cmdline-opts && $(MAKE)
|
||||||
|
|
||||||
|
html: $(HTMLPAGES)
|
||||||
|
cd libcurl && $(MAKE) html
|
||||||
|
|
||||||
|
pdf: $(PDFPAGES)
|
||||||
|
cd libcurl && $(MAKE) pdf
|
||||||
|
|
||||||
|
.1.html:
|
||||||
|
$(MAN2HTML)
|
||||||
|
|
||||||
|
.1.pdf:
|
||||||
|
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||||
|
groff -Tps -man $< >$$foo.ps; \
|
||||||
|
ps2pdf $$foo.ps $@; \
|
||||||
|
rm $$foo.ps; \
|
||||||
|
echo "converted $< to $@")
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
rm -f $(CLEANFILES)
|
||||||
@@ -0,0 +1,926 @@
|
|||||||
|
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
VPATH = @srcdir@
|
||||||
|
am__is_gnu_make = { \
|
||||||
|
if test -z '$(MAKELEVEL)'; then \
|
||||||
|
false; \
|
||||||
|
elif test -n '$(MAKE_HOST)'; then \
|
||||||
|
true; \
|
||||||
|
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
false; \
|
||||||
|
fi; \
|
||||||
|
}
|
||||||
|
am__make_running_with_option = \
|
||||||
|
case $${target_option-} in \
|
||||||
|
?) ;; \
|
||||||
|
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||||
|
"target option '$${target_option-}' specified" >&2; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
has_opt=no; \
|
||||||
|
sane_makeflags=$$MAKEFLAGS; \
|
||||||
|
if $(am__is_gnu_make); then \
|
||||||
|
sane_makeflags=$$MFLAGS; \
|
||||||
|
else \
|
||||||
|
case $$MAKEFLAGS in \
|
||||||
|
*\\[\ \ ]*) \
|
||||||
|
bs=\\; \
|
||||||
|
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||||
|
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||||
|
esac; \
|
||||||
|
fi; \
|
||||||
|
skip_next=no; \
|
||||||
|
strip_trailopt () \
|
||||||
|
{ \
|
||||||
|
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||||
|
}; \
|
||||||
|
for flg in $$sane_makeflags; do \
|
||||||
|
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||||
|
case $$flg in \
|
||||||
|
*=*|--*) continue;; \
|
||||||
|
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||||
|
-*I?*) strip_trailopt 'I';; \
|
||||||
|
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||||
|
-*O?*) strip_trailopt 'O';; \
|
||||||
|
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||||
|
-*l?*) strip_trailopt 'l';; \
|
||||||
|
-[dEDm]) skip_next=yes;; \
|
||||||
|
-[JT]) skip_next=yes;; \
|
||||||
|
esac; \
|
||||||
|
case $$flg in \
|
||||||
|
*$$target_option*) has_opt=yes; break;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
test $$has_opt = yes
|
||||||
|
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||||
|
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = docs
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compile_check_sizeof.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-compilers.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-confopts.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-functions.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-openssl.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-override.m4 \
|
||||||
|
$(top_srcdir)/m4/curl-reentrant.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||||
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||||
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
|
$(top_srcdir)/m4/xc-am-iface.m4 \
|
||||||
|
$(top_srcdir)/m4/xc-cc-check.m4 \
|
||||||
|
$(top_srcdir)/m4/xc-lt-iface.m4 \
|
||||||
|
$(top_srcdir)/m4/xc-translit.m4 \
|
||||||
|
$(top_srcdir)/m4/xc-val-flgs.m4 \
|
||||||
|
$(top_srcdir)/m4/zz40-xc-ovr.m4 \
|
||||||
|
$(top_srcdir)/m4/zz50-xc-ovr.m4 \
|
||||||
|
$(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
|
am__v_P_0 = false
|
||||||
|
am__v_P_1 = :
|
||||||
|
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||||
|
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
am__v_GEN_1 =
|
||||||
|
AM_V_at = $(am__v_at_@AM_V@)
|
||||||
|
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||||
|
am__v_at_0 = @
|
||||||
|
am__v_at_1 =
|
||||||
|
depcomp =
|
||||||
|
am__maybe_remake_depfiles =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||||
|
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||||
|
install-data-recursive install-dvi-recursive \
|
||||||
|
install-exec-recursive install-html-recursive \
|
||||||
|
install-info-recursive install-pdf-recursive \
|
||||||
|
install-ps-recursive install-recursive installcheck-recursive \
|
||||||
|
installdirs-recursive pdf-recursive ps-recursive \
|
||||||
|
tags-recursive uninstall-recursive
|
||||||
|
am__can_run_installinfo = \
|
||||||
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
|
n|no|NO) false;; \
|
||||||
|
*) (install-info --version) >/dev/null 2>&1;; \
|
||||||
|
esac
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__uninstall_files_from_dir = { \
|
||||||
|
test -z "$$files" \
|
||||||
|
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||||
|
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||||
|
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||||
|
}
|
||||||
|
man1dir = $(mandir)/man1
|
||||||
|
am__installdirs = "$(DESTDIR)$(man1dir)"
|
||||||
|
MANS = $(dist_man_MANS) $(man_MANS)
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
am__recursive_targets = \
|
||||||
|
$(RECURSIVE_TARGETS) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS) \
|
||||||
|
$(am__extra_recursive_targets)
|
||||||
|
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||||
|
distdir distdir-am
|
||||||
|
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||||
|
# Read a list of newline-separated strings from the standard input,
|
||||||
|
# and print each of them once, without duplicates. Input order is
|
||||||
|
# *not* preserved.
|
||||||
|
am__uniquify_input = $(AWK) '\
|
||||||
|
BEGIN { nonempty = 0; } \
|
||||||
|
{ items[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in items) print i; }; } \
|
||||||
|
'
|
||||||
|
# Make sure the list of sources is unique. This is necessary because,
|
||||||
|
# e.g., the same source file might be shared among _SOURCES variables
|
||||||
|
# for different programs/libraries.
|
||||||
|
am__define_uniq_tagged_files = \
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | $(am__uniquify_input)`
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in INSTALL \
|
||||||
|
THANKS TODO
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AR = @AR@
|
||||||
|
AR_FLAGS = @AR_FLAGS@
|
||||||
|
AS = @AS@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
|
||||||
|
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
|
||||||
|
CURLVERSION = @CURLVERSION@
|
||||||
|
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||||
|
CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
|
||||||
|
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
|
||||||
|
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
|
||||||
|
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
||||||
|
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
|
||||||
|
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||||
|
CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
|
||||||
|
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||||
|
CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
|
||||||
|
CURL_DISABLE_MQTT = @CURL_DISABLE_MQTT@
|
||||||
|
CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
|
||||||
|
CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
|
||||||
|
CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
|
||||||
|
CURL_DISABLE_SMB = @CURL_DISABLE_SMB@
|
||||||
|
CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
|
||||||
|
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||||
|
CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
|
||||||
|
CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
|
||||||
|
CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
|
||||||
|
CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
|
||||||
|
CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
ENABLE_SHARED = @ENABLE_SHARED@
|
||||||
|
ENABLE_STATIC = @ENABLE_STATIC@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
|
||||||
|
GCOV = @GCOV@
|
||||||
|
GREP = @GREP@
|
||||||
|
HAVE_BROTLI = @HAVE_BROTLI@
|
||||||
|
HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
|
||||||
|
HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
|
||||||
|
HAVE_LIBZ = @HAVE_LIBZ@
|
||||||
|
HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@
|
||||||
|
HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@
|
||||||
|
HAVE_ZSTD = @HAVE_ZSTD@
|
||||||
|
IDN_ENABLED = @IDN_ENABLED@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
IPV6_ENABLED = @IPV6_ENABLED@
|
||||||
|
LCOV = @LCOV@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||||
|
LIBCURL_NO_SHARED = @LIBCURL_NO_SHARED@
|
||||||
|
LIBMETALINK_CPPFLAGS = @LIBMETALINK_CPPFLAGS@
|
||||||
|
LIBMETALINK_LDFLAGS = @LIBMETALINK_LDFLAGS@
|
||||||
|
LIBMETALINK_LIBS = @LIBMETALINK_LIBS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
|
MANOPT = @MANOPT@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
NROFF = @NROFF@
|
||||||
|
NSS_LIBS = @NSS_LIBS@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PERL = @PERL@
|
||||||
|
PKGADD_NAME = @PKGADD_NAME@
|
||||||
|
PKGADD_PKG = @PKGADD_PKG@
|
||||||
|
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||||
|
PKGCONFIG = @PKGCONFIG@
|
||||||
|
RANDOM_FILE = @RANDOM_FILE@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SSL_BACKENDS = @SSL_BACKENDS@
|
||||||
|
SSL_ENABLED = @SSL_ENABLED@
|
||||||
|
SSL_LIBS = @SSL_LIBS@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
SUPPORT_FEATURES = @SUPPORT_FEATURES@
|
||||||
|
SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
|
||||||
|
USE_ARES = @USE_ARES@
|
||||||
|
USE_BEARSSL = @USE_BEARSSL@
|
||||||
|
USE_GNUTLS = @USE_GNUTLS@
|
||||||
|
USE_GNUTLS_NETTLE = @USE_GNUTLS_NETTLE@
|
||||||
|
USE_HYPER = @USE_HYPER@
|
||||||
|
USE_LIBRTMP = @USE_LIBRTMP@
|
||||||
|
USE_LIBSSH = @USE_LIBSSH@
|
||||||
|
USE_LIBSSH2 = @USE_LIBSSH2@
|
||||||
|
USE_MBEDTLS = @USE_MBEDTLS@
|
||||||
|
USE_MESALINK = @USE_MESALINK@
|
||||||
|
USE_NGHTTP2 = @USE_NGHTTP2@
|
||||||
|
USE_NGHTTP3 = @USE_NGHTTP3@
|
||||||
|
USE_NGTCP2 = @USE_NGTCP2@
|
||||||
|
USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@
|
||||||
|
USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@
|
||||||
|
USE_NSS = @USE_NSS@
|
||||||
|
USE_OPENLDAP = @USE_OPENLDAP@
|
||||||
|
USE_QUICHE = @USE_QUICHE@
|
||||||
|
USE_SCHANNEL = @USE_SCHANNEL@
|
||||||
|
USE_SECTRANSP = @USE_SECTRANSP@
|
||||||
|
USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@
|
||||||
|
USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
|
||||||
|
USE_WOLFSSH = @USE_WOLFSSH@
|
||||||
|
USE_WOLFSSL = @USE_WOLFSSL@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
VERSIONNUM = @VERSIONNUM@
|
||||||
|
ZLIB_LIBS = @ZLIB_LIBS@
|
||||||
|
ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_AR = @ac_ct_AR@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
libext = @libext@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
runstatedir = @runstatedir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
subdirs = @subdirs@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
|
# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable
|
||||||
|
# but distribute it (using the relative file name) in the next variable
|
||||||
|
man_MANS = $(abs_builddir)/curl.1
|
||||||
|
noinst_man_MANS = curl.1 mk-ca-bundle.1
|
||||||
|
dist_man_MANS = curl-config.1
|
||||||
|
GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
|
||||||
|
PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
|
||||||
|
MANDISTPAGES = curl.1.dist curl-config.1.dist
|
||||||
|
HTMLPAGES = $(GENHTMLPAGES) index.html
|
||||||
|
|
||||||
|
# Build targets in this file (.) before cmdline-opts to ensure that
|
||||||
|
# the curl.1 rule below runs first
|
||||||
|
SUBDIRS = . cmdline-opts
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) examples libcurl
|
||||||
|
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(noinst_man_MANS) \
|
||||||
|
ALTSVC.md \
|
||||||
|
BINDINGS.md \
|
||||||
|
BUG-BOUNTY.md \
|
||||||
|
BUGS.md \
|
||||||
|
CHECKSRC.md \
|
||||||
|
CIPHERS.md \
|
||||||
|
CMakeLists.txt \
|
||||||
|
CODE_OF_CONDUCT.md \
|
||||||
|
CODE_REVIEW.md \
|
||||||
|
CODE_STYLE.md \
|
||||||
|
CONTRIBUTE.md \
|
||||||
|
CURL-DISABLE.md \
|
||||||
|
DEPRECATE.md \
|
||||||
|
DYNBUF.md \
|
||||||
|
ECH.md \
|
||||||
|
EXPERIMENTAL.md \
|
||||||
|
FAQ \
|
||||||
|
FEATURES.md \
|
||||||
|
GOVERNANCE.md \
|
||||||
|
HELP-US.md \
|
||||||
|
HISTORY.md \
|
||||||
|
HSTS.md \
|
||||||
|
HTTP-COOKIES.md \
|
||||||
|
HTTP2.md \
|
||||||
|
HTTP3.md \
|
||||||
|
HYPER.md \
|
||||||
|
INSTALL \
|
||||||
|
INSTALL.cmake \
|
||||||
|
INSTALL.md \
|
||||||
|
INTERNALS.md \
|
||||||
|
KNOWN_BUGS \
|
||||||
|
MAIL-ETIQUETTE \
|
||||||
|
MQTT.md \
|
||||||
|
NEW-PROTOCOL.md \
|
||||||
|
options-in-versions \
|
||||||
|
PARALLEL-TRANSFERS.md \
|
||||||
|
README.md \
|
||||||
|
RELEASE-PROCEDURE.md \
|
||||||
|
ROADMAP.md \
|
||||||
|
SECURITY-PROCESS.md \
|
||||||
|
SSL-PROBLEMS.md \
|
||||||
|
SSLCERTS.md \
|
||||||
|
THANKS \
|
||||||
|
TODO \
|
||||||
|
TheArtOfHttpScripting.md \
|
||||||
|
URL-SYNTAX.md \
|
||||||
|
VERSIONS.md
|
||||||
|
|
||||||
|
MAN2HTML = roffit $< >$@
|
||||||
|
SUFFIXES = .1 .html .pdf
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .1 .html .pdf
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign docs/Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-man1: $(dist_man_MANS) $(man_MANS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
@list1=''; \
|
||||||
|
list2='$(dist_man_MANS) $(man_MANS)'; \
|
||||||
|
test -n "$(man1dir)" \
|
||||||
|
&& test -n "`echo $$list1$$list2`" \
|
||||||
|
|| exit 0; \
|
||||||
|
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||||
|
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||||
|
{ for i in $$list1; do echo "$$i"; done; \
|
||||||
|
if test -n "$$list2"; then \
|
||||||
|
for i in $$list2; do echo "$$i"; done \
|
||||||
|
| sed -n '/\.1[a-z]*$$/p'; \
|
||||||
|
fi; \
|
||||||
|
} | while read p; do \
|
||||||
|
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; echo "$$p"; \
|
||||||
|
done | \
|
||||||
|
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||||
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||||
|
sed 'N;N;s,\n, ,g' | { \
|
||||||
|
list=; while read file base inst; do \
|
||||||
|
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||||
|
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||||
|
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
test -z "$$files" || { \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||||
|
done; }
|
||||||
|
|
||||||
|
uninstall-man1:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||||
|
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||||
|
l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||||
|
sed -n '/\.1[a-z]*$$/p'; \
|
||||||
|
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||||
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||||
|
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run 'make' without going through this Makefile.
|
||||||
|
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||||
|
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||||
|
$(am__recursive_targets):
|
||||||
|
@fail=; \
|
||||||
|
if $(am__make_keepgoing); then \
|
||||||
|
failcom='fail=yes'; \
|
||||||
|
else \
|
||||||
|
failcom='exit 1'; \
|
||||||
|
fi; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
ID: $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||||
|
tags: tags-recursive
|
||||||
|
TAGS: tags
|
||||||
|
|
||||||
|
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
ctags: ctags-recursive
|
||||||
|
|
||||||
|
CTAGS: ctags
|
||||||
|
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||||
|
$(am__define_uniq_tagged_files); \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
cscopelist: cscopelist-recursive
|
||||||
|
|
||||||
|
cscopelist-am: $(am__tagged_files)
|
||||||
|
list='$(am__tagged_files)'; \
|
||||||
|
case "$(srcdir)" in \
|
||||||
|
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||||
|
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||||
|
esac; \
|
||||||
|
for i in $$list; do \
|
||||||
|
if test -f "$$i"; then \
|
||||||
|
echo "$(subdir)/$$i"; \
|
||||||
|
else \
|
||||||
|
echo "$$sdir/$$i"; \
|
||||||
|
fi; \
|
||||||
|
done >> $(top_builddir)/cscope.files
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(BUILT_SOURCES)
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
distdir-am: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
$(am__make_dryrun) \
|
||||||
|
|| test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile $(MANS)
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
for dir in "$(DESTDIR)$(man1dir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
if test -z '$(STRIP)'; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
install; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||||
|
fi
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-man
|
||||||
|
|
||||||
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-recursive
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man: install-man1
|
||||||
|
|
||||||
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-man
|
||||||
|
|
||||||
|
uninstall-man: uninstall-man1
|
||||||
|
|
||||||
|
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
|
||||||
|
check-am clean clean-generic clean-libtool cscopelist-am ctags \
|
||||||
|
ctags-am distclean distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-man1 install-pdf install-pdf-am install-ps \
|
||||||
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
|
installdirs installdirs-am maintainer-clean \
|
||||||
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
|
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||||
|
uninstall-am uninstall-man uninstall-man1
|
||||||
|
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
|
||||||
|
|
||||||
|
# $(abs_builddir) is to disable VPATH when searching for this file, which
|
||||||
|
# would otherwise find the copy in $(srcdir) which breaks the $(HUGE)
|
||||||
|
# rule in src/Makefile.am in out-of-tree builds that references the file in the
|
||||||
|
# build directory.
|
||||||
|
#
|
||||||
|
# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree
|
||||||
|
# build), then run make recursively to rebuild it only if its dependencies
|
||||||
|
# have changed.
|
||||||
|
$(abs_builddir)/curl.1:
|
||||||
|
if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \
|
||||||
|
$(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi
|
||||||
|
cd cmdline-opts && $(MAKE)
|
||||||
|
|
||||||
|
html: $(HTMLPAGES)
|
||||||
|
cd libcurl && $(MAKE) html
|
||||||
|
|
||||||
|
pdf: $(PDFPAGES)
|
||||||
|
cd libcurl && $(MAKE) pdf
|
||||||
|
|
||||||
|
.1.html:
|
||||||
|
$(MAN2HTML)
|
||||||
|
|
||||||
|
.1.pdf:
|
||||||
|
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||||
|
groff -Tps -man $< >$$foo.ps; \
|
||||||
|
ps2pdf $$foo.ps $@; \
|
||||||
|
rm $$foo.ps; \
|
||||||
|
echo "converted $< to $@")
|
||||||
|
|
||||||
|
distclean:
|
||||||
|
rm -f $(CLEANFILES)
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
# Adding a new protocol?
|
||||||
|
|
||||||
|
Every once in a while someone comes up with the idea of adding support for yet
|
||||||
|
another protocol to curl. After all, curl already supports 25 something
|
||||||
|
protocols and it is the Internet transfer machine for the world.
|
||||||
|
|
||||||
|
In the curl project we love protocols and we love supporting many protocols
|
||||||
|
and do it well.
|
||||||
|
|
||||||
|
So how do you proceed to add a new protocol and what are the requirements?
|
||||||
|
|
||||||
|
## No fixed set of requirements
|
||||||
|
|
||||||
|
This document is an attempt to describe things to consider. There is no
|
||||||
|
checklist of the twenty-seven things you need to cross off. We view the entire
|
||||||
|
effort as a whole and then judge if it seems to be the right thing - for
|
||||||
|
now. The more things that look right, fit our patterns and are done in ways
|
||||||
|
that align with our thinking, the better are the chances that we will agree
|
||||||
|
that supporting this protocol is a grand idea.
|
||||||
|
|
||||||
|
## Mutual benefit is preferred
|
||||||
|
|
||||||
|
curl is not here for your protocol. Your protocol is not here for curl. The
|
||||||
|
best cooperation and end result occur when all involved parties mutually see
|
||||||
|
and agree that supporting this protocol in curl would be good for everyone.
|
||||||
|
Heck, for the world!
|
||||||
|
|
||||||
|
Consider "selling us" the idea that we need an implementation merged in curl,
|
||||||
|
to be fairly important. *Why* do we want curl to support this new protocol?
|
||||||
|
|
||||||
|
## Protocol requirements
|
||||||
|
|
||||||
|
### Client-side
|
||||||
|
|
||||||
|
The protocol implementation is for a client's side of a "communication
|
||||||
|
session".
|
||||||
|
|
||||||
|
### Transfer oriented
|
||||||
|
|
||||||
|
The protocol itself should be focused on *transfers*. Be it uploads or
|
||||||
|
downloads or both. It should at least be possible to view the transfers as
|
||||||
|
such, like we can view reading emails over POP3 as a download and sending
|
||||||
|
emails over SMTP as an upload.
|
||||||
|
|
||||||
|
If you cannot even shoehorn the protocol into a transfer focused view, then
|
||||||
|
you are up for a tough argument.
|
||||||
|
|
||||||
|
### URL
|
||||||
|
|
||||||
|
There should be a documented URL format. If there is an RFC for it there is no
|
||||||
|
question about it but the syntax doesn't have to be a published RFC. It could
|
||||||
|
be enough if it is already in use by other implementations.
|
||||||
|
|
||||||
|
If you make up the syntax just in order to be able to propose it to curl, then
|
||||||
|
you are in a bad place. URLs are designed and defined for interoperability.
|
||||||
|
There should at least be a good chance that other clients and servers can be
|
||||||
|
implemented supporting the same URL syntax and work the same or similar way.
|
||||||
|
|
||||||
|
URLs work on registered 'schemes'. There is a register of [all officially
|
||||||
|
recognized
|
||||||
|
schemes](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml). If
|
||||||
|
your protocol is not in there, is it really a protocol we want?
|
||||||
|
|
||||||
|
### Wide and public use
|
||||||
|
|
||||||
|
The protocol shall already be used or have an expectation of getting used
|
||||||
|
widely. Experimental protocols are better off worked on in experiments first,
|
||||||
|
to prove themselves before they are adopted by curl.
|
||||||
|
|
||||||
|
## Code
|
||||||
|
|
||||||
|
Of course the code needs to be written, provided, licensed agreeably and it
|
||||||
|
should follow our code guidelines and review comments have to be dealt with.
|
||||||
|
If the implementation needs third party code, that third party code should not
|
||||||
|
have noticeably lesser standards than the curl project itself.
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
As much of the protocol implementation as possible needs to be verified by
|
||||||
|
curl test cases. We must have the implementation get tested by CI jobs,
|
||||||
|
torture tests and more.
|
||||||
|
|
||||||
|
We've experienced many times in the past how new implementations were brought
|
||||||
|
to curl and immediately once the code had been merged, the originator vanished
|
||||||
|
from the face of the earth. That is fine, but we need to take the necessary
|
||||||
|
precautions so when it happens we are still fine.
|
||||||
|
|
||||||
|
Our test infrastructure is powerful enough to test just about every possible
|
||||||
|
protocol - but it might require a bit of an effort to make it happen.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
We cannot assume that users are particularly familiar with specific details
|
||||||
|
and peculiarities of the protocol. It needs documentation.
|
||||||
|
|
||||||
|
Maybe it even needs some internal documentation so that the developers who
|
||||||
|
will try to debug something five years from now can figure out functionality a
|
||||||
|
little easier!
|
||||||
|
|
||||||
|
The protocol specification itself should be freely available without requiring
|
||||||
|
any NDA or similar.
|
||||||
|
|
||||||
|
## Don't compare
|
||||||
|
|
||||||
|
We are constantly raising the bar and we are constantly improving the
|
||||||
|
project. A lot of things we did in the past would not be acceptable if done
|
||||||
|
today. Therefore, you might be tempted to use shortcuts or "hacks" you can
|
||||||
|
spot other - existing - protocol implementations have used, but there is
|
||||||
|
nothing to gain from that. The bar has been raised. Former "cheats" won't be
|
||||||
|
tolerated anymore.
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
# Parallel transfers
|
||||||
|
|
||||||
|
curl 7.66.0 introduces support for doing multiple transfers simultaneously; in
|
||||||
|
parallel.
|
||||||
|
|
||||||
|
## -Z, --parallel
|
||||||
|
|
||||||
|
When this command line option is used, curl will perform the transfers given
|
||||||
|
to it at the same time. It will do up to `--parallel-max` concurrent
|
||||||
|
transfers, with a default value of 50.
|
||||||
|
|
||||||
|
## Progress meter
|
||||||
|
|
||||||
|
The progress meter that is displayed when doing parallel transfers is
|
||||||
|
completely different than the regular one used for each single transfer.
|
||||||
|
|
||||||
|
It shows:
|
||||||
|
|
||||||
|
o percent download (if known, which means *all* transfers need to have a
|
||||||
|
known size)
|
||||||
|
o percent upload (if known, with the same caveat as for download)
|
||||||
|
o total amount of downloaded data
|
||||||
|
o total amount of uploaded data
|
||||||
|
o number of transfers to perform
|
||||||
|
o number of concurrent transfers being transferred right now
|
||||||
|
o number of transfers queued up waiting to start
|
||||||
|
o total time all transfers are expected to take (if sizes are known)
|
||||||
|
o current time the transfers have spent so far
|
||||||
|
o estimated time left (if sizes are known)
|
||||||
|
o current transfer speed (the faster of UL/DL speeds measured over the last
|
||||||
|
few seconds)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
DL% UL% Dled Uled Xfers Live Qd Total Current Left Speed
|
||||||
|
72 -- 37.9G 0 101 30 23 0:00:55 0:00:34 0:00:22 2752M
|
||||||
|
|
||||||
|
## Behavior differences
|
||||||
|
|
||||||
|
Connections are shared fine between different easy handles, but the
|
||||||
|
"authentication contexts" are not. So for example doing HTTP Digest auth with
|
||||||
|
one handle for a particular transfer and then continue on with another handle
|
||||||
|
that reuses the same connection, the second handle can't send the necessary
|
||||||
|
Authorization header at once since the context is only kept in the original
|
||||||
|
easy handle.
|
||||||
|
|
||||||
|
To fix this, the authorization state could be made possible to share with the
|
||||||
|
share API as well, as a context per origin + path (realm?) basically.
|
||||||
|
|
||||||
|
Visible in test 153, 1412 and more.
|
||||||
|
|
||||||
|
## Feedback!
|
||||||
|
|
||||||
|
This is early days for parallel transfer support. Keep your eyes open for
|
||||||
|
unintended side effects or downright bugs.
|
||||||
|
|
||||||
|
Tell us what you think and how you think we could improve this feature!
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
|
You'll find a mix of various documentation in this directory and
|
||||||
|
subdirectories, using several different formats. Some of them are not ideal
|
||||||
|
for reading directly in your browser.
|
||||||
|
|
||||||
|
If you'd rather see the rendered version of the documentation, check out the
|
||||||
|
curl website's [documentation section](https://curl.se/docs/) for
|
||||||
|
general curl stuff or the [libcurl section](https://curl.se/libcurl/) for
|
||||||
|
libcurl related documentation.
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
curl release procedure - how to do a release
|
||||||
|
============================================
|
||||||
|
|
||||||
|
in the source code repo
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
- run `./scripts/copyright.pl` and correct possible omissions
|
||||||
|
|
||||||
|
- edit `RELEASE-NOTES` to be accurate
|
||||||
|
|
||||||
|
- update `docs/THANKS`
|
||||||
|
|
||||||
|
- make sure all relevant changes are committed on the master branch
|
||||||
|
|
||||||
|
- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the
|
||||||
|
tag and we use underscores instead of dots in the version number. Make sure
|
||||||
|
the tag is GPG signed (using -s).
|
||||||
|
|
||||||
|
- run "./maketgz 7.34.0" to build the release tarballs. It is important that
|
||||||
|
you run this on a machine with the correct set of autotools etc installed
|
||||||
|
as this is what then will be shipped and used by most users on \*nix like
|
||||||
|
systems.
|
||||||
|
|
||||||
|
- push the git commits and the new tag
|
||||||
|
|
||||||
|
- gpg sign the 4 tarballs as maketgz suggests
|
||||||
|
|
||||||
|
- upload the 8 resulting files to the primary download directory
|
||||||
|
|
||||||
|
in the curl-www repo
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- edit `Makefile` (version number and date),
|
||||||
|
|
||||||
|
- edit `_newslog.html` (announce the new release) and
|
||||||
|
|
||||||
|
- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES)
|
||||||
|
|
||||||
|
- commit all local changes
|
||||||
|
|
||||||
|
- tag the repo with the same name as used for the source repo.
|
||||||
|
|
||||||
|
- make sure all relevant changes are committed and pushed on the master branch
|
||||||
|
|
||||||
|
(the website then updates its contents automatically)
|
||||||
|
|
||||||
|
on github
|
||||||
|
---------
|
||||||
|
|
||||||
|
- edit the newly made release tag so that it is listed as the latest release
|
||||||
|
|
||||||
|
inform
|
||||||
|
------
|
||||||
|
|
||||||
|
- send an email to curl-users, curl-announce and curl-library. Insert the
|
||||||
|
RELEASE-NOTES into the mail.
|
||||||
|
|
||||||
|
celebrate
|
||||||
|
---------
|
||||||
|
|
||||||
|
- suitable beverage intake is encouraged for the festivities
|
||||||
|
|
||||||
|
curl release scheduling
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Release Cycle
|
||||||
|
-------------
|
||||||
|
|
||||||
|
We do releases every 8 weeks on Wednesdays. If critical problems arise, we can
|
||||||
|
insert releases outside of the schedule or we can move the release date - but
|
||||||
|
this is rare.
|
||||||
|
|
||||||
|
Each 8 week release cycle is split in two 4-week periods.
|
||||||
|
|
||||||
|
- During the first 4 weeks after a release, we allow new features and changes
|
||||||
|
to curl and libcurl. If we accept any such changes, we bump the minor number
|
||||||
|
used for the next release.
|
||||||
|
|
||||||
|
- During the second 4-week period we do not merge any features or changes, we
|
||||||
|
then only focus on fixing bugs and polishing things to make a solid coming
|
||||||
|
release.
|
||||||
|
|
||||||
|
- After a regular procedure-following release (made on Wednesdays), the
|
||||||
|
feature window remains closed until the following Monday in case of special
|
||||||
|
actions or patch releases etc.
|
||||||
|
|
||||||
|
If a future release date happens to end up on a "bad date", like in the middle
|
||||||
|
of common public holidays or when the lead release manager is away traveling,
|
||||||
|
the release date can be moved forwards or backwards a full week. This is then
|
||||||
|
advertised well in advance.
|
||||||
|
|
||||||
|
Coming dates
|
||||||
|
------------
|
||||||
|
|
||||||
|
Based on the description above, here are some planned release dates (at the
|
||||||
|
time of this writing):
|
||||||
|
|
||||||
|
- August 19, 2020 (7.72.0)
|
||||||
|
- October 14, 2020
|
||||||
|
- December 9, 2020
|
||||||
|
- February 3, 2021
|
||||||
|
- March 31, 2021
|
||||||
|
- May 26, 2021
|
||||||
|
- July 21, 2021
|
||||||
|
- September 15, 2021
|
||||||
|
- November 10, 2021
|
||||||
|
|
||||||
|
The above (and more) curl-related dates are published in
|
||||||
|
[iCalendar format](https://calendar.google.com/calendar/ical/c9u5d64odop9js55oltfarjk6g%40group.calendar.google.com/public/basic.ics)
|
||||||
|
as well.
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# curl the next few years - perhaps
|
||||||
|
|
||||||
|
Roadmap of things Daniel Stenberg wants to work on next. It is intended to
|
||||||
|
serve as a guideline for others for information, feedback and possible
|
||||||
|
participation.
|
||||||
|
|
||||||
|
## "Complete" the HTTP/3 support
|
||||||
|
|
||||||
|
curl has experimental support for HTTP/3 since a good while back. There are
|
||||||
|
some functionality missing and once the final specs are published we want to
|
||||||
|
eventually remove the "experimental" label from this functionality.
|
||||||
|
|
||||||
|
## HTTPS DNS records
|
||||||
|
|
||||||
|
As a DNS version of alt-svc and also a pre-requisite for ECH (see below).
|
||||||
|
|
||||||
|
See: https://tools.ietf.org/html/draft-ietf-dnsop-svcb-https-02
|
||||||
|
|
||||||
|
## ECH (Encrypted Client Hello - formerly known as ESNI)
|
||||||
|
|
||||||
|
See Daniel's post on [Support of Encrypted
|
||||||
|
SNI](https://curl.se/mail/lib-2019-03/0000.html) on the mailing list.
|
||||||
|
|
||||||
|
Initial work exists in https://github.com/curl/curl/pull/4011
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
curl security process
|
||||||
|
=====================
|
||||||
|
|
||||||
|
This document describes how security vulnerabilities should be handled in the
|
||||||
|
curl project.
|
||||||
|
|
||||||
|
Publishing Information
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
All known and public curl or libcurl related vulnerabilities are listed on
|
||||||
|
[the curl website security page](https://curl.se/docs/security.html).
|
||||||
|
|
||||||
|
Security vulnerabilities **should not** be entered in the project's public bug
|
||||||
|
tracker.
|
||||||
|
|
||||||
|
Vulnerability Handling
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The typical process for handling a new security vulnerability is as follows.
|
||||||
|
|
||||||
|
No information should be made public about a vulnerability until it is
|
||||||
|
formally announced at the end of this process. That means, for example that a
|
||||||
|
bug tracker entry must NOT be created to track the issue since that will make
|
||||||
|
the issue public and it should not be discussed on any of the project's public
|
||||||
|
mailing lists. Also messages associated with any commits should not make any
|
||||||
|
reference to the security nature of the commit if done prior to the public
|
||||||
|
announcement.
|
||||||
|
|
||||||
|
- The person discovering the issue, the reporter, reports the vulnerability on
|
||||||
|
[https://hackerone.com/curl](https://hackerone.com/curl). Issues filed there
|
||||||
|
reach a handful of selected and trusted people.
|
||||||
|
|
||||||
|
- Messages that do not relate to the reporting or managing of an undisclosed
|
||||||
|
security vulnerability in curl or libcurl are ignored and no further action
|
||||||
|
is required.
|
||||||
|
|
||||||
|
- A person in the security team responds to the original report to acknowledge
|
||||||
|
that a human has seen the report.
|
||||||
|
|
||||||
|
- The security team investigates the report and either rejects it or accepts
|
||||||
|
it.
|
||||||
|
|
||||||
|
- If the report is rejected, the team writes to the reporter to explain why.
|
||||||
|
|
||||||
|
- If the report is accepted, the team writes to the reporter to let him/her
|
||||||
|
know it is accepted and that they are working on a fix.
|
||||||
|
|
||||||
|
- The security team discusses the problem, works out a fix, considers the
|
||||||
|
impact of the problem and suggests a release schedule. This discussion
|
||||||
|
should involve the reporter as much as possible.
|
||||||
|
|
||||||
|
- The release of the information should be "as soon as possible" and is most
|
||||||
|
often synchronized with an upcoming release that contains the fix. If the
|
||||||
|
reporter, or anyone else involved, thinks the next planned release is too
|
||||||
|
far away, then a separate earlier release should be considered.
|
||||||
|
|
||||||
|
- Write a security advisory draft about the problem that explains what the
|
||||||
|
problem is, its impact, which versions it affects, solutions or workarounds,
|
||||||
|
when the release is out and make sure to credit all contributors properly.
|
||||||
|
Figure out the CWE (Common Weakness Enumeration) number for the flaw.
|
||||||
|
|
||||||
|
- Request a CVE number from
|
||||||
|
[HackerOne](https://docs.hackerone.com/programs/cve-requests.html)
|
||||||
|
|
||||||
|
- Consider informing
|
||||||
|
[distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros)
|
||||||
|
to prepare them about the upcoming public security vulnerability
|
||||||
|
announcement - attach the advisory draft for information. Note that
|
||||||
|
'distros' won't accept an embargo longer than 14 days and they do not care
|
||||||
|
for Windows-specific flaws.
|
||||||
|
|
||||||
|
- Update the "security advisory" with the CVE number.
|
||||||
|
|
||||||
|
- The security team commits the fix in a private branch. The commit message
|
||||||
|
should ideally contain the CVE number. This fix is usually also distributed
|
||||||
|
to the 'distros' mailing list to allow them to use the fix prior to the
|
||||||
|
public announcement.
|
||||||
|
|
||||||
|
- No more than 48 hours before the release, the private branch is merged into
|
||||||
|
the master branch and pushed. Once pushed, the information is accessible to
|
||||||
|
the public and the actual release should follow suit immediately afterwards.
|
||||||
|
The time between the push and the release is used for final tests and
|
||||||
|
reviews.
|
||||||
|
|
||||||
|
- The project team creates a release that includes the fix.
|
||||||
|
|
||||||
|
- The project team announces the release and the vulnerability to the world in
|
||||||
|
the same manner we always announce releases. It gets sent to the
|
||||||
|
curl-announce, curl-library and curl-users mailing lists.
|
||||||
|
|
||||||
|
- The security web page on the website should get the new vulnerability
|
||||||
|
mentioned.
|
||||||
|
|
||||||
|
curl-security (at haxx dot se)
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This is a private mailing list for discussions on and about curl security
|
||||||
|
issues.
|
||||||
|
|
||||||
|
Who is on this list? There are a couple of criteria you must meet, and then we
|
||||||
|
might ask you to join the list or you can ask to join it. It really isn't very
|
||||||
|
formal. We basically only require that you have a long-term presence in the
|
||||||
|
curl project and you have shown an understanding for the project and its way
|
||||||
|
of working. You must've been around for a good while and you should have no
|
||||||
|
plans in vanishing in the near future.
|
||||||
|
|
||||||
|
We do not make the list of participants public mostly because it tends to vary
|
||||||
|
somewhat over time and a list somewhere will only risk getting outdated.
|
||||||
|
|
||||||
|
Publishing Security Advisories
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
1. Write up the security advisory, using markdown syntax. Use the same
|
||||||
|
subtitles as last time to maintain consistency.
|
||||||
|
|
||||||
|
2. Name the advisory file after the allocated CVE id.
|
||||||
|
|
||||||
|
3. Add a line on the top of the array in `curl-www/docs/vuln.pm'.
|
||||||
|
|
||||||
|
4. Put the new advisory markdown file in the curl-www/docs/ directory. Add it
|
||||||
|
to the git repo.
|
||||||
|
|
||||||
|
5. Run `make` in your local web checkout and verify that things look fine.
|
||||||
|
|
||||||
|
6. On security advisory release day, push the changes on the curl-www
|
||||||
|
repository's remote master branch.
|
||||||
|
|
||||||
|
Hackerone
|
||||||
|
---------
|
||||||
|
|
||||||
|
Request the issue to be disclosed. If there are sensitive details present in
|
||||||
|
the report and discussion, those should be redacted from the disclosure. The
|
||||||
|
default policy is to disclose as much as possible as soon as the vulnerability
|
||||||
|
has been published.
|
||||||
|
|
||||||
|
Bug Bounty
|
||||||
|
----------
|
||||||
|
|
||||||
|
See [BUG-BOUNTY](https://curl.se/docs/bugbounty.html) for details on the
|
||||||
|
bug bounty program.
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
# SSL problems
|
||||||
|
|
||||||
|
First, let's establish that we often refer to TLS and SSL interchangeably as
|
||||||
|
SSL here. The current protocol is called TLS, it was called SSL a long time
|
||||||
|
ago.
|
||||||
|
|
||||||
|
There are several known reasons why a connection that involves SSL might
|
||||||
|
fail. This is a document that attempts to details the most common ones and
|
||||||
|
how to mitigate them.
|
||||||
|
|
||||||
|
## CA certs
|
||||||
|
|
||||||
|
CA certs are used to digitally verify the server's certificate. You need a
|
||||||
|
"ca bundle" for this. See lots of more details on this in the SSLCERTS
|
||||||
|
document.
|
||||||
|
|
||||||
|
## CA bundle missing intermediate certificates
|
||||||
|
|
||||||
|
When using said CA bundle to verify a server cert, you will experience
|
||||||
|
problems if your CA cert does not have the certificates for the
|
||||||
|
intermediates in the whole trust chain.
|
||||||
|
|
||||||
|
## Protocol version
|
||||||
|
|
||||||
|
Some broken servers fail to support the protocol negotiation properly that
|
||||||
|
SSL servers are supposed to handle. This may cause the connection to fail
|
||||||
|
completely. Sometimes you may need to explicitly select a SSL version to use
|
||||||
|
when connecting to make the connection succeed.
|
||||||
|
|
||||||
|
An additional complication can be that modern SSL libraries sometimes are
|
||||||
|
built with support for older SSL and TLS versions disabled!
|
||||||
|
|
||||||
|
All versions of SSL are considered insecure and should be avoided. Use TLS.
|
||||||
|
|
||||||
|
## Ciphers
|
||||||
|
|
||||||
|
Clients give servers a list of ciphers to select from. If the list doesn't
|
||||||
|
include any ciphers the server wants/can use, the connection handshake
|
||||||
|
fails.
|
||||||
|
|
||||||
|
curl has recently disabled the user of a whole bunch of seriously insecure
|
||||||
|
ciphers from its default set (slightly depending on SSL backend in use).
|
||||||
|
|
||||||
|
You may have to explicitly provide an alternative list of ciphers for curl
|
||||||
|
to use to allow the server to use a WEAK cipher for you.
|
||||||
|
|
||||||
|
Note that these weak ciphers are identified as flawed. For example, this
|
||||||
|
includes symmetric ciphers with less than 128 bit keys and RC4.
|
||||||
|
|
||||||
|
Schannel in Windows XP is not able to connect to servers that no longer
|
||||||
|
support the legacy handshakes and algorithms used by those versions, so we
|
||||||
|
advice against building curl to use Schannel on really old Windows versions.
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
|
||||||
|
|
||||||
|
## Allow BEAST
|
||||||
|
|
||||||
|
BEAST is the name of a TLS 1.0 attack that surfaced 2011. When adding means
|
||||||
|
to mitigate this attack, it turned out that some broken servers out there in
|
||||||
|
the wild didn't work properly with the BEAST mitigation in place.
|
||||||
|
|
||||||
|
To make such broken servers work, the --ssl-allow-beast option was
|
||||||
|
introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability
|
||||||
|
but on the other hand it allows curl to connect to that kind of strange
|
||||||
|
servers.
|
||||||
|
|
||||||
|
## Disabling certificate revocation checks
|
||||||
|
|
||||||
|
Some SSL backends may do certificate revocation checks (CRL, OCSP, etc)
|
||||||
|
depending on the OS or build configuration. The --ssl-no-revoke option was
|
||||||
|
introduced in 7.44.0 to disable revocation checking but currently is only
|
||||||
|
supported for Schannel (the native Windows SSL library), with an exception
|
||||||
|
in the case of Windows' Untrusted Publishers block list which it seems can't
|
||||||
|
be bypassed. This option may have broader support to accommodate other SSL
|
||||||
|
backends in the future.
|
||||||
|
|
||||||
|
References:
|
||||||
|
|
||||||
|
https://curl.se/docs/ssl-compared.html
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
SSL Certificate Verification
|
||||||
|
============================
|
||||||
|
|
||||||
|
SSL is TLS
|
||||||
|
----------
|
||||||
|
|
||||||
|
SSL is the old name. It is called TLS these days.
|
||||||
|
|
||||||
|
|
||||||
|
Native SSL
|
||||||
|
----------
|
||||||
|
|
||||||
|
If libcurl was built with Schannel or Secure Transport support (the native SSL
|
||||||
|
libraries included in Windows and Mac OS X), then this does not apply to
|
||||||
|
you. Scroll down for details on how the OS-native engines handle SSL
|
||||||
|
certificates. If you're not sure, then run "curl -V" and read the results. If
|
||||||
|
the version string says `Schannel` in it, then it was built with Schannel
|
||||||
|
support.
|
||||||
|
|
||||||
|
It is about trust
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
This system is about trust. In your local CA certificate store you have certs
|
||||||
|
from *trusted* Certificate Authorities that you then can use to verify that the
|
||||||
|
server certificates you see are valid. They're signed by one of the CAs you
|
||||||
|
trust.
|
||||||
|
|
||||||
|
Which CAs do you trust? You can decide to trust the same set of companies your
|
||||||
|
operating system trusts, or the set one of the known browsers trust. That's
|
||||||
|
basically trust via someone else you trust. You should just be aware that
|
||||||
|
modern operating systems and browsers are setup to trust *hundreds* of
|
||||||
|
companies and recent years several such CAs have been found untrustworthy.
|
||||||
|
|
||||||
|
Certificate Verification
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
libcurl performs peer SSL certificate verification by default. This is done
|
||||||
|
by using a CA certificate store that the SSL library can use to make sure the
|
||||||
|
peer's server certificate is valid.
|
||||||
|
|
||||||
|
If you communicate with HTTPS, FTPS or other TLS-using servers using
|
||||||
|
certificates that are signed by CAs present in the store, you can be sure
|
||||||
|
that the remote server really is the one it claims to be.
|
||||||
|
|
||||||
|
If the remote server uses a self-signed certificate, if you don't install a CA
|
||||||
|
cert store, if the server uses a certificate signed by a CA that isn't
|
||||||
|
included in the store you use or if the remote host is an impostor
|
||||||
|
impersonating your favorite site, and you want to transfer files from this
|
||||||
|
server, do one of the following:
|
||||||
|
|
||||||
|
1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
|
||||||
|
`curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);`
|
||||||
|
|
||||||
|
With the curl command line tool, you disable this with -k/--insecure.
|
||||||
|
|
||||||
|
2. Get a CA certificate that can verify the remote server and use the proper
|
||||||
|
option to point out this CA cert for verification when connecting. For
|
||||||
|
libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAINFO, cacert);`
|
||||||
|
|
||||||
|
With the curl command line tool: --cacert [file]
|
||||||
|
|
||||||
|
3. Add the CA cert for your server to the existing default CA certificate
|
||||||
|
store. The default CA certificate store can be changed at compile time with
|
||||||
|
the following configure options:
|
||||||
|
|
||||||
|
--with-ca-bundle=FILE: use the specified file as CA certificate store. CA
|
||||||
|
certificates need to be concatenated in PEM format into this file.
|
||||||
|
|
||||||
|
--with-ca-path=PATH: use the specified path as CA certificate store. CA
|
||||||
|
certificates need to be stored as individual PEM files in this directory.
|
||||||
|
You may need to run c_rehash after adding files there.
|
||||||
|
|
||||||
|
If neither of the two options is specified, configure will try to auto-detect
|
||||||
|
a setting. It's also possible to explicitly not hardcode any default store
|
||||||
|
but rely on the built in default the crypto library may provide instead.
|
||||||
|
You can achieve that by passing both --without-ca-bundle and
|
||||||
|
--without-ca-path to the configure script.
|
||||||
|
|
||||||
|
If you use Internet Explorer, this is one way to get extract the CA cert
|
||||||
|
for a particular server:
|
||||||
|
|
||||||
|
- View the certificate by double-clicking the padlock
|
||||||
|
- Find out where the CA certificate is kept (Certificate>
|
||||||
|
Authority Information Access>URL)
|
||||||
|
- Get a copy of the crt file using curl
|
||||||
|
- Convert it from crt to PEM using the openssl tool:
|
||||||
|
openssl x509 -inform DES -in yourdownloaded.crt \
|
||||||
|
-out outcert.pem -text
|
||||||
|
- Add the 'outcert.pem' to the CA certificate store or use it stand-alone
|
||||||
|
as described below.
|
||||||
|
|
||||||
|
If you use the 'openssl' tool, this is one way to get extract the CA cert
|
||||||
|
for a particular server:
|
||||||
|
|
||||||
|
- `openssl s_client -showcerts -servername server -connect server:443 > cacert.pem`
|
||||||
|
- type "quit", followed by the "ENTER" key
|
||||||
|
- The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
|
||||||
|
markers.
|
||||||
|
- If you want to see the data in the certificate, you can do: "openssl
|
||||||
|
x509 -inform PEM -in certfile -text -out certdata" where certfile is
|
||||||
|
the cert you extracted from logfile. Look in certdata.
|
||||||
|
- If you want to trust the certificate, you can add it to your CA
|
||||||
|
certificate store or use it stand-alone as described. Just remember that
|
||||||
|
the security is no better than the way you obtained the certificate.
|
||||||
|
|
||||||
|
4. If you're using the curl command line tool, you can specify your own CA
|
||||||
|
cert file by setting the environment variable `CURL_CA_BUNDLE` to the path
|
||||||
|
of your choice.
|
||||||
|
|
||||||
|
If you're using the curl command line tool on Windows, curl will search
|
||||||
|
for a CA cert file named "curl-ca-bundle.crt" in these directories and in
|
||||||
|
this order:
|
||||||
|
1. application's directory
|
||||||
|
2. current working directory
|
||||||
|
3. Windows System directory (e.g. C:\windows\system32)
|
||||||
|
4. Windows Directory (e.g. C:\windows)
|
||||||
|
5. all directories along %PATH%
|
||||||
|
|
||||||
|
5. Get a better/different/newer CA cert bundle! One option is to extract the
|
||||||
|
one a recent Firefox browser uses by running 'make ca-bundle' in the curl
|
||||||
|
build tree root, or possibly download a version that was generated this
|
||||||
|
way for you: [CA Extract](https://curl.se/docs/caextract.html)
|
||||||
|
|
||||||
|
Neglecting to use one of the above methods when dealing with a server using a
|
||||||
|
certificate that isn't signed by one of the certificates in the installed CA
|
||||||
|
certificate store, will cause SSL to report an error ("certificate verify
|
||||||
|
failed") during the handshake and SSL will then refuse further communication
|
||||||
|
with that server.
|
||||||
|
|
||||||
|
Certificate Verification with NSS
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
If libcurl was built with NSS support, then depending on the OS distribution,
|
||||||
|
it is probably required to take some additional steps to use the system-wide
|
||||||
|
CA cert db. RedHat ships with an additional module, libnsspem.so, which
|
||||||
|
enables NSS to read the OpenSSL PEM CA bundle. On openSUSE you can install
|
||||||
|
p11-kit-nss-trust which makes NSS use the system wide CA certificate store. NSS
|
||||||
|
also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB).
|
||||||
|
|
||||||
|
Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to
|
||||||
|
the certdb directory (either the hardcoded default /etc/pki/nssdb or the
|
||||||
|
directory configured with SSL_DIR environment variable). To check which certdb
|
||||||
|
format your distribution provides, examine the default certdb location:
|
||||||
|
/etc/pki/nssdb; the new certdb format can be identified by the filenames
|
||||||
|
cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db,
|
||||||
|
key3.db, secmod.db.
|
||||||
|
|
||||||
|
Certificate Verification with Schannel and Secure Transport
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure
|
||||||
|
Transport (Apple's native TLS engine) support, then libcurl will still perform
|
||||||
|
peer certificate verification, but instead of using a CA cert bundle, it will
|
||||||
|
use the certificates that are built into the OS. These are the same
|
||||||
|
certificates that appear in the Internet Options control panel (under Windows)
|
||||||
|
or Keychain Access application (under OS X). Any custom security rules for
|
||||||
|
certificates will be honored.
|
||||||
|
|
||||||
|
Schannel will run CRL checks on certificates unless peer verification is
|
||||||
|
disabled. Secure Transport on iOS will run OCSP checks on certificates unless
|
||||||
|
peer verification is disabled. Secure Transport on OS X will run either OCSP
|
||||||
|
or CRL checks on certificates if those features are enabled, and this behavior
|
||||||
|
can be adjusted in the preferences of Keychain Access.
|
||||||
|
|
||||||
|
HTTPS proxy
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Since version 7.52.0, curl can do HTTPS to the proxy separately from the
|
||||||
|
connection to the server. This TLS connection is handled separately from the
|
||||||
|
server connection so instead of `--insecure` and `--cacert` to control the
|
||||||
|
certificate verification, you use `--proxy-insecure` and `--proxy-cacert`.
|
||||||
|
With these options, you make sure that the TLS connection and the trust of the
|
||||||
|
proxy can be kept totally separate from the TLS connection to the server.
|
||||||
+2328
File diff suppressed because it is too large
Load Diff
+1298
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user