Skip to content

Commit

Permalink
Update to vanilla curl 8.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Mar 27, 2024
1 parent b3a1247 commit f581a9e
Show file tree
Hide file tree
Showing 1,210 changed files with 53,631 additions and 23,510 deletions.
9,877 changes: 5 additions & 9,872 deletions CHANGES

Large diffs are not rendered by default.

29 changes: 0 additions & 29 deletions CMake/Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,6 @@ macro(curl_internal_test CURL_TEST)
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)
Expand Down
2 changes: 1 addition & 1 deletion CMake/Utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
###########################################################################
# File containing various utilities

# Returns a list of arguments that evaluate to true
# Returns number of arguments that evaluate to true
function(count_true output_count_var)
set(lst_len 0)
foreach(option_var IN LISTS ARGN)
Expand Down
78 changes: 66 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,14 @@ endif()
find_package(Perl)

option(BUILD_LIBCURL_DOCS "to build libcurl man pages" ON)
# curl source release tarballs come with the curl man page pre-built.
option(ENABLE_CURL_MANUAL "to build the man page for curl and enable its -M/--manual option" OFF)
option(ENABLE_CURL_MANUAL "to build the man page for curl and enable its -M/--manual option" ON)

if(ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS)
if(PERL_FOUND)
curl_nroff_check()
if(NROFF_USEFUL)
set(HAVE_MANUAL_TOOLS ON)
endif()
set(HAVE_MANUAL_TOOLS ON)
endif()
if(NOT HAVE_MANUAL_TOOLS)
message(WARNING "Perl not found, or nroff not useful. Will not build manuals.")
message(WARNING "Perl not found. Will not build manuals.")
endif()
endif()

Expand Down Expand Up @@ -396,8 +392,7 @@ if(APPLE)
endif()
if(WIN32)
cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without OpenSSL" ON
CURL_USE_SCHANNEL OFF)
option(CURL_WINDOWS_SSPI "Enable SSPI on Windows" ${CURL_USE_SCHANNEL})
endif()
cmake_dependent_option(CURL_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
cmake_dependent_option(CURL_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
Expand Down Expand Up @@ -720,7 +715,26 @@ if(USE_MSH3)
list(APPEND CURL_LIBS ${MSH3_LIBRARIES})
endif()

if(CURL_WITH_MULTI_SSL AND (USE_NGTCP2 OR USE_QUICHE OR USE_MSH3))
option(USE_OPENSSL_QUIC "Use openssl and nghttp3 libraries for HTTP/3 support" OFF)
if(USE_OPENSSL_QUIC)
if(USE_NGTCP2 OR USE_QUICHE OR USE_MSH3)
message(FATAL_ERROR "Only one HTTP/3 backend can be selected!")
endif()
find_package(OpenSSL 3.2.0 REQUIRED)

find_package(NGHTTP3 REQUIRED)
set(USE_NGHTTP3 ON)
include_directories(${NGHTTP3_INCLUDE_DIRS})
list(APPEND CURL_LIBS ${NGHTTP3_LIBRARIES})
endif()

if(USE_MBEDTLS OR
USE_BEARSSL OR
USE_SECTRANSP)
message(WARNING "A selected TLS library does not support TLS 1.3.")
endif()

if(CURL_WITH_MULTI_SSL AND (USE_NGTCP2 OR USE_QUICHE OR USE_MSH3 OR USE_OPENSSL_QUIC))
message(FATAL_ERROR "MultiSSL cannot be enabled with HTTP/3 and vice versa.")
endif()

Expand Down Expand Up @@ -1542,7 +1556,7 @@ if(NOT CURL_DISABLE_INSTALL)
NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
_add_if("TLS-SRP" USE_TLS_SRP)
_add_if("HTTP2" USE_NGHTTP2)
_add_if("HTTP3" USE_NGTCP2 OR USE_QUICHE)
_add_if("HTTP3" USE_NGTCP2 OR USE_QUICHE OR USE_OPENSSL_QUIC)
_add_if("MultiSSL" CURL_WITH_MULTI_SSL)
# TODO wolfSSL only support this from v5.0.0 onwards
_add_if("HTTPS-proxy" SSL_ENABLED AND (USE_OPENSSL OR USE_GNUTLS
Expand Down Expand Up @@ -1627,6 +1641,30 @@ if(NOT CURL_DISABLE_INSTALL)
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
set(LIBCURL_LIBS "")
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")

# For processing full path libraries into -L and -l ld options,
# the directories that go with the -L option are cached, so they
# only get added once per such directory.
set(_libcurl_libs_dirs)
# To avoid getting unnecessary -L options for known system directories,
# _libcurl_libs_dirs is seeded with them.
foreach(_libdir ${CMAKE_SYSTEM_PREFIX_PATH})
if(_libdir MATCHES "/$")
set(_libdir "${_libdir}lib")
else()
set(_libdir "${_libdir}/lib")
endif()
if(IS_DIRECTORY "${_libdir}")
list(APPEND _libcurl_libs_dirs "${_libdir}")
endif()
if(DEFINED CMAKE_LIBRARY_ARCHITECTURE)
set(_libdir "${_libdir}/${CMAKE_LIBRARY_ARCHITECTURE}")
if(IS_DIRECTORY "${_libdir}")
list(APPEND _libcurl_libs_dirs "${_libdir}")
endif()
endif()
endforeach()

foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
if(TARGET "${_lib}")
set(_libname "${_lib}")
Expand All @@ -1642,8 +1680,24 @@ if(NOT CURL_DISABLE_INSTALL)
continue()
endif()
endif()
if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-")
if(_lib MATCHES "^-")
set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}")
elseif(_lib MATCHES ".*/.*")
# This gets a bit more complex, because we want to specify the
# directory separately, and only once per directory
string(REGEX REPLACE "^(.*)/[^/]*$" "\\1" _libdir "${_lib}")
string(REGEX REPLACE "^.*/([^/.]*).*$" "\\1" _libname "${_lib}")
if(_libname MATCHES "^lib")
list(FIND _libcurl_libs_dirs "${_libdir}" _libdir_index)
if(_libdir_index LESS 0)
list(APPEND _libcurl_libs_dirs "${_libdir}")
set(LIBCURL_LIBS "${LIBCURL_LIBS} -L${_libdir}")
endif()
string(REGEX REPLACE "^lib" "" _libname "${_libname}")
set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_libname}")
else()
set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}")
endif()
else()
set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}")
endif()
Expand Down
42 changes: 42 additions & 0 deletions GIT-INFO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|

# GIT-INFO

This file is only present in git - never in release archives. It contains
information about other files and things that the git repository keeps in its
inner sanctum.

To build in environments that support configure, after having extracted
everything from git, do this:

autoreconf -fi
./configure --with-openssl
make

Daniel uses a configure line similar to this for easier development:

./configure --disable-shared --enable-debug --enable-maintainer-mode

In environments that don't support configure (i.e. Windows), do this:

buildconf.bat

## REQUIREMENTS

For `autoreconf` and `configure` (not `buildconf.bat`) to work, you need the
following software installed:

o autoconf 2.57 (or later)
o automake 1.7 (or later)
o libtool 1.4.2 (or later)
o GNU m4 (required by autoconf)
o perl

If you don't have perl and don't want to install it, you can rename the source
file `src/tool_hugehelp.c.cvs` to `src/tool_hugehelp.c` and avoid having to
generate this file. This will give you a stubbed version of the file that
doesn't contain actual content.
11 changes: 11 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 changes: 15 additions & 0 deletions LICENSES/BSD-4-Clause-UC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BSD-4-Clause (University of California-Specific)

Copyright [various years] The Regents of the University of California. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors.

4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions LICENSES/ISC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 changes: 22 additions & 0 deletions LICENSES/curl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
COPYRIGHT AND PERMISSION NOTICE

Copyright (C) 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.
Empty file modified MacOSX-Framework
100644 → 100755
Empty file.
8 changes: 7 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ CLEANFILES = $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) \

bin_SCRIPTS = curl-config

SUBDIRS = lib src
SUBDIRS = lib docs src scripts
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs

pkgconfigdir = $(libdir)/pkgconfig
Expand Down Expand Up @@ -241,10 +241,16 @@ cygwinbin:
$(MAKE) -C packages/Win32/cygwin cygwinbin

# We extend the standard install with a custom hook:
if BUILD_DOCS
install-data-hook:
(cd include && $(MAKE) install)
(cd docs && $(MAKE) install)
(cd docs/libcurl && $(MAKE) install)
else
install-data-hook:
(cd include && $(MAKE) install)
(cd docs && $(MAKE) install)
endif

# We extend the standard uninstall with a custom hook:
uninstall-hook:
Expand Down
71 changes: 71 additions & 0 deletions Makefile.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 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.
#
# SPDX-License-Identifier: curl
#
###########################################################################

all:
./configure
make

ssl:
./configure --with-openssl
make

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.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=i586-pc-msdosdjgpp-

cygwin:
./configure
make

cygwin-ssl:
./configure --with-openssl
make

amiga%:
$(MAKE) -C lib -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-
$(MAKE) -C src -f Makefile.mk CFG=$@ CROSSPREFIX=m68k-amigaos-

unix: all

unix-ssl: ssl

linux: all

linux-ssl: ssl

ca-bundle: scripts/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
Loading

0 comments on commit f581a9e

Please sign in to comment.