mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2020-12-09 (e0528597)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
@@ -27,7 +27,7 @@ mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||
if(CURL_HIDDEN_SYMBOLS)
|
||||
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
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")
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
@@ -107,3 +107,14 @@ macro(curl_nroff_check)
|
||||
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()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
|
||||
@@ -110,7 +110,7 @@ endif()
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
@@ -146,10 +146,6 @@ include(CheckCCompilerFlag)
|
||||
|
||||
project(CURL C)
|
||||
|
||||
if(0) # This code not needed for building within CMake.
|
||||
message(WARNING "the curl cmake build system is poorly maintained. Be aware")
|
||||
endif()
|
||||
|
||||
file(STRINGS ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS REGEX "#define LIBCURL_VERSION( |_NUM )")
|
||||
string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
|
||||
CURL_VERSION ${CURL_VERSION_H_CONTENTS})
|
||||
@@ -168,7 +164,7 @@ endif()
|
||||
# SET(PACKAGE_NAME "curl")
|
||||
# SET(PACKAGE_VERSION "-")
|
||||
# SET(PACKAGE_STRING "curl-")
|
||||
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/")
|
||||
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.se/mail/")
|
||||
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
|
||||
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
|
||||
|
||||
@@ -182,6 +178,7 @@ option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
|
||||
if(WIN32)
|
||||
option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on Windows (/MT)." OFF)
|
||||
option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc." ON)
|
||||
option(ENABLE_UNICODE "Set to ON to use the Unicode version of the Windows API functions" OFF)
|
||||
if(0) # This code not needed for building within CMake.
|
||||
set(CURL_TARGET_WINDOWS_VERSION "" CACHE STRING "Minimum target Windows version as hex string")
|
||||
if(CURL_TARGET_WINDOWS_VERSION)
|
||||
@@ -197,6 +194,12 @@ if(WIN32)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0501")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_UNICODE)
|
||||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
if(MINGW)
|
||||
add_compile_options(-municode)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
option(CURL_LTO "Turn on compiler Link Time Optimizations" OFF)
|
||||
|
||||
@@ -294,28 +297,30 @@ option(CURL_DISABLE_SMTP "to disable SMTP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_SMTP)
|
||||
option(CURL_DISABLE_GOPHER "to disable Gopher" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_GOPHER)
|
||||
option(CURL_ENABLE_MQTT "to enable MQTT" OFF)
|
||||
mark_as_advanced(CURL_ENABLE_MQTT)
|
||||
option(CURL_DISABLE_MQTT "to disable MQTT" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_MQTT)
|
||||
|
||||
if(HTTP_ONLY)
|
||||
set(CURL_DISABLE_FTP ON)
|
||||
set(CURL_DISABLE_LDAP ON)
|
||||
set(CURL_DISABLE_LDAPS ON)
|
||||
set(CURL_DISABLE_TELNET ON)
|
||||
set(CURL_DISABLE_DICT ON)
|
||||
set(CURL_DISABLE_FILE ON)
|
||||
set(CURL_DISABLE_TFTP ON)
|
||||
set(CURL_DISABLE_RTSP ON)
|
||||
set(CURL_DISABLE_POP3 ON)
|
||||
set(CURL_DISABLE_FTP ON)
|
||||
set(CURL_DISABLE_GOPHER ON)
|
||||
set(CURL_DISABLE_IMAP ON)
|
||||
set(CURL_DISABLE_LDAP ON)
|
||||
set(CURL_DISABLE_LDAPS ON)
|
||||
set(CURL_DISABLE_MQTT ON)
|
||||
set(CURL_DISABLE_POP3 ON)
|
||||
set(CURL_DISABLE_RTSP ON)
|
||||
set(CURL_DISABLE_SMB ON)
|
||||
set(CURL_DISABLE_SMTP ON)
|
||||
set(CURL_DISABLE_GOPHER ON)
|
||||
set(CURL_DISABLE_TELNET ON)
|
||||
set(CURL_DISABLE_TFTP ON)
|
||||
endif()
|
||||
|
||||
option(CURL_DISABLE_ALTSVC "to disable alt-svc support" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_ALTSVC)
|
||||
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_COOKIES)
|
||||
|
||||
option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
|
||||
option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
|
||||
@@ -352,10 +357,6 @@ if(ENABLE_MANUAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We need ansi c-flags, especially on HP
|
||||
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
|
||||
|
||||
if(CURL_STATIC_CRT)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
@@ -747,28 +748,25 @@ check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
|
||||
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
|
||||
|
||||
if(0) # This code not needed for building within CMake.
|
||||
option(CURL_ZLIB "Set to ON to enable building curl with zlib support." ON)
|
||||
set(HAVE_LIBZ OFF)
|
||||
set(HAVE_ZLIB_H OFF)
|
||||
set(USE_ZLIB OFF)
|
||||
if(CURL_ZLIB)
|
||||
find_package(ZLIB QUIET)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_ZLIB_H ON)
|
||||
set(HAVE_LIBZ ON)
|
||||
set(USE_ZLIB ON)
|
||||
optional_dependency(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_ZLIB_H ON)
|
||||
set(HAVE_LIBZ ON)
|
||||
set(USE_ZLIB ON)
|
||||
|
||||
# Depend on ZLIB via imported targets if supported by the running
|
||||
# version of CMake. This allows our dependents to get our dependencies
|
||||
# transitively.
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.4)
|
||||
list(APPEND CURL_LIBS ZLIB::ZLIB)
|
||||
else()
|
||||
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
|
||||
# Depend on ZLIB via imported targets if supported by the running
|
||||
# version of CMake. This allows our dependents to get our dependencies
|
||||
# transitively.
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.4)
|
||||
list(APPEND CURL_LIBS ZLIB::ZLIB)
|
||||
else()
|
||||
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -911,6 +909,7 @@ if(CMAKE_USE_GSSAPI)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
|
||||
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
|
||||
|
||||
else()
|
||||
@@ -926,8 +925,6 @@ else()
|
||||
unset(USE_UNIX_SOCKETS CACHE)
|
||||
endif()
|
||||
|
||||
option(ENABLE_ALT_SVC "Enable alt-svc support" OFF)
|
||||
set(USE_ALTSVC ${ENABLE_ALT_SVC})
|
||||
|
||||
if(0) # This code not needed for building within CMake.
|
||||
#
|
||||
@@ -1055,6 +1052,7 @@ check_include_file_concat("net/if.h" HAVE_NET_IF_H)
|
||||
check_include_file_concat("netdb.h" HAVE_NETDB_H)
|
||||
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
|
||||
check_include_file("linux/tcp.h" HAVE_LINUX_TCP_H)
|
||||
|
||||
check_include_file_concat("pem.h" HAVE_PEM_H)
|
||||
check_include_file_concat("poll.h" HAVE_POLL_H)
|
||||
@@ -1465,16 +1463,16 @@ install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
if(0) # This code not needed for building within CMake.
|
||||
option(BUILD_TESTING "Build tests" "${PERL_FOUND}")
|
||||
if(NOT PERL_FOUND)
|
||||
message(STATUS "Perl not found, testing disabled.")
|
||||
elseif(BUILD_TESTING)
|
||||
cmake_dependent_option(BUILD_TESTING "Build tests"
|
||||
ON "PERL_FOUND;NOT CURL_DISABLE_TESTS"
|
||||
OFF)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# NTLM support requires crypto function adaptions from various SSL libs
|
||||
# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
|
||||
if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_WINDOWS_SSPI OR USE_DARWINSSL OR USE_MBEDTLS OR USE_WIN32_CRYPTO))
|
||||
if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_DARWINSSL OR USE_MBEDTLS OR USE_WIN32_CRYPTO))
|
||||
set(use_ntlm ON)
|
||||
else()
|
||||
set(use_ntlm OFF)
|
||||
@@ -1493,7 +1491,7 @@ endmacro()
|
||||
set(_items)
|
||||
_add_if("SSL" SSL_ENABLED)
|
||||
_add_if("IPv6" ENABLE_IPV6)
|
||||
_add_if("unix-sockets" USE_UNIX_SOCKETS)
|
||||
_add_if("unixsockets" USE_UNIX_SOCKETS)
|
||||
_add_if("libz" HAVE_LIBZ)
|
||||
_add_if("brotli" HAVE_BROTLI)
|
||||
_add_if("zstd" HAVE_ZSTD)
|
||||
@@ -1504,7 +1502,7 @@ _add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND
|
||||
# TODO SSP1 (Schannel) check is missing
|
||||
_add_if("SSPI" USE_WINDOWS_SSPI)
|
||||
_add_if("GSS-API" HAVE_GSSAPI)
|
||||
_add_if("alt-svc" ENABLE_ALT_SVC)
|
||||
_add_if("alt-svc" NOT CURL_DISABLE_ALTSVC)
|
||||
# TODO SSP1 missing for SPNEGO
|
||||
_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND
|
||||
(HAVE_GSSAPI OR USE_WINDOWS_SSPI))
|
||||
@@ -1512,7 +1510,7 @@ _add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND
|
||||
(HAVE_GSSAPI OR USE_WINDOWS_SSPI))
|
||||
# NTLM support requires crypto function adaptions from various SSL libs
|
||||
# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
|
||||
_add_if("NTLM" use_ntlm)
|
||||
_add_if("NTLM" use_ntlm OR USE_WINDOWS_SSPI)
|
||||
# TODO missing option (autoconf: --enable-ntlm-wb)
|
||||
_add_if("NTLM_WB" use_ntlm AND NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
|
||||
# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP
|
||||
@@ -1522,6 +1520,7 @@ _add_if("HTTP2" USE_NGHTTP2)
|
||||
_add_if("HTTP3" USE_NGTCP2 OR USE_QUICHE)
|
||||
_add_if("MultiSSL" CURL_WITH_MULTI_SSL)
|
||||
_add_if("HTTPS-proxy" SSL_ENABLED AND (USE_OPENSSL OR USE_GNUTLS OR USE_NSS))
|
||||
_add_if("unicode" ENABLE_UNICODE)
|
||||
string(REPLACE ";" " " SUPPORT_FEATURES "${_items}")
|
||||
message(STATUS "Enabled features: ${SUPPORT_FEATURES}")
|
||||
|
||||
@@ -1554,7 +1553,7 @@ _add_if("SCP" USE_LIBSSH2 OR USE_LIBSSH)
|
||||
_add_if("SFTP" USE_LIBSSH2 OR USE_LIBSSH)
|
||||
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
|
||||
_add_if("RTMP" USE_LIBRTMP)
|
||||
_add_if("MQTT" CURL_ENABLE_MQTT)
|
||||
_add_if("MQTT" NOT CURL_DISABLE_MQTT)
|
||||
if(_items)
|
||||
list(SORT _items)
|
||||
endif()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/*
|
||||
* If you have libcurl problems, all docs and details are found here:
|
||||
* https://curl.haxx.se/libcurl/
|
||||
* https://curl.se/libcurl/
|
||||
*
|
||||
* curl-library mailing list subscription and unsubscription web interface:
|
||||
* https://cool.haxx.se/mailman/listinfo/curl-library/
|
||||
@@ -74,7 +74,7 @@
|
||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
|
||||
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
|
||||
defined(__CYGWIN__) || \
|
||||
defined(__CYGWIN__) || defined(AMIGA) || \
|
||||
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
@@ -610,6 +610,7 @@ typedef enum {
|
||||
error */
|
||||
CURLE_HTTP3, /* 95 - An HTTP/3 layer problem */
|
||||
CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */
|
||||
CURLE_PROXY, /* 97 - proxy handshake error */
|
||||
CURL_LAST /* never use! */
|
||||
} CURLcode;
|
||||
|
||||
@@ -689,6 +690,48 @@ typedef enum {
|
||||
|
||||
#endif /*!CURL_NO_OLDIES*/
|
||||
|
||||
/*
|
||||
* Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
|
||||
* return for the transfers.
|
||||
*/
|
||||
typedef enum {
|
||||
CURLPX_OK,
|
||||
CURLPX_BAD_ADDRESS_TYPE,
|
||||
CURLPX_BAD_VERSION,
|
||||
CURLPX_CLOSED,
|
||||
CURLPX_GSSAPI,
|
||||
CURLPX_GSSAPI_PERMSG,
|
||||
CURLPX_GSSAPI_PROTECTION,
|
||||
CURLPX_IDENTD,
|
||||
CURLPX_IDENTD_DIFFER,
|
||||
CURLPX_LONG_HOSTNAME,
|
||||
CURLPX_LONG_PASSWD,
|
||||
CURLPX_LONG_USER,
|
||||
CURLPX_NO_AUTH,
|
||||
CURLPX_RECV_ADDRESS,
|
||||
CURLPX_RECV_AUTH,
|
||||
CURLPX_RECV_CONNECT,
|
||||
CURLPX_RECV_REQACK,
|
||||
CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
|
||||
CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
|
||||
CURLPX_REPLY_CONNECTION_REFUSED,
|
||||
CURLPX_REPLY_GENERAL_SERVER_FAILURE,
|
||||
CURLPX_REPLY_HOST_UNREACHABLE,
|
||||
CURLPX_REPLY_NETWORK_UNREACHABLE,
|
||||
CURLPX_REPLY_NOT_ALLOWED,
|
||||
CURLPX_REPLY_TTL_EXPIRED,
|
||||
CURLPX_REPLY_UNASSIGNED,
|
||||
CURLPX_REQUEST_FAILED,
|
||||
CURLPX_RESOLVE_HOST,
|
||||
CURLPX_SEND_AUTH,
|
||||
CURLPX_SEND_CONNECT,
|
||||
CURLPX_SEND_REQUEST,
|
||||
CURLPX_UNKNOWN_FAIL,
|
||||
CURLPX_UNKNOWN_MODE,
|
||||
CURLPX_USER_REJECTED,
|
||||
CURLPX_LAST /* never use */
|
||||
} CURLproxycode;
|
||||
|
||||
/* This prototype applies to all conversion callbacks */
|
||||
typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
|
||||
|
||||
@@ -789,6 +832,7 @@ enum curl_khstat {
|
||||
CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so
|
||||
this causes a CURLE_DEFER error but otherwise the
|
||||
connection will be left intact etc */
|
||||
CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key*/
|
||||
CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
|
||||
};
|
||||
|
||||
@@ -905,13 +949,42 @@ typedef enum {
|
||||
#define CURLHEADER_SEPARATE (1<<0)
|
||||
|
||||
/* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
|
||||
#define CURLALTSVC_IMMEDIATELY (1<<0)
|
||||
|
||||
#define CURLALTSVC_READONLYFILE (1<<2)
|
||||
#define CURLALTSVC_H1 (1<<3)
|
||||
#define CURLALTSVC_H2 (1<<4)
|
||||
#define CURLALTSVC_H3 (1<<5)
|
||||
|
||||
|
||||
struct curl_hstsentry {
|
||||
char *name;
|
||||
size_t namelen;
|
||||
unsigned int includeSubDomains:1;
|
||||
char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
|
||||
};
|
||||
|
||||
struct curl_index {
|
||||
size_t index; /* the provided entry's "index" or count */
|
||||
size_t total; /* total number of entries to save */
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
CURLSTS_OK,
|
||||
CURLSTS_DONE,
|
||||
CURLSTS_FAIL
|
||||
} CURLSTScode;
|
||||
|
||||
typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
|
||||
struct curl_hstsentry *e,
|
||||
void *userp);
|
||||
typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
|
||||
struct curl_hstsentry *e,
|
||||
struct curl_index *i,
|
||||
void *userp);
|
||||
|
||||
/* CURLHSTS_* are bits for the CURLOPT_HSTS option */
|
||||
#define CURLHSTS_ENABLE (long)(1<<0)
|
||||
#define CURLHSTS_READONLYFILE (long)(1<<1)
|
||||
|
||||
/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
|
||||
#define CURLPROTO_HTTP (1<<0)
|
||||
#define CURLPROTO_HTTPS (1<<1)
|
||||
@@ -958,17 +1031,27 @@ typedef enum {
|
||||
|
||||
#define CURLOPT(na,t,nu) na = t + nu
|
||||
|
||||
/* handy aliases that make no run-time difference */
|
||||
#define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
|
||||
/* CURLOPT aliases that make no run-time difference */
|
||||
|
||||
/* 'char *' argument to a string with a trailing zero */
|
||||
#define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
|
||||
|
||||
/* 'struct curl_slist *' argument */
|
||||
#define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT
|
||||
|
||||
/* 'void *' argument passed untouched to callback */
|
||||
#define CURLOPTTYPE_CBPOINT CURLOPTTYPE_OBJECTPOINT
|
||||
|
||||
/* 'long' argument with a set of values/bitmask */
|
||||
#define CURLOPTTYPE_VALUES CURLOPTTYPE_LONG
|
||||
|
||||
/*
|
||||
* All CURLOPT_* values.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
/* This is the FILE * or void * the regular output should be written to. */
|
||||
CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_OBJECTPOINT, 1),
|
||||
CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_CBPOINT, 1),
|
||||
|
||||
/* The full URL to get/put */
|
||||
CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2),
|
||||
@@ -991,7 +1074,7 @@ typedef enum {
|
||||
/* not used */
|
||||
|
||||
/* Specified file stream to upload from (use as input): */
|
||||
CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_OBJECTPOINT, 9),
|
||||
CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_CBPOINT, 9),
|
||||
|
||||
/* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
|
||||
* bytes big. */
|
||||
@@ -1076,7 +1159,7 @@ typedef enum {
|
||||
|
||||
/* send FILE * or void * to store headers to, if you use a callback it
|
||||
is simply passed to the callback unmodified */
|
||||
CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_OBJECTPOINT, 29),
|
||||
CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
|
||||
|
||||
/* point to a file to read the initial cookies from, also enables
|
||||
"cookie awareness" */
|
||||
@@ -1084,10 +1167,10 @@ typedef enum {
|
||||
|
||||
/* What version to specifically try to use.
|
||||
See CURL_SSLVERSION defines below. */
|
||||
CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_LONG, 32),
|
||||
CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_VALUES, 32),
|
||||
|
||||
/* What kind of HTTP time condition to use, see defines */
|
||||
CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_LONG, 33),
|
||||
CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_VALUES, 33),
|
||||
|
||||
/* Time to use with the above condition. Specified in number of seconds
|
||||
since 1 Jan 1970 */
|
||||
@@ -1141,7 +1224,7 @@ typedef enum {
|
||||
|
||||
/* Specify whether to read the user+password from the .netrc or the URL.
|
||||
* This must be one of the CURL_NETRC_* enums below. */
|
||||
CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_LONG, 51),
|
||||
CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_VALUES, 51),
|
||||
|
||||
/* use Location: Luke! */
|
||||
CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52),
|
||||
@@ -1162,8 +1245,8 @@ typedef enum {
|
||||
|
||||
/* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
|
||||
callbacks */
|
||||
CURLOPT(CURLOPT_PROGRESSDATA, CURLOPTTYPE_OBJECTPOINT, 57),
|
||||
#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
|
||||
CURLOPT(CURLOPT_XFERINFODATA, CURLOPTTYPE_CBPOINT, 57),
|
||||
#define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
|
||||
|
||||
/* We want the referrer field set automatically when following locations */
|
||||
CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58),
|
||||
@@ -1258,7 +1341,7 @@ typedef enum {
|
||||
|
||||
/* Specify which HTTP version to use! This must be set to one of the
|
||||
CURL_HTTP_VERSION* enums set below. */
|
||||
CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_LONG, 84),
|
||||
CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
|
||||
|
||||
/* Specifically switch on or off the FTP engine's use of the EPSV command. By
|
||||
default, that one will always be attempted before the more traditional
|
||||
@@ -1296,7 +1379,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94),
|
||||
|
||||
/* set the data for the debug function */
|
||||
CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_OBJECTPOINT, 95),
|
||||
CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_CBPOINT, 95),
|
||||
|
||||
/* mark this as start of a cookie session */
|
||||
CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96),
|
||||
@@ -1319,7 +1402,7 @@ typedef enum {
|
||||
/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
|
||||
CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
|
||||
CURLPROXY_SOCKS5. */
|
||||
CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_LONG, 101),
|
||||
CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
|
||||
|
||||
/* Set the Accept-Encoding string. Use this to tell a server you would like
|
||||
the response to be compressed. Before 7.21.6, this was known as
|
||||
@@ -1345,7 +1428,7 @@ typedef enum {
|
||||
/* Set this to a bitmask value to enable the particular authentications
|
||||
methods you like. Use this in combination with CURLOPT_USERPWD.
|
||||
Note that setting multiple bits may cause extra network round-trips. */
|
||||
CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_LONG, 107),
|
||||
CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
|
||||
|
||||
/* Set the ssl context callback function, currently only for OpenSSL or
|
||||
WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
|
||||
@@ -1354,7 +1437,7 @@ typedef enum {
|
||||
|
||||
/* Set the userdata for the ssl context callback function's third
|
||||
argument */
|
||||
CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_OBJECTPOINT, 109),
|
||||
CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
|
||||
|
||||
/* FTP Option that causes missing dirs to be created on the remote server.
|
||||
In 7.19.4 we introduced the convenience enums for this option using the
|
||||
@@ -1365,7 +1448,7 @@ typedef enum {
|
||||
/* Set this to a bitmask value to enable the particular authentications
|
||||
methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
|
||||
Note that setting multiple bits may cause extra network round-trips. */
|
||||
CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_LONG, 111),
|
||||
CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),
|
||||
|
||||
/* FTP option that changes the timeout, in seconds, associated with
|
||||
getting a response. This is different from transfer timeout time and
|
||||
@@ -1377,7 +1460,7 @@ typedef enum {
|
||||
/* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
|
||||
tell libcurl to resolve names to those IP versions only. This only has
|
||||
affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
|
||||
CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_LONG, 113),
|
||||
CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
|
||||
|
||||
/* Set this option to limit the size of a file that will be downloaded from
|
||||
an HTTP or FTP server.
|
||||
@@ -1412,7 +1495,7 @@ typedef enum {
|
||||
CURLUSESSL_CONTROL - SSL for the control connection or fail
|
||||
CURLUSESSL_ALL - SSL for all communication or fail
|
||||
*/
|
||||
CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_LONG, 119),
|
||||
CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
|
||||
|
||||
/* The _LARGE version of the standard POSTFIELDSIZE option */
|
||||
CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120),
|
||||
@@ -1438,10 +1521,10 @@ typedef enum {
|
||||
CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
|
||||
CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
|
||||
*/
|
||||
CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_LONG, 129),
|
||||
CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
|
||||
|
||||
CURLOPT(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130),
|
||||
CURLOPT(CURLOPT_IOCTLDATA, CURLOPTTYPE_OBJECTPOINT, 131),
|
||||
CURLOPT(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131),
|
||||
|
||||
/* 132 OBSOLETE. Gone in 7.16.0 */
|
||||
/* 133 OBSOLETE. Gone in 7.16.0 */
|
||||
@@ -1464,7 +1547,7 @@ typedef enum {
|
||||
|
||||
/* Select "file method" to use when doing FTP, see the curl_ftpmethod
|
||||
above. */
|
||||
CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_LONG, 138),
|
||||
CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_VALUES, 138),
|
||||
|
||||
/* Local port number to bind the socket to */
|
||||
CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
|
||||
@@ -1501,14 +1584,14 @@ typedef enum {
|
||||
|
||||
/* callback function for setting socket options */
|
||||
CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148),
|
||||
CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_OBJECTPOINT, 149),
|
||||
CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_CBPOINT, 149),
|
||||
|
||||
/* set to 0 to disable session ID re-use for this transfer, default is
|
||||
enabled (== 1) */
|
||||
CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150),
|
||||
|
||||
/* allowed SSH authentication methods */
|
||||
CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_LONG, 151),
|
||||
CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_VALUES, 151),
|
||||
|
||||
/* Used by scp/sftp to do public/private key authentication */
|
||||
CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152),
|
||||
@@ -1533,7 +1616,7 @@ typedef enum {
|
||||
|
||||
/* Set the behaviour of POST when redirecting. Values must be set to one
|
||||
of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
|
||||
CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_LONG, 161),
|
||||
CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
|
||||
|
||||
/* used by scp/sftp to verify the host's public key */
|
||||
CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162),
|
||||
@@ -1543,7 +1626,7 @@ typedef enum {
|
||||
CURL_SOCKET_BAD. The callback should have type
|
||||
curl_opensocket_callback */
|
||||
CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163),
|
||||
CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 164),
|
||||
CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_CBPOINT, 164),
|
||||
|
||||
/* POST volatile input fields. */
|
||||
CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165),
|
||||
@@ -1553,7 +1636,7 @@ typedef enum {
|
||||
|
||||
/* Callback function for seeking in the input stream */
|
||||
CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167),
|
||||
CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_OBJECTPOINT, 168),
|
||||
CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_CBPOINT, 168),
|
||||
|
||||
/* CRL file */
|
||||
CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169),
|
||||
@@ -1614,7 +1697,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184),
|
||||
|
||||
/* set the SSH host key callback custom pointer */
|
||||
CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_OBJECTPOINT, 185),
|
||||
CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_CBPOINT, 185),
|
||||
|
||||
/* set the SMTP mail originator */
|
||||
CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186),
|
||||
@@ -1626,7 +1709,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188),
|
||||
|
||||
/* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
|
||||
CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_LONG, 189),
|
||||
CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_VALUES, 189),
|
||||
|
||||
/* The RTSP session identifier */
|
||||
CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190),
|
||||
@@ -1644,7 +1727,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194),
|
||||
|
||||
/* The stream to pass to INTERLEAVEFUNCTION. */
|
||||
CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_OBJECTPOINT, 195),
|
||||
CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_CBPOINT, 195),
|
||||
|
||||
/* Let the application define a custom write method for RTP data */
|
||||
CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196),
|
||||
@@ -1664,10 +1747,10 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200),
|
||||
|
||||
/* Let the application define custom chunk data pointer */
|
||||
CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_OBJECTPOINT, 201),
|
||||
CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_CBPOINT, 201),
|
||||
|
||||
/* FNMATCH_FUNCTION user pointer */
|
||||
CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_OBJECTPOINT, 202),
|
||||
CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_CBPOINT, 202),
|
||||
|
||||
/* send linked-list of name:port:address sets */
|
||||
CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
|
||||
@@ -1696,10 +1779,10 @@ typedef enum {
|
||||
/* Callback function for closing socket (instead of close(2)). The callback
|
||||
should have type curl_closesocket_callback */
|
||||
CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208),
|
||||
CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 209),
|
||||
CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_CBPOINT, 209),
|
||||
|
||||
/* allow GSSAPI credential delegation */
|
||||
CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_LONG, 210),
|
||||
CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_VALUES, 210),
|
||||
|
||||
/* Set the name servers to use for DNS resolution */
|
||||
CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211),
|
||||
@@ -1716,7 +1799,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215),
|
||||
|
||||
/* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
|
||||
CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_LONG, 216),
|
||||
CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_VALUES, 216),
|
||||
|
||||
/* Set the SMTP auth originator */
|
||||
CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217),
|
||||
@@ -1763,7 +1846,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228),
|
||||
|
||||
/* Pass in a bitmask of "header options" */
|
||||
CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_LONG, 229),
|
||||
CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
|
||||
|
||||
/* The public key in DER form used to validate the peer public key
|
||||
this option is used only if SSL_VERIFYPEER is true */
|
||||
@@ -1835,7 +1918,7 @@ typedef enum {
|
||||
|
||||
/* What version to specifically try to use for proxy.
|
||||
See CURL_SSLVERSION defines below. */
|
||||
CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_LONG, 250),
|
||||
CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
|
||||
|
||||
/* Set a username for authenticated TLS for proxy */
|
||||
CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
|
||||
@@ -1909,7 +1992,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
|
||||
|
||||
/* User data to pass to the resolver start callback. */
|
||||
CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_OBJECTPOINT, 273),
|
||||
CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_CBPOINT, 273),
|
||||
|
||||
/* send HAProxy PROXY protocol header? */
|
||||
CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274),
|
||||
@@ -1940,7 +2023,7 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
|
||||
|
||||
/* pointer to be passed to HTTP_TRAILER_FUNCTION */
|
||||
CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_OBJECTPOINT, 284),
|
||||
CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_CBPOINT, 284),
|
||||
|
||||
/* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
|
||||
CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285),
|
||||
@@ -1971,6 +2054,25 @@ typedef enum {
|
||||
CURLOPT(CURLOPT_PROXY_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 296),
|
||||
CURLOPT(CURLOPT_PROXY_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 297),
|
||||
|
||||
/* the EC curves requested by the TLS client (RFC 8422, 5.1);
|
||||
* OpenSSL support via 'set_groups'/'set_curves':
|
||||
* https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html
|
||||
*/
|
||||
CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
|
||||
|
||||
/* HSTS bitmask */
|
||||
CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
|
||||
/* HSTS file name */
|
||||
CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
|
||||
|
||||
/* HSTS read callback */
|
||||
CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
|
||||
CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
|
||||
|
||||
/* HSTS write callback */
|
||||
CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
|
||||
CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
@@ -2643,8 +2745,9 @@ typedef enum {
|
||||
CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,
|
||||
CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57,
|
||||
CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
|
||||
CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59,
|
||||
|
||||
CURLINFO_LASTONE = 58
|
||||
CURLINFO_LASTONE = 59
|
||||
} CURLINFO;
|
||||
|
||||
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
||||
@@ -2841,6 +2944,7 @@ typedef struct curl_version_info_data curl_version_info_data;
|
||||
#define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */
|
||||
#define CURL_VERSION_ZSTD (1<<26) /* zstd features are present */
|
||||
#define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */
|
||||
#define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */
|
||||
|
||||
/*
|
||||
* NAME curl_version_info()
|
||||
@@ -2903,6 +3007,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
||||
#include "easy.h" /* nothing in curl is fun without the easy stuff */
|
||||
#include "multi.h"
|
||||
#include "urlapi.h"
|
||||
#include "options.h"
|
||||
|
||||
/* the typechecker doesn't work in C++ (yet) */
|
||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -30,12 +30,12 @@
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.72.0"
|
||||
#define LIBCURL_VERSION "7.74.0"
|
||||
|
||||
/* The numeric version number is also available "in parts" by using these
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 72
|
||||
#define LIBCURL_VERSION_MINOR 74
|
||||
#define LIBCURL_VERSION_PATCH 0
|
||||
|
||||
/* This is the numeric version of the libcurl version number, meant for easier
|
||||
@@ -57,7 +57,7 @@
|
||||
CURL_VERSION_BITS() macro since curl's own configure script greps for it
|
||||
and needs it to contain the full number.
|
||||
*/
|
||||
#define LIBCURL_VERSION_NUM 0x074800
|
||||
#define LIBCURL_VERSION_NUM 0x074a00
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
68
Utilities/cmcurl/include/curl/options.h
Normal file
68
Utilities/cmcurl/include/curl/options.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef CURLINC_OPTIONS_H
|
||||
#define CURLINC_OPTIONS_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
CURLOT_LONG, /* long (a range of values) */
|
||||
CURLOT_VALUES, /* (a defined set or bitmask) */
|
||||
CURLOT_OFF_T, /* curl_off_t (a range of values) */
|
||||
CURLOT_OBJECT, /* pointer (void *) */
|
||||
CURLOT_STRING, /* (char * to zero terminated buffer) */
|
||||
CURLOT_SLIST, /* (struct curl_slist *) */
|
||||
CURLOT_CBPTR, /* (void * passed as-is to a callback) */
|
||||
CURLOT_BLOB, /* blob (struct curl_blob *) */
|
||||
CURLOT_FUNCTION /* function pointer */
|
||||
} curl_easytype;
|
||||
|
||||
/* Flag bits */
|
||||
|
||||
/* "alias" means it is provided for old programs to remain functional,
|
||||
we prefer another name */
|
||||
#define CURLOT_FLAG_ALIAS (1<<0)
|
||||
|
||||
/* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
|
||||
to use for curl_easy_setopt() for the given id */
|
||||
struct curl_easyoption {
|
||||
const char *name;
|
||||
CURLoption id;
|
||||
curl_easytype type;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
CURL_EXTERN const struct curl_easyoption *
|
||||
curl_easy_option_by_name(const char *name);
|
||||
|
||||
CURL_EXTERN const struct curl_easyoption *
|
||||
curl_easy_option_by_id (CURLoption id);
|
||||
|
||||
CURL_EXTERN const struct curl_easyoption *
|
||||
curl_easy_option_next(const struct curl_easyoption *prev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
#endif /* CURLINC_OPTIONS_H */
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -273,6 +273,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
||||
(option) == CURLOPT_FTPPORT || \
|
||||
(option) == CURLOPT_FTP_ACCOUNT || \
|
||||
(option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
|
||||
(option) == CURLOPT_HSTS || \
|
||||
(option) == CURLOPT_INTERFACE || \
|
||||
(option) == CURLOPT_ISSUERCERT || \
|
||||
(option) == CURLOPT_KEYPASSWD || \
|
||||
@@ -292,6 +293,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
||||
(option) == CURLOPT_PROXY_CAINFO || \
|
||||
(option) == CURLOPT_PROXY_CAPATH || \
|
||||
(option) == CURLOPT_PROXY_CRLFILE || \
|
||||
(option) == CURLOPT_PROXY_ISSUERCERT || \
|
||||
(option) == CURLOPT_PROXY_KEYPASSWD || \
|
||||
(option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
|
||||
(option) == CURLOPT_PROXY_SERVICE_NAME || \
|
||||
@@ -334,6 +336,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
||||
(option) == CURLOPT_USERNAME || \
|
||||
(option) == CURLOPT_USERPWD || \
|
||||
(option) == CURLOPT_XOAUTH2_BEARER || \
|
||||
(option) == CURLOPT_SSL_EC_CURVES || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a curl_write_callback argument */
|
||||
@@ -354,10 +357,11 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
||||
(option) == CURLOPT_DEBUGDATA || \
|
||||
(option) == CURLOPT_FNMATCH_DATA || \
|
||||
(option) == CURLOPT_HEADERDATA || \
|
||||
(option) == CURLOPT_HSTSREADDATA || \
|
||||
(option) == CURLOPT_HSTSWRITEDATA || \
|
||||
(option) == CURLOPT_INTERLEAVEDATA || \
|
||||
(option) == CURLOPT_IOCTLDATA || \
|
||||
(option) == CURLOPT_OPENSOCKETDATA || \
|
||||
(option) == CURLOPT_PRIVATE || \
|
||||
(option) == CURLOPT_PROGRESSDATA || \
|
||||
(option) == CURLOPT_READDATA || \
|
||||
(option) == CURLOPT_SEEKDATA || \
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
@@ -39,7 +39,7 @@ list(APPEND HHEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/curl_config.h
|
||||
)
|
||||
|
||||
if(MSVC AND NOT CURL_STATICLIB)
|
||||
if(WIN32 AND NOT CURL_STATICLIB)
|
||||
list(APPEND CSOURCES libcurl.rc)
|
||||
endif()
|
||||
|
||||
@@ -50,15 +50,6 @@ endif()
|
||||
# # strtoofft.c - specify later
|
||||
# )
|
||||
|
||||
# # if we have Kerberos 4, right now this is never on
|
||||
# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
|
||||
# IF(CURL_KRB4)
|
||||
# SET(CSOURCES ${CSOURCES}
|
||||
# krb4.c
|
||||
# security.c
|
||||
# )
|
||||
# ENDIF(CURL_KRB4)
|
||||
|
||||
# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
|
||||
# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
|
||||
# IF(CURL_MALLOC_DEBUG)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# 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.haxx.se/docs/copyright.html.
|
||||
# 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
|
||||
@@ -56,19 +56,19 @@ LIB_CFILES = altsvc.c amigaos.c asyn-ares.c asyn-thread.c base64.c \
|
||||
http_ntlm.c http_proxy.c idn_win32.c if2ip.c imap.c inet_ntop.c inet_pton.c \
|
||||
krb5.c ldap.c llist.c md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c \
|
||||
multi.c netrc.c non-ascii.c nonblock.c openldap.c parsedate.c pingpong.c \
|
||||
pop3.c progress.c psl.c doh.c rand.c rename.c rtsp.c security.c select.c \
|
||||
pop3.c progress.c psl.c doh.c rand.c rename.c rtsp.c select.c \
|
||||
sendf.c setopt.c sha256.c share.c slist.c smb.c smtp.c socketpair.c socks.c \
|
||||
socks_gssapi.c socks_sspi.c speedcheck.c splay.c strcase.c strdup.c \
|
||||
strerror.c strtok.c strtoofft.c system_win32.c telnet.c tftp.c timeval.c \
|
||||
transfer.c urlapi.c version.c warnless.c wildcard.c x509asn1.c dynbuf.c \
|
||||
version_win32.c
|
||||
version_win32.c easyoptions.c easygetopt.c hsts.c
|
||||
|
||||
LIB_HFILES = altsvc.h amigaos.h arpa_telnet.h asyn.h conncache.h connect.h \
|
||||
content_encoding.h cookie.h curl_addrinfo.h curl_base64.h curl_ctype.h \
|
||||
curl_des.h curl_endian.h curl_fnmatch.h curl_get_line.h curl_gethostname.h \
|
||||
curl_gssapi.h curl_hmac.h curl_ldap.h curl_md4.h curl_md5.h curl_memory.h \
|
||||
curl_memrchr.h curl_multibyte.h curl_ntlm_core.h curl_ntlm_wb.h curl_path.h \
|
||||
curl_printf.h curl_range.h curl_rtmp.h curl_sasl.h curl_sec.h curl_setup.h \
|
||||
curl_printf.h curl_range.h curl_rtmp.h curl_sasl.h curl_krb5.h curl_setup.h \
|
||||
curl_setup_once.h curl_sha256.h curl_sspi.h curl_threads.h curlx.h dict.h \
|
||||
dotdot.h easyif.h escape.h file.h fileinfo.h formdata.h ftp.h url.h \
|
||||
ftplistparser.h getinfo.h gopher.h hash.h hostcheck.h hostip.h http.h \
|
||||
@@ -80,7 +80,7 @@ LIB_HFILES = altsvc.h amigaos.h arpa_telnet.h asyn.h conncache.h connect.h \
|
||||
smb.h smtp.h sockaddr.h socketpair.h socks.h speedcheck.h splay.h strcase.h \
|
||||
strdup.h strerror.h strtok.h strtoofft.h system_win32.h telnet.h tftp.h \
|
||||
timeval.h transfer.h urlapi-int.h urldata.h warnless.h wildcard.h \
|
||||
x509asn1.h dynbuf.h version_win32.h
|
||||
x509asn1.h dynbuf.h version_win32.h easyoptions.h hsts.h
|
||||
|
||||
LIB_RCFILES = libcurl.rc
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if !defined(CURL_DISABLE_HTTP) && defined(USE_ALTSVC)
|
||||
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_ALTSVC)
|
||||
#include <curl/curl.h>
|
||||
#include "urldata.h"
|
||||
#include "altsvc.h"
|
||||
@@ -302,11 +302,12 @@ CURLcode Curl_altsvc_ctrl(struct altsvcinfo *asi, const long ctrl)
|
||||
* Curl_altsvc_cleanup() frees an altsvc cache instance and all associated
|
||||
* resources.
|
||||
*/
|
||||
void Curl_altsvc_cleanup(struct altsvcinfo *altsvc)
|
||||
void Curl_altsvc_cleanup(struct altsvcinfo **altsvcp)
|
||||
{
|
||||
struct curl_llist_element *e;
|
||||
struct curl_llist_element *n;
|
||||
if(altsvc) {
|
||||
struct Curl_llist_element *e;
|
||||
struct Curl_llist_element *n;
|
||||
if(*altsvcp) {
|
||||
struct altsvcinfo *altsvc = *altsvcp;
|
||||
for(e = altsvc->list.head; e; e = n) {
|
||||
struct altsvc *as = e->ptr;
|
||||
n = e->next;
|
||||
@@ -314,6 +315,7 @@ void Curl_altsvc_cleanup(struct altsvcinfo *altsvc)
|
||||
}
|
||||
free(altsvc->filename);
|
||||
free(altsvc);
|
||||
*altsvcp = NULL; /* clear the pointer */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,8 +325,8 @@ void Curl_altsvc_cleanup(struct altsvcinfo *altsvc)
|
||||
CURLcode Curl_altsvc_save(struct Curl_easy *data,
|
||||
struct altsvcinfo *altsvc, const char *file)
|
||||
{
|
||||
struct curl_llist_element *e;
|
||||
struct curl_llist_element *n;
|
||||
struct Curl_llist_element *e;
|
||||
struct Curl_llist_element *n;
|
||||
CURLcode result = CURLE_OK;
|
||||
FILE *out;
|
||||
char *tempstore;
|
||||
@@ -353,7 +355,7 @@ CURLcode Curl_altsvc_save(struct Curl_easy *data,
|
||||
if(!out)
|
||||
result = CURLE_WRITE_ERROR;
|
||||
else {
|
||||
fputs("# Your alt-svc cache. https://curl.haxx.se/docs/alt-svc.html\n"
|
||||
fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
|
||||
"# This file was generated by libcurl! Edit at your own risk.\n",
|
||||
out);
|
||||
for(e = altsvc->list.head; e; e = n) {
|
||||
@@ -399,8 +401,8 @@ static CURLcode getalnum(const char **ptr, char *alpnbuf, size_t buflen)
|
||||
static void altsvc_flush(struct altsvcinfo *asi, enum alpnid srcalpnid,
|
||||
const char *srchost, unsigned short srcport)
|
||||
{
|
||||
struct curl_llist_element *e;
|
||||
struct curl_llist_element *n;
|
||||
struct Curl_llist_element *e;
|
||||
struct Curl_llist_element *n;
|
||||
for(e = asi->list.head; e; e = n) {
|
||||
struct altsvc *as = e->ptr;
|
||||
n = e->next;
|
||||
@@ -449,12 +451,14 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
|
||||
{
|
||||
const char *p = value;
|
||||
size_t len;
|
||||
enum alpnid dstalpnid = srcalpnid; /* the same by default */
|
||||
char namebuf[MAX_ALTSVC_HOSTLEN] = "";
|
||||
char alpnbuf[MAX_ALTSVC_ALPNLEN] = "";
|
||||
struct altsvc *as;
|
||||
unsigned short dstport = srcport; /* the same by default */
|
||||
CURLcode result = getalnum(&p, alpnbuf, sizeof(alpnbuf));
|
||||
#ifdef CURL_DISABLE_VERBOSE_STRINGS
|
||||
(void)data;
|
||||
#endif
|
||||
if(result) {
|
||||
infof(data, "Excessive alt-svc header, ignoring...\n");
|
||||
return CURLE_OK;
|
||||
@@ -473,7 +477,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
|
||||
do {
|
||||
if(*p == '=') {
|
||||
/* [protocol]="[host][:port]" */
|
||||
dstalpnid = alpn2alpnid(alpnbuf);
|
||||
enum alpnid dstalpnid = alpn2alpnid(alpnbuf); /* the same by default */
|
||||
p++;
|
||||
if(*p == '\"') {
|
||||
const char *dsthost = "";
|
||||
@@ -612,8 +616,8 @@ bool Curl_altsvc_lookup(struct altsvcinfo *asi,
|
||||
struct altsvc **dstentry,
|
||||
const int versions) /* one or more bits */
|
||||
{
|
||||
struct curl_llist_element *e;
|
||||
struct curl_llist_element *n;
|
||||
struct Curl_llist_element *e;
|
||||
struct Curl_llist_element *n;
|
||||
time_t now = time(NULL);
|
||||
DEBUGASSERT(asi);
|
||||
DEBUGASSERT(srchost);
|
||||
@@ -640,4 +644,4 @@ bool Curl_altsvc_lookup(struct altsvcinfo *asi,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* CURL_DISABLE_HTTP || USE_ALTSVC */
|
||||
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_ALTSVC */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -23,7 +23,7 @@
|
||||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if !defined(CURL_DISABLE_HTTP) && defined(USE_ALTSVC)
|
||||
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_ALTSVC)
|
||||
#include <curl/curl.h>
|
||||
#include "llist.h"
|
||||
|
||||
@@ -46,12 +46,12 @@ struct altsvc {
|
||||
time_t expires;
|
||||
bool persist;
|
||||
int prio;
|
||||
struct curl_llist_element node;
|
||||
struct Curl_llist_element node;
|
||||
};
|
||||
|
||||
struct altsvcinfo {
|
||||
char *filename;
|
||||
struct curl_llist list; /* list of entries */
|
||||
struct Curl_llist list; /* list of entries */
|
||||
long flags; /* the publicly set bitmask */
|
||||
};
|
||||
|
||||
@@ -61,7 +61,7 @@ CURLcode Curl_altsvc_load(struct altsvcinfo *asi, const char *file);
|
||||
CURLcode Curl_altsvc_save(struct Curl_easy *data,
|
||||
struct altsvcinfo *asi, const char *file);
|
||||
CURLcode Curl_altsvc_ctrl(struct altsvcinfo *asi, const long ctrl);
|
||||
void Curl_altsvc_cleanup(struct altsvcinfo *altsvc);
|
||||
void Curl_altsvc_cleanup(struct altsvcinfo **altsvc);
|
||||
CURLcode Curl_altsvc_parse(struct Curl_easy *data,
|
||||
struct altsvcinfo *altsvc, const char *value,
|
||||
enum alpnid srcalpn, const char *srchost,
|
||||
@@ -74,5 +74,6 @@ bool Curl_altsvc_lookup(struct altsvcinfo *asi,
|
||||
#else
|
||||
/* disabled */
|
||||
#define Curl_altsvc_save(a,b,c)
|
||||
#endif /* CURL_DISABLE_HTTP || USE_ALTSVC */
|
||||
#define Curl_altsvc_cleanup(x)
|
||||
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_ALTSVC */
|
||||
#endif /* HEADER_CURL_ALTSVC_H */
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -67,8 +67,8 @@
|
||||
#include "select.h"
|
||||
#include "progress.h"
|
||||
|
||||
# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
|
||||
(defined(WIN32) || defined(__SYMBIAN32__))
|
||||
# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
|
||||
defined(WIN32)
|
||||
# define CARES_STATICLIB
|
||||
# endif
|
||||
# include <ares.h>
|
||||
@@ -85,7 +85,7 @@
|
||||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
struct ResolverResults {
|
||||
struct thread_data {
|
||||
int num_pending; /* number of ares_gethostbyname() requests */
|
||||
struct Curl_addrinfo *temp_ai; /* intermediary result while fetching c-ares
|
||||
parts */
|
||||
@@ -229,8 +229,8 @@ static void destroy_async_data(struct Curl_async *async)
|
||||
{
|
||||
free(async->hostname);
|
||||
|
||||
if(async->os_specific) {
|
||||
struct ResolverResults *res = (struct ResolverResults *)async->os_specific;
|
||||
if(async->tdata) {
|
||||
struct thread_data *res = async->tdata;
|
||||
if(res) {
|
||||
if(res->temp_ai) {
|
||||
Curl_freeaddrinfo(res->temp_ai);
|
||||
@@ -238,7 +238,7 @@ static void destroy_async_data(struct Curl_async *async)
|
||||
}
|
||||
free(res);
|
||||
}
|
||||
async->os_specific = NULL;
|
||||
async->tdata = NULL;
|
||||
}
|
||||
|
||||
async->hostname = NULL;
|
||||
@@ -349,8 +349,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
|
||||
struct Curl_dns_entry **dns)
|
||||
{
|
||||
struct Curl_easy *data = conn->data;
|
||||
struct ResolverResults *res = (struct ResolverResults *)
|
||||
conn->async.os_specific;
|
||||
struct thread_data *res = conn->async.tdata;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
DEBUGASSERT(dns);
|
||||
@@ -498,7 +497,7 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
|
||||
}
|
||||
|
||||
/* Connects results to the list */
|
||||
static void compound_results(struct ResolverResults *res,
|
||||
static void compound_results(struct thread_data *res,
|
||||
struct Curl_addrinfo *ai)
|
||||
{
|
||||
struct Curl_addrinfo *ai_tail;
|
||||
@@ -527,7 +526,7 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */
|
||||
struct hostent *hostent)
|
||||
{
|
||||
struct connectdata *conn = (struct connectdata *)arg;
|
||||
struct ResolverResults *res;
|
||||
struct thread_data *res;
|
||||
|
||||
#ifdef HAVE_CARES_CALLBACK_TIMEOUTS
|
||||
(void)timeouts; /* ignored */
|
||||
@@ -538,7 +537,7 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */
|
||||
be valid so only defer it when we know the 'status' says its fine! */
|
||||
return;
|
||||
|
||||
res = (struct ResolverResults *)conn->async.os_specific;
|
||||
res = conn->async.tdata;
|
||||
if(res) {
|
||||
res->num_pending--;
|
||||
|
||||
@@ -653,20 +652,20 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
||||
|
||||
bufp = strdup(hostname);
|
||||
if(bufp) {
|
||||
struct ResolverResults *res = NULL;
|
||||
struct thread_data *res = NULL;
|
||||
free(conn->async.hostname);
|
||||
conn->async.hostname = bufp;
|
||||
conn->async.port = port;
|
||||
conn->async.done = FALSE; /* not done */
|
||||
conn->async.status = 0; /* clear */
|
||||
conn->async.dns = NULL; /* clear */
|
||||
res = calloc(sizeof(struct ResolverResults), 1);
|
||||
res = calloc(sizeof(struct thread_data), 1);
|
||||
if(!res) {
|
||||
free(conn->async.hostname);
|
||||
conn->async.hostname = NULL;
|
||||
return NULL;
|
||||
}
|
||||
conn->async.os_specific = res;
|
||||
conn->async.tdata = res;
|
||||
|
||||
/* initial status - failed */
|
||||
res->last_status = ARES_ENOTFOUND;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -185,7 +185,7 @@ struct thread_data {
|
||||
|
||||
static struct thread_sync_data *conn_thread_sync_data(struct connectdata *conn)
|
||||
{
|
||||
return &(((struct thread_data *)conn->async.os_specific)->tsd);
|
||||
return &(conn->async.tdata->tsd);
|
||||
}
|
||||
|
||||
/* Destroy resolver thread synchronization data */
|
||||
@@ -294,7 +294,7 @@ static int getaddrinfo_complete(struct connectdata *conn)
|
||||
*/
|
||||
static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg)
|
||||
{
|
||||
struct thread_sync_data *tsd = (struct thread_sync_data*)arg;
|
||||
struct thread_sync_data *tsd = (struct thread_sync_data *)arg;
|
||||
struct thread_data *td = tsd->td;
|
||||
char service[12];
|
||||
int rc;
|
||||
@@ -380,8 +380,8 @@ static unsigned int CURL_STDCALL gethostbyname_thread(void *arg)
|
||||
*/
|
||||
static void destroy_async_data(struct Curl_async *async)
|
||||
{
|
||||
if(async->os_specific) {
|
||||
struct thread_data *td = (struct thread_data*) async->os_specific;
|
||||
if(async->tdata) {
|
||||
struct thread_data *td = async->tdata;
|
||||
int done;
|
||||
#ifdef USE_SOCKETPAIR
|
||||
curl_socket_t sock_rd = td->tsd.sock_pair[0];
|
||||
@@ -406,7 +406,7 @@ static void destroy_async_data(struct Curl_async *async)
|
||||
|
||||
destroy_thread_sync_data(&td->tsd);
|
||||
|
||||
free(async->os_specific);
|
||||
free(async->tdata);
|
||||
}
|
||||
#ifdef USE_SOCKETPAIR
|
||||
/*
|
||||
@@ -418,7 +418,7 @@ static void destroy_async_data(struct Curl_async *async)
|
||||
sclose(sock_rd);
|
||||
#endif
|
||||
}
|
||||
async->os_specific = NULL;
|
||||
async->tdata = NULL;
|
||||
|
||||
free(async->hostname);
|
||||
async->hostname = NULL;
|
||||
@@ -437,7 +437,7 @@ static bool init_resolve_thread(struct connectdata *conn,
|
||||
struct thread_data *td = calloc(1, sizeof(struct thread_data));
|
||||
int err = ENOMEM;
|
||||
|
||||
conn->async.os_specific = (void *)td;
|
||||
conn->async.tdata = td;
|
||||
if(!td)
|
||||
goto errno_exit;
|
||||
|
||||
@@ -448,7 +448,7 @@ static bool init_resolve_thread(struct connectdata *conn,
|
||||
td->thread_hnd = curl_thread_t_null;
|
||||
|
||||
if(!init_thread_sync_data(td, hostname, port, hints)) {
|
||||
conn->async.os_specific = NULL;
|
||||
conn->async.tdata = NULL;
|
||||
free(td);
|
||||
goto errno_exit;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ static CURLcode thread_wait_resolv(struct connectdata *conn,
|
||||
struct Curl_dns_entry **entry,
|
||||
bool report)
|
||||
{
|
||||
struct thread_data *td = (struct thread_data*) conn->async.os_specific;
|
||||
struct thread_data *td = conn->async.tdata;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
DEBUGASSERT(conn && td);
|
||||
@@ -557,7 +557,7 @@ static CURLcode thread_wait_resolv(struct connectdata *conn,
|
||||
*/
|
||||
void Curl_resolver_kill(struct connectdata *conn)
|
||||
{
|
||||
struct thread_data *td = (struct thread_data*) conn->async.os_specific;
|
||||
struct thread_data *td = conn->async.tdata;
|
||||
|
||||
/* If we're still resolving, we must wait for the threads to fully clean up,
|
||||
unfortunately. Otherwise, we can simply cancel to clean up any resolver
|
||||
@@ -596,7 +596,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn,
|
||||
struct Curl_dns_entry **entry)
|
||||
{
|
||||
struct Curl_easy *data = conn->data;
|
||||
struct thread_data *td = (struct thread_data*) conn->async.os_specific;
|
||||
struct thread_data *td = conn->async.tdata;
|
||||
int done = 0;
|
||||
|
||||
DEBUGASSERT(entry);
|
||||
@@ -656,7 +656,7 @@ int Curl_resolver_getsock(struct connectdata *conn,
|
||||
struct Curl_easy *data = conn->data;
|
||||
struct resdata *reslv = (struct resdata *)data->state.resolver;
|
||||
#ifdef USE_SOCKETPAIR
|
||||
struct thread_data *td = (struct thread_data*)conn->async.os_specific;
|
||||
struct thread_data *td = conn->async.tdata;
|
||||
#else
|
||||
(void)socks;
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#if !defined(CURL_DISABLE_HTTP_AUTH) || defined(USE_SSH) || \
|
||||
!defined(CURL_DISABLE_LDAP) || \
|
||||
!defined(CURL_DISABLE_SMTP) || \
|
||||
!defined(CURL_DISABLE_POP3) || \
|
||||
!defined(CURL_DISABLE_IMAP) || \
|
||||
!defined(CURL_DISABLE_DOH) || defined(USE_SSL)
|
||||
|
||||
#include "urldata.h" /* for the Curl_easy definition */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -59,7 +59,7 @@ static CURLcode bundle_create(struct connectbundle **bundlep)
|
||||
(*bundlep)->num_connections = 0;
|
||||
(*bundlep)->multiuse = BUNDLE_UNKNOWN;
|
||||
|
||||
Curl_llist_init(&(*bundlep)->conn_list, (curl_llist_dtor) conn_llist_dtor);
|
||||
Curl_llist_init(&(*bundlep)->conn_list, (Curl_llist_dtor) conn_llist_dtor);
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ static void bundle_add_conn(struct connectbundle *bundle,
|
||||
static int bundle_remove_conn(struct connectbundle *bundle,
|
||||
struct connectdata *conn)
|
||||
{
|
||||
struct curl_llist_element *curr;
|
||||
struct Curl_llist_element *curr;
|
||||
|
||||
curr = bundle->conn_list.head;
|
||||
while(curr) {
|
||||
@@ -206,8 +206,8 @@ static bool conncache_add_bundle(struct conncache *connc,
|
||||
static void conncache_remove_bundle(struct conncache *connc,
|
||||
struct connectbundle *bundle)
|
||||
{
|
||||
struct curl_hash_iterator iter;
|
||||
struct curl_hash_element *he;
|
||||
struct Curl_hash_iterator iter;
|
||||
struct Curl_hash_element *he;
|
||||
|
||||
if(!connc)
|
||||
return;
|
||||
@@ -320,9 +320,9 @@ bool Curl_conncache_foreach(struct Curl_easy *data,
|
||||
void *param,
|
||||
int (*func)(struct connectdata *conn, void *param))
|
||||
{
|
||||
struct curl_hash_iterator iter;
|
||||
struct curl_llist_element *curr;
|
||||
struct curl_hash_element *he;
|
||||
struct Curl_hash_iterator iter;
|
||||
struct Curl_llist_element *curr;
|
||||
struct Curl_hash_element *he;
|
||||
|
||||
if(!connc)
|
||||
return FALSE;
|
||||
@@ -363,15 +363,15 @@ bool Curl_conncache_foreach(struct Curl_easy *data,
|
||||
static struct connectdata *
|
||||
conncache_find_first_connection(struct conncache *connc)
|
||||
{
|
||||
struct curl_hash_iterator iter;
|
||||
struct curl_hash_element *he;
|
||||
struct Curl_hash_iterator iter;
|
||||
struct Curl_hash_element *he;
|
||||
struct connectbundle *bundle;
|
||||
|
||||
Curl_hash_start_iterate(&connc->hash, &iter);
|
||||
|
||||
he = Curl_hash_next_element(&iter);
|
||||
while(he) {
|
||||
struct curl_llist_element *curr;
|
||||
struct Curl_llist_element *curr;
|
||||
bundle = he->ptr;
|
||||
|
||||
curr = bundle->conn_list.head;
|
||||
@@ -429,7 +429,7 @@ struct connectdata *
|
||||
Curl_conncache_extract_bundle(struct Curl_easy *data,
|
||||
struct connectbundle *bundle)
|
||||
{
|
||||
struct curl_llist_element *curr;
|
||||
struct Curl_llist_element *curr;
|
||||
timediff_t highscore = -1;
|
||||
timediff_t score;
|
||||
struct curltime now;
|
||||
@@ -477,9 +477,9 @@ struct connectdata *
|
||||
Curl_conncache_extract_oldest(struct Curl_easy *data)
|
||||
{
|
||||
struct conncache *connc = data->state.conn_cache;
|
||||
struct curl_hash_iterator iter;
|
||||
struct curl_llist_element *curr;
|
||||
struct curl_hash_element *he;
|
||||
struct Curl_hash_iterator iter;
|
||||
struct Curl_llist_element *curr;
|
||||
struct Curl_hash_element *he;
|
||||
timediff_t highscore =- 1;
|
||||
timediff_t score;
|
||||
struct curltime now;
|
||||
@@ -571,9 +571,9 @@ void Curl_conncache_close_all_connections(struct conncache *connc)
|
||||
/* Useful for debugging the connection cache */
|
||||
void Curl_conncache_print(struct conncache *connc)
|
||||
{
|
||||
struct curl_hash_iterator iter;
|
||||
struct curl_llist_element *curr;
|
||||
struct curl_hash_element *he;
|
||||
struct Curl_hash_iterator iter;
|
||||
struct Curl_llist_element *curr;
|
||||
struct Curl_hash_element *he;
|
||||
|
||||
if(!connc)
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
struct conncache {
|
||||
struct curl_hash hash;
|
||||
struct Curl_hash hash;
|
||||
size_t num_conn;
|
||||
long next_connection_id;
|
||||
struct curltime last_cleanup;
|
||||
@@ -66,7 +66,7 @@ struct conncache {
|
||||
struct connectbundle {
|
||||
int multiuse; /* supports multi-use */
|
||||
size_t num_connections; /* Number of connections in the bundle */
|
||||
struct curl_llist conn_list; /* The connectdata members of the bundle */
|
||||
struct Curl_llist conn_list; /* The connectdata members of the bundle */
|
||||
};
|
||||
|
||||
/* returns 1 on error, 0 is fine */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -83,11 +83,6 @@
|
||||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
/* This isn't actually supported under Symbian OS */
|
||||
#undef SO_NOSIGPIPE
|
||||
#endif
|
||||
|
||||
static bool verifyconnect(curl_socket_t sockfd, int *error);
|
||||
|
||||
#if defined(__DragonFly__) || defined(HAVE_WINSOCK_H)
|
||||
@@ -676,59 +671,71 @@ bool Curl_addr2string(struct sockaddr *sa, curl_socklen_t salen,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* retrieves the start/end point information of a socket of an established
|
||||
connection */
|
||||
void Curl_conninfo_remote(struct connectdata *conn, curl_socket_t sockfd)
|
||||
{
|
||||
#ifdef HAVE_GETPEERNAME
|
||||
char buffer[STRERROR_LEN];
|
||||
struct Curl_sockaddr_storage ssrem;
|
||||
curl_socklen_t plen;
|
||||
plen = sizeof(struct Curl_sockaddr_storage);
|
||||
if(getpeername(sockfd, (struct sockaddr*) &ssrem, &plen)) {
|
||||
int error = SOCKERRNO;
|
||||
failf(conn->data, "getpeername() failed with errno %d: %s",
|
||||
error, Curl_strerror(error, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
if(!Curl_addr2string((struct sockaddr*)&ssrem, plen,
|
||||
conn->primary_ip, &conn->primary_port)) {
|
||||
failf(conn->data, "ssrem inet_ntop() failed with errno %d: %s",
|
||||
errno, Curl_strerror(errno, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
|
||||
#else
|
||||
(void)conn;
|
||||
(void)sockfd;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* retrieves the start/end point information of a socket of an established
|
||||
connection */
|
||||
void Curl_conninfo_local(struct connectdata *conn, curl_socket_t sockfd)
|
||||
{
|
||||
#ifdef HAVE_GETSOCKNAME
|
||||
char buffer[STRERROR_LEN];
|
||||
struct Curl_sockaddr_storage ssloc;
|
||||
curl_socklen_t slen;
|
||||
slen = sizeof(struct Curl_sockaddr_storage);
|
||||
memset(&ssloc, 0, sizeof(ssloc));
|
||||
if(getsockname(sockfd, (struct sockaddr*) &ssloc, &slen)) {
|
||||
int error = SOCKERRNO;
|
||||
failf(conn->data, "getsockname() failed with errno %d: %s",
|
||||
error, Curl_strerror(error, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
if(!Curl_addr2string((struct sockaddr*)&ssloc, slen,
|
||||
conn->local_ip, &conn->local_port)) {
|
||||
failf(conn->data, "ssloc inet_ntop() failed with errno %d: %s",
|
||||
errno, Curl_strerror(errno, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
#else
|
||||
(void)conn;
|
||||
(void)sockfd;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* retrieves the start/end point information of a socket of an established
|
||||
connection */
|
||||
void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd)
|
||||
{
|
||||
if(conn->transport == TRNSPRT_TCP) {
|
||||
#if defined(HAVE_GETPEERNAME) || defined(HAVE_GETSOCKNAME)
|
||||
if(!conn->bits.reuse && !conn->bits.tcp_fastopen) {
|
||||
struct Curl_easy *data = conn->data;
|
||||
char buffer[STRERROR_LEN];
|
||||
struct Curl_sockaddr_storage ssrem;
|
||||
struct Curl_sockaddr_storage ssloc;
|
||||
curl_socklen_t plen;
|
||||
curl_socklen_t slen;
|
||||
#ifdef HAVE_GETPEERNAME
|
||||
plen = sizeof(struct Curl_sockaddr_storage);
|
||||
if(getpeername(sockfd, (struct sockaddr*) &ssrem, &plen)) {
|
||||
int error = SOCKERRNO;
|
||||
failf(data, "getpeername() failed with errno %d: %s",
|
||||
error, Curl_strerror(error, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETSOCKNAME
|
||||
slen = sizeof(struct Curl_sockaddr_storage);
|
||||
memset(&ssloc, 0, sizeof(ssloc));
|
||||
if(getsockname(sockfd, (struct sockaddr*) &ssloc, &slen)) {
|
||||
int error = SOCKERRNO;
|
||||
failf(data, "getsockname() failed with errno %d: %s",
|
||||
error, Curl_strerror(error, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETPEERNAME
|
||||
if(!Curl_addr2string((struct sockaddr*)&ssrem, plen,
|
||||
conn->primary_ip, &conn->primary_port)) {
|
||||
failf(data, "ssrem inet_ntop() failed with errno %d: %s",
|
||||
errno, Curl_strerror(errno, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
memcpy(conn->ip_addr_str, conn->primary_ip, MAX_IPADR_LEN);
|
||||
#endif
|
||||
#ifdef HAVE_GETSOCKNAME
|
||||
if(!Curl_addr2string((struct sockaddr*)&ssloc, slen,
|
||||
conn->local_ip, &conn->local_port)) {
|
||||
failf(data, "ssloc inet_ntop() failed with errno %d: %s",
|
||||
errno, Curl_strerror(errno, buffer, sizeof(buffer)));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Curl_conninfo_remote(conn, sockfd);
|
||||
Curl_conninfo_local(conn, sockfd);
|
||||
}
|
||||
#else /* !HAVE_GETSOCKNAME && !HAVE_GETPEERNAME */
|
||||
(void)sockfd; /* unused */
|
||||
#endif
|
||||
} /* end of TCP-only section */
|
||||
|
||||
/* persist connection info in session handle */
|
||||
@@ -746,8 +753,8 @@ static CURLcode connect_SOCKS(struct connectdata *conn, int sockindex,
|
||||
bool *done)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
CURLproxycode pxresult = CURLPX_OK;
|
||||
if(conn->bits.socksproxy) {
|
||||
/* for the secondary socket (FTP), use the "connect to host"
|
||||
* but ignore the "connect to port" (use the secondary port)
|
||||
@@ -767,20 +774,24 @@ static CURLcode connect_SOCKS(struct connectdata *conn, int sockindex,
|
||||
switch(conn->socks_proxy.proxytype) {
|
||||
case CURLPROXY_SOCKS5:
|
||||
case CURLPROXY_SOCKS5_HOSTNAME:
|
||||
result = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd,
|
||||
host, port, sockindex, conn, done);
|
||||
pxresult = Curl_SOCKS5(conn->socks_proxy.user, conn->socks_proxy.passwd,
|
||||
host, port, sockindex, conn, done);
|
||||
break;
|
||||
|
||||
case CURLPROXY_SOCKS4:
|
||||
case CURLPROXY_SOCKS4A:
|
||||
result = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex,
|
||||
conn, done);
|
||||
pxresult = Curl_SOCKS4(conn->socks_proxy.user, host, port, sockindex,
|
||||
conn, done);
|
||||
break;
|
||||
|
||||
default:
|
||||
failf(conn->data, "unknown proxytype option given");
|
||||
result = CURLE_COULDNT_CONNECT;
|
||||
} /* switch proxytype */
|
||||
if(pxresult) {
|
||||
result = CURLE_PROXY;
|
||||
conn->data->info.pxcode = pxresult;
|
||||
}
|
||||
}
|
||||
else
|
||||
#else
|
||||
@@ -1313,10 +1324,9 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||
const struct Curl_dns_entry *remotehost)
|
||||
{
|
||||
struct Curl_easy *data = conn->data;
|
||||
struct curltime before = Curl_now();
|
||||
CURLcode result = CURLE_COULDNT_CONNECT;
|
||||
int i;
|
||||
timediff_t timeout_ms = Curl_timeleft(data, &before, TRUE);
|
||||
timediff_t timeout_ms = Curl_timeleft(data, NULL, TRUE);
|
||||
|
||||
if(timeout_ms < 0) {
|
||||
/* a precaution, no need to continue if time already is up */
|
||||
@@ -1336,8 +1346,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||
|
||||
conn->tempfamily[0] = conn->tempaddr[0]?
|
||||
conn->tempaddr[0]->ai_family:0;
|
||||
#ifdef ENABLE_IPV6
|
||||
conn->tempfamily[1] = conn->tempfamily[0] == AF_INET6 ?
|
||||
AF_INET : AF_INET6;
|
||||
#else
|
||||
conn->tempfamily[1] = AF_UNSPEC;
|
||||
#endif
|
||||
ainext(conn, 1, FALSE); /* assigns conn->tempaddr[1] accordingly */
|
||||
|
||||
DEBUGF(infof(data, "family0 == %s, family1 == %s\n",
|
||||
@@ -1416,8 +1430,7 @@ curl_socket_t Curl_getconnectinfo(struct Curl_easy *data,
|
||||
}
|
||||
return c->sock[FIRSTSOCKET];
|
||||
}
|
||||
else
|
||||
return CURL_SOCKET_BAD;
|
||||
return CURL_SOCKET_BAD;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -75,6 +75,8 @@ void Curl_sndbufset(curl_socket_t sockfd);
|
||||
#endif
|
||||
|
||||
void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd);
|
||||
void Curl_conninfo_remote(struct connectdata *conn, curl_socket_t sockfd);
|
||||
void Curl_conninfo_local(struct connectdata *conn, curl_socket_t sockfd);
|
||||
void Curl_persistconninfo(struct connectdata *conn);
|
||||
int Curl_closesocket(struct connectdata *conn, curl_socket_t sock);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -28,10 +28,6 @@
|
||||
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#include <zlib.h>
|
||||
#ifdef __SYMBIAN32__
|
||||
/* zlib pollutes the namespace with this definition */
|
||||
#undef WIN32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BROTLI
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -1539,7 +1539,7 @@ static int cookie_output(struct Curl_easy *data,
|
||||
}
|
||||
|
||||
fputs("# Netscape HTTP Cookie File\n"
|
||||
"# https://curl.haxx.se/docs/http-cookies.html\n"
|
||||
"# https://curl.se/docs/http-cookies.html\n"
|
||||
"# This file was generated by libcurl! Edit at your own risk.\n\n",
|
||||
out);
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -56,8 +56,8 @@
|
||||
/* to disable LDAPS */
|
||||
#cmakedefine CURL_DISABLE_LDAPS 1
|
||||
|
||||
/* to enable MQTT */
|
||||
#undef CURL_ENABLE_MQTT
|
||||
/* to disable MQTT */
|
||||
#cmakedefine CURL_DISABLE_MQTT 1
|
||||
|
||||
/* to disable POP3 */
|
||||
#cmakedefine CURL_DISABLE_POP3 1
|
||||
@@ -388,8 +388,11 @@
|
||||
/* Define to 1 if you have the <libgen.h> header file. */
|
||||
#cmakedefine HAVE_LIBGEN_H 1
|
||||
|
||||
/* Define to 1 if you have the `idn' library (-lidn). */
|
||||
#cmakedefine HAVE_LIBIDN 1
|
||||
/* Define to 1 if you have the `idn2' library (-lidn2). */
|
||||
#cmakedefine HAVE_LIBIDN2 1
|
||||
|
||||
/* Define to 1 if you have the idn2.h header file. */
|
||||
#cmakedefine HAVE_IDN2_H 1
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#cmakedefine HAVE_LIBRESOLV 1
|
||||
@@ -462,6 +465,9 @@
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#cmakedefine HAVE_NETINET_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the <linux/tcp.h> header file. */
|
||||
#cmakedefine HAVE_LINUX_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#cmakedefine HAVE_NET_IF_H 1
|
||||
|
||||
@@ -1017,8 +1023,8 @@ ${SIZEOF_TIME_T_CODE}
|
||||
/* if Unix domain sockets are enabled */
|
||||
#cmakedefine USE_UNIX_SOCKETS
|
||||
|
||||
/* to enable alt-svc */
|
||||
#cmakedefine USE_ALTSVC 1
|
||||
/* to disable alt-svc */
|
||||
#cmakedefine CURL_DISABLE_ALTSVC 1
|
||||
|
||||
/* to enable SSPI support */
|
||||
#cmakedefine USE_WINDOWS_SSPI 1
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2015 - 2019, Steve Holme, <steve_holme@hotmail.com>.
|
||||
* Copyright (C) 2015 - 2020, Steve Holme, <steve_holme@hotmail.com>.
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2015 - 2019, Steve Holme, <steve_holme@hotmail.com>.
|
||||
* Copyright (C) 2015 - 2020, Steve Holme, <steve_holme@hotmail.com>.
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \
|
||||
defined(USE_HSTS)
|
||||
|
||||
#include "curl_get_line.h"
|
||||
#include "curl_memory.h"
|
||||
/* The last #include file should be: */
|
||||
@@ -53,3 +56,5 @@ char *Curl_get_line(char *buf, int len, FILE *input)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* if not disabled */
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -48,7 +48,7 @@
|
||||
* For libcurl static library release builds no overriding takes place.
|
||||
*/
|
||||
|
||||
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen)
|
||||
int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen)
|
||||
{
|
||||
#ifndef HAVE_GETHOSTNAME
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -26,6 +26,6 @@
|
||||
#define HOSTNAME_MAX 1024
|
||||
|
||||
/* This returns the local machine's un-qualified hostname */
|
||||
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
|
||||
int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen);
|
||||
|
||||
#endif /* HEADER_CURL_GETHOSTNAME_H */
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2011 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2011 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2011 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef HEADER_CURL_SECURITY_H
|
||||
#define HEADER_CURL_SECURITY_H
|
||||
#ifndef HEADER_CURL_KRB5_H
|
||||
#define HEADER_CURL_KRB5_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -44,8 +44,8 @@ int Curl_sec_read_msg(struct connectdata *conn, char *,
|
||||
void Curl_sec_end(struct connectdata *);
|
||||
CURLcode Curl_sec_login(struct connectdata *);
|
||||
int Curl_sec_request_prot(struct connectdata *conn, const char *level);
|
||||
|
||||
extern struct Curl_sec_client_mech Curl_krb5_client_mech;
|
||||
#else
|
||||
#define Curl_sec_end(x)
|
||||
#endif
|
||||
|
||||
#endif /* HEADER_CURL_SECURITY_H */
|
||||
#endif /* HEADER_CURL_KRB5_H */
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if defined(USE_NTLM)
|
||||
#if defined(USE_CURL_NTLM_CORE)
|
||||
|
||||
/*
|
||||
* NTLM details:
|
||||
@@ -50,8 +50,6 @@
|
||||
in NTLM type-3 messages.
|
||||
*/
|
||||
|
||||
#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
|
||||
|
||||
#if defined(USE_OPENSSL) || defined(USE_WOLFSSL)
|
||||
|
||||
#ifdef USE_WOLFSSL
|
||||
@@ -582,15 +580,11 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen,
|
||||
unsigned char *identity;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
/* we do the length checks below separately to avoid integer overflow risk
|
||||
on extreme data lengths */
|
||||
if((userlen > SIZE_T_MAX/2) ||
|
||||
(domlen > SIZE_T_MAX/2) ||
|
||||
((userlen + domlen) > SIZE_T_MAX/2))
|
||||
if((userlen > CURL_MAX_INPUT_LENGTH) || (domlen > CURL_MAX_INPUT_LENGTH))
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
identity_len = (userlen + domlen) * 2;
|
||||
identity = malloc(identity_len);
|
||||
identity = malloc(identity_len + 1);
|
||||
|
||||
if(!identity)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
@@ -744,6 +738,4 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
|
||||
|
||||
#endif /* USE_NTRESPONSES */
|
||||
|
||||
#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
|
||||
|
||||
#endif /* USE_NTLM */
|
||||
#endif /* USE_CURL_NTLM_CORE */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if defined(USE_NTLM)
|
||||
#if defined(USE_CURL_NTLM_CORE)
|
||||
|
||||
/* If NSS is the first available SSL backend (see order in curl_ntlm_core.c)
|
||||
then it must be initialized to be used by NTLM. */
|
||||
@@ -36,8 +36,6 @@
|
||||
#define NTLM_NEEDS_NSS_INIT
|
||||
#endif
|
||||
|
||||
#if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
|
||||
|
||||
#if defined(USE_OPENSSL) || defined(USE_WOLFSSL)
|
||||
#ifdef USE_WOLFSSL
|
||||
# include <wolfssl/options.h>
|
||||
@@ -102,8 +100,6 @@ CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
|
||||
|
||||
#endif /* USE_NTRESPONSES */
|
||||
|
||||
#endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
|
||||
|
||||
#endif /* USE_NTLM */
|
||||
#endif /* USE_CURL_NTLM_CORE */
|
||||
|
||||
#endif /* HEADER_CURL_NTLM_CORE_H */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -168,7 +168,7 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir)
|
||||
*cpp = cp + i + strspn(cp + i, WHITESPACE);
|
||||
}
|
||||
else {
|
||||
/* Read to end of filename - either to white space or terminator */
|
||||
/* Read to end of filename - either to whitespace or terminator */
|
||||
end = strpbrk(cp, WHITESPACE);
|
||||
if(end == NULL)
|
||||
end = strchr(cp, '\0');
|
||||
@@ -184,7 +184,7 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir)
|
||||
(*path)[pathLength] = '\0';
|
||||
cp += 3;
|
||||
}
|
||||
/* Copy path name up until first "white space" */
|
||||
/* Copy path name up until first "whitespace" */
|
||||
memcpy(&(*path)[pathLength], cp, (int)(end - cp));
|
||||
pathLength += (int)(end - cp);
|
||||
(*path)[pathLength] = '\0';
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2012 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2010, Howard Chu, <hyc@highlandsun.com>
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -79,6 +79,7 @@ const struct Curl_handler Curl_handler_rtmp = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMP, /* defport */
|
||||
CURLPROTO_RTMP, /* protocol */
|
||||
CURLPROTO_RTMP, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
@@ -100,6 +101,7 @@ const struct Curl_handler Curl_handler_rtmpt = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMPT, /* defport */
|
||||
CURLPROTO_RTMPT, /* protocol */
|
||||
CURLPROTO_RTMPT, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
@@ -121,6 +123,7 @@ const struct Curl_handler Curl_handler_rtmpe = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMP, /* defport */
|
||||
CURLPROTO_RTMPE, /* protocol */
|
||||
CURLPROTO_RTMPE, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
@@ -142,6 +145,7 @@ const struct Curl_handler Curl_handler_rtmpte = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMPT, /* defport */
|
||||
CURLPROTO_RTMPTE, /* protocol */
|
||||
CURLPROTO_RTMPTE, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
@@ -163,6 +167,7 @@ const struct Curl_handler Curl_handler_rtmps = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMPS, /* defport */
|
||||
CURLPROTO_RTMPS, /* protocol */
|
||||
CURLPROTO_RTMP, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
@@ -184,6 +189,7 @@ const struct Curl_handler Curl_handler_rtmpts = {
|
||||
ZERO_NULL, /* connection_check */
|
||||
PORT_RTMPS, /* defport */
|
||||
CURLPROTO_RTMPTS, /* protocol */
|
||||
CURLPROTO_RTMPT, /* family */
|
||||
PROTOPT_NONE /* flags*/
|
||||
};
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2010 - 2019, Howard Chu, <hyc@highlandsun.com>
|
||||
* Copyright (C) 2010 - 2020, Howard Chu, <hyc@highlandsun.com>
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2012 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -38,8 +38,7 @@
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
|
||||
!defined(__SYMBIAN32__)
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
@@ -88,10 +87,6 @@
|
||||
# include "config-amigaos.h"
|
||||
#endif
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
# include "config-symbian.h"
|
||||
#endif
|
||||
|
||||
#ifdef __OS400__
|
||||
# include "config-os400.h"
|
||||
#endif
|
||||
@@ -247,7 +242,7 @@
|
||||
* interface doesn't support IPv4, but supports IPv6, NAT64, and DNS64,
|
||||
* performing this task will result in a synthesized IPv6 address.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && !defined(USE_ARES)
|
||||
#define USE_RESOLVE_ON_IPS 1
|
||||
#endif
|
||||
|
||||
@@ -286,10 +281,16 @@
|
||||
# include <exec/execbase.h>
|
||||
# include <proto/exec.h>
|
||||
# include <proto/dos.h>
|
||||
# include <unistd.h>
|
||||
# ifdef HAVE_PROTO_BSDSOCKET_H
|
||||
# include <proto/bsdsocket.h> /* ensure bsdsocket.library use */
|
||||
# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
|
||||
# endif
|
||||
/*
|
||||
* In clib2 arpa/inet.h warns that some prototypes may clash
|
||||
* with bsdsocket.library. This avoids the definition of those.
|
||||
*/
|
||||
# define __NO_NET_API
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -574,14 +575,6 @@
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* When using WINSOCK, TELNET protocol requires WINSOCK2 API.
|
||||
*/
|
||||
|
||||
#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
|
||||
# define CURL_DISABLE_TELNET 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* msvc 6.0 does not have struct sockaddr_storage and
|
||||
* does not define IPPROTO_ESP in winsock2.h. But both
|
||||
@@ -652,19 +645,22 @@ int netware_init(void);
|
||||
|
||||
/* Single point where USE_NTLM definition might be defined */
|
||||
#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH)
|
||||
#if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \
|
||||
#if defined(USE_OPENSSL) || defined(USE_MBEDTLS) || \
|
||||
defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_SECTRANSP) || \
|
||||
defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) || \
|
||||
defined(USE_MBEDTLS) || \
|
||||
(defined(USE_WOLFSSL) && defined(HAVE_WOLFSSL_DES_ECB_ENCRYPT))
|
||||
|
||||
#define USE_NTLM
|
||||
#define USE_CURL_NTLM_CORE
|
||||
|
||||
# if defined(USE_MBEDTLS)
|
||||
/* Get definition of MBEDTLS_MD4_C */
|
||||
# include <mbedtls/md4.h>
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(USE_CURL_NTLM_CORE) || defined(USE_WINDOWS_SSPI)
|
||||
#define USE_NTLM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -717,7 +713,7 @@ int netware_init(void);
|
||||
defined(HAVE_WINSOCK_H) || \
|
||||
defined(HAVE_WINSOCK2_H) || \
|
||||
defined(HAVE_WS2TCPIP_H)
|
||||
# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
|
||||
# error "WinSock and lwIP TCP/IP stack definitions shall not coexist!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 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.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
@@ -41,14 +41,14 @@
|
||||
|
||||
#if defined(USE_THREADS_POSIX)
|
||||
|
||||
struct curl_actual_call {
|
||||
struct Curl_actual_call {
|
||||
unsigned int (*func)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
static void *curl_thread_create_thunk(void *arg)
|
||||
{
|
||||
struct curl_actual_call *ac = arg;
|
||||
struct Curl_actual_call *ac = arg;
|
||||
unsigned int (*func)(void *) = ac->func;
|
||||
void *real_arg = ac->arg;
|
||||
|
||||
@@ -62,7 +62,7 @@ static void *curl_thread_create_thunk(void *arg)
|
||||
curl_thread_t Curl_thread_create(unsigned int (*func) (void *), void *arg)
|
||||
{
|
||||
curl_thread_t t = malloc(sizeof(pthread_t));
|
||||
struct curl_actual_call *ac = malloc(sizeof(struct curl_actual_call));
|
||||
struct Curl_actual_call *ac = malloc(sizeof(struct Curl_actual_call));
|
||||
if(!(ac && t))
|
||||
goto err;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
* 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user