Skip to content

Commit 878bc9f

Browse files
laramielcopybara-github
authored andcommitted
Update curl to 8.18
PiperOrigin-RevId: 867833514 Change-Id: Ibbec99aee4c72d19e9d706514f621636b12ae969
1 parent cf37e9f commit 878bc9f

File tree

3 files changed

+47
-72
lines changed

3 files changed

+47
-72
lines changed

third_party/curl/config/curl_config.h

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
#ifndef EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_
22
#define EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_
33

4-
#if !defined(_WIN32) && !defined(__APPLE__)
5-
#include <openssl/opensslv.h>
6-
#if defined(OPENSSL_IS_BORINGSSL)
7-
#define HAVE_BORINGSSL 1
8-
#define HAVE_OPENSSL_CRYPTO_H 1
9-
#define HAVE_OPENSSL_ERR_H 1
10-
#define HAVE_OPENSSL_PEM_H 1
11-
#define HAVE_OPENSSL_PKCS12_H 1
12-
#define HAVE_OPENSSL_RSA_H 1
13-
#define HAVE_OPENSSL_SRP 1
14-
#define HAVE_OPENSSL_SSL_H 1
15-
#define HAVE_OPENSSL_X509_H 1
16-
#endif
17-
#endif
18-
194
#define CURL_DISABLE_AWS 1
205
#define CURL_DISABLE_DICT 1
216
#define CURL_DISABLE_FILE 1
@@ -39,6 +24,7 @@
3924
#define CURL_DISABLE_WEBSOCKETS 1
4025

4126
#define USE_NGHTTP2 1
27+
#define USE_IPV6 1
4228

4329
#if defined(_WIN32)
4430
#include "lib/config-win32.h"
@@ -55,7 +41,8 @@
5541
#define HAVE_SYS_FILIO_H 1
5642
#define HAVE_SYS_SOCKIO_H 1
5743
#define CURL_OS "x86_64-apple-darwin15.5.0"
58-
#define USE_SECTRANSP 1
44+
#define HAVE_LIBSSL 1
45+
#define USE_OPENSSL 1
5946
#else
6047
/* # undef CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt" */
6148
#define GETSERVBYPORT_R_ARGS 6
@@ -69,7 +56,6 @@
6956
#define HAVE_GETHOSTBYNAME_R 1
7057
#define HAVE_GETHOSTBYNAME_R_6 1
7158
#define HAVE_GETSERVBYPORT_R 1
72-
#define HAVE_LIBSSL 1
7359
#define HAVE_MALLOC_H 1
7460
#define HAVE_MSG_NOSIGNAL 1
7561
#define HAVE_LINUX_TCP_H 1
@@ -81,6 +67,7 @@
8167
#define HAVE_TERMIOS_H 1
8268
#define CURL_OS "x86_64-pc-linux-gnu"
8369
#define RANDOM_FILE "/dev/urandom"
70+
#define HAVE_LIBSSL 1
8471
#define USE_OPENSSL 1
8572
#endif
8673

@@ -225,16 +212,6 @@
225212
#define HAVE_ZSTD 1
226213
#define HAVE_ZSTD_H 1
227214
#define LT_OBJDIR ".libs/"
228-
#define PACKAGE "curl"
229-
#define PACKAGE_BUGREPORT \
230-
"a suitable curl mailing list: https://curl.haxx.se/mail/"
231-
232-
233-
#define PACKAGE_NAME "curl"
234-
#define PACKAGE_STRING "curl -"
235-
#define PACKAGE_TARNAME "curl"
236-
#define PACKAGE_URL ""
237-
#define PACKAGE_VERSION "-"
238215
#define RECV_TYPE_ARG1 int
239216
#define RECV_TYPE_ARG2 void*
240217
#define RECV_TYPE_ARG3 size_t
@@ -264,11 +241,37 @@
264241
#define STDC_HEADERS 1
265242
#define STRERROR_R_TYPE_ARG3 size_t
266243
#define TIME_WITH_SYS_TIME 1
267-
#define VERSION "-"
268244

269245
#ifndef _DARWIN_USE_64_BIT_INODE
270246
#define _DARWIN_USE_64_BIT_INODE 1
271247
#endif
272248
#endif
273249

274-
#endif // EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_
250+
#if defined(HAVE_LIBSSL) && defined(USE_OPENSSL)
251+
#include <openssl/opensslv.h>
252+
#if defined(OPENSSL_IS_BORINGSSL)
253+
#define HAVE_BORINGSSL 1
254+
#define HAVE_OPENSSL_CRYPTO_H 1
255+
#define HAVE_OPENSSL_ERR_H 1
256+
#define HAVE_OPENSSL_PEM_H 1
257+
#define HAVE_OPENSSL_PKCS12_H 1
258+
#define HAVE_OPENSSL_RSA_H 1
259+
#define HAVE_OPENSSL_SRP 1
260+
#define HAVE_OPENSSL_SSL_H 1
261+
#define HAVE_OPENSSL_X509_H 1
262+
// #define HAVE_SSL_SET0_WBIO 1
263+
// #define HAVE_SSL_SET_QUIC_TLS_CBS 1
264+
#endif
265+
#endif
266+
267+
#define PACKAGE "curl"
268+
#define PACKAGE_NAME "curl"
269+
#define PACKAGE_STRING "curl -"
270+
#define PACKAGE_TARNAME "curl"
271+
#define PACKAGE_URL ""
272+
#define PACKAGE_VERSION "-"
273+
#define VERSION "-"
274+
#define PACKAGE_BUGREPORT \
275+
"a suitable curl mailing list: https://curl.haxx.se/mail/"
276+
277+
#endif // EXTERNAL_CURL_INCLUDE_CURL_CONFIG_H_

third_party/curl/curl.BUILD.bazel

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -60,45 +60,15 @@ LOCAL_DEFINES = (
6060

6161
cc_library(
6262
name = "curl",
63-
srcs = glob(
64-
include = [
65-
"lib/**/*.c",
66-
],
67-
exclude = [
68-
"lib/socks_sspi.c",
69-
"lib/system_win32.c",
70-
"lib/vauth/spnego_sspi.c",
71-
"lib/vtls/openssl.c",
72-
"lib/vtls/schannel.c",
73-
"lib/vtls/schannel_verify.c",
74-
"lib/vtls/sectransp.c",
75-
],
76-
) +
77-
select(
78-
{
79-
"@platforms//os:osx": [
80-
"lib/vtls/sectransp.c",
81-
],
82-
"@platforms//os:ios": [
83-
"lib/vtls/sectransp.c",
84-
],
85-
"@platforms//os:windows": [
86-
"lib/socks_sspi.c",
87-
"lib/system_win32.c",
88-
"lib/vauth/spnego_sspi.c",
89-
"lib/vtls/schannel.c",
90-
"lib/vtls/schannel_verify.c",
91-
],
92-
"//conditions:default": [
93-
"lib/vtls/openssl.c",
94-
],
95-
},
96-
),
97-
hdrs = glob(
98-
[
99-
"include/curl/*.h",
100-
],
101-
) + [
63+
srcs = glob([
64+
"lib/*.c",
65+
"lib/vssh/*.c",
66+
"lib/vquic/*.c",
67+
"lib/vtls/*.c",
68+
"lib/vauth/*.c",
69+
"lib/curlx/*.c",
70+
]),
71+
hdrs = glob(["include/curl/*.h"]) + [
10272
"include/curl_config.h",
10373
],
10474
copts = select(
@@ -152,6 +122,7 @@ cc_library(
152122
"-DEFAULTLIB:crypt32.lib",
153123
"-DEFAULTLIB:Normaliz.lib",
154124
"-DEFAULTLIB:bcrypt.lib",
125+
"-DEFAULTLIB:Secur32.lib",
155126
],
156127
"//conditions:default": [
157128
"-lrt",
@@ -166,6 +137,7 @@ cc_library(
166137
"-lcrypt32",
167138
"-lNormaliz",
168139
"-lbcrypt",
140+
"-lSecur32",
169141
],
170142
"//conditions:default": [],
171143
},

third_party/curl/workspace.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ def repo():
2626
third_party_http_archive,
2727
name = "curl",
2828
doc_name = "curl",
29-
doc_version = "8.13.0",
29+
doc_version = "8.18.0",
3030
doc_homepage = "https://curl.se/",
31-
strip_prefix = "curl-8.13.0",
32-
urls = mirror_url("https://curl.se/download/curl-8.13.0.tar.gz"),
33-
sha256 = "c261a4db579b289a7501565497658bbd52d3138fdbaccf1490fa918129ab45bc",
31+
strip_prefix = "curl-8.18.0",
32+
urls = mirror_url("https://curl.se/download/curl-8.18.0.tar.gz"),
33+
sha256 = "e9274a5f8ab5271c0e0e6762d2fce194d5f98acc568e4ce816845b2dcc0cf88f",
3434
build_file = Label("//third_party:curl/curl.BUILD.bazel"),
3535
system_build_file = Label("//third_party:curl/system.BUILD.bazel"),
3636
cmake_name = "CURL",

0 commit comments

Comments
 (0)