Skip to content

Commit e954a24

Browse files
committed
Rolls BoringSSL forward
to: https://boringssl.googlesource.com/boringssl/+/c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 This change also prunes unneeded stuff from our boringssl gyp files. related #26343, #25630, #25256 fixes #25647, #24321 [email protected], [email protected] Review URL: https://codereview.chromium.org/1924693003 .
1 parent ff1b117 commit e954a24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+21401
-8705
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ vars = {
3737
"barback_tag" : "@0.15.2+7",
3838
"bazel_worker_tag": "@v0.1.0",
3939
"boolean_selector_tag" : "@1.0.0",
40-
"boringssl_rev" : "@daeafc22c66ad48f6b32fc8d3362eb9ba31b774e",
40+
"boringssl_rev" : "@c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9",
4141
"charcode_tag": "@1.1.0",
4242
"chrome_rev" : "@19997",
4343
"cli_util_tag" : "@0.0.1+2",

third_party/boringssl/BUILD.gn

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ config("internal_config") {
2020
defines = [
2121
"BORINGSSL_IMPLEMENTATION",
2222
"BORINGSSL_NO_STATIC_INITIALIZER",
23-
"OPENSSL_SMALL_FOOTPRINT",
23+
"OPENSSL_SMALL",
2424
]
2525
}
2626

@@ -44,13 +44,8 @@ boringssl_sources =
4444
source_set("boringssl_asm") {
4545
visibility = [ ":*" ] # Only targets in this file can depend on this.
4646
sources = []
47-
#asmflags = []
4847
include_dirs = [
4948
"src/include",
50-
# This is for arm_arch.h, which is needed by some asm files. Since the
51-
# asm files are generated and kept in a different directory, they
52-
# cannot use relative paths to find this file.
53-
"src/crypto",
5449
]
5550

5651
if (current_cpu == "x64") {

third_party/boringssl/boringssl.gypi

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
{
88
'variables': {
99
'boringssl_ssl_sources': [
10+
'src/ssl/custom_extensions.c',
1011
'src/ssl/d1_both.c',
1112
'src/ssl/d1_clnt.c',
1213
'src/ssl/d1_lib.c',
1314
'src/ssl/d1_meth.c',
1415
'src/ssl/d1_pkt.c',
1516
'src/ssl/d1_srtp.c',
1617
'src/ssl/d1_srvr.c',
18+
'src/ssl/dtls_record.c',
1719
'src/ssl/pqueue/pqueue.c',
1820
'src/ssl/s3_both.c',
1921
'src/ssl/s3_clnt.c',
@@ -23,18 +25,19 @@
2325
'src/ssl/s3_pkt.c',
2426
'src/ssl/s3_srvr.c',
2527
'src/ssl/ssl_aead_ctx.c',
26-
'src/ssl/ssl_algs.c',
2728
'src/ssl/ssl_asn1.c',
29+
'src/ssl/ssl_buffer.c',
2830
'src/ssl/ssl_cert.c',
2931
'src/ssl/ssl_cipher.c',
32+
'src/ssl/ssl_ecdh.c',
33+
'src/ssl/ssl_file.c',
3034
'src/ssl/ssl_lib.c',
3135
'src/ssl/ssl_rsa.c',
32-
'src/ssl/ssl_sess.c',
36+
'src/ssl/ssl_session.c',
3337
'src/ssl/ssl_stat.c',
34-
'src/ssl/ssl_txt.c',
3538
'src/ssl/t1_enc.c',
3639
'src/ssl/t1_lib.c',
37-
'src/ssl/t1_reneg.c',
40+
'src/ssl/tls_record.c',
3841
],
3942
'boringssl_crypto_sources': [
4043
'err_data.c',
@@ -92,6 +95,7 @@
9295
'src/crypto/bn/add.c',
9396
'src/crypto/bn/asm/x86_64-gcc.c',
9497
'src/crypto/bn/bn.c',
98+
'src/crypto/bn/bn_asn1.c',
9599
'src/crypto/bn/cmp.c',
96100
'src/crypto/bn/convert.c',
97101
'src/crypto/bn/ctx.c',
@@ -108,6 +112,7 @@
108112
'src/crypto/bn/shift.c',
109113
'src/crypto/bn/sqrt.c',
110114
'src/crypto/buf/buf.c',
115+
'src/crypto/bytestring/asn1_compat.c',
111116
'src/crypto/bytestring/ber.c',
112117
'src/crypto/bytestring/cbb.c',
113118
'src/crypto/bytestring/cbs.c',
@@ -130,25 +135,27 @@
130135
'src/crypto/cpu-arm.c',
131136
'src/crypto/cpu-intel.c',
132137
'src/crypto/crypto.c',
138+
'src/crypto/curve25519/curve25519.c',
139+
'src/crypto/curve25519/x25519-x86_64.c',
133140
'src/crypto/des/des.c',
134141
'src/crypto/dh/check.c',
135142
'src/crypto/dh/dh.c',
136143
'src/crypto/dh/dh_asn1.c',
137-
'src/crypto/dh/dh_impl.c',
138144
'src/crypto/dh/params.c',
139145
'src/crypto/digest/digest.c',
140146
'src/crypto/digest/digests.c',
141147
'src/crypto/directory_posix.c',
142148
'src/crypto/directory_win.c',
143149
'src/crypto/dsa/dsa.c',
144150
'src/crypto/dsa/dsa_asn1.c',
145-
'src/crypto/dsa/dsa_impl.c',
146151
'src/crypto/ec/ec.c',
147152
'src/crypto/ec/ec_asn1.c',
148153
'src/crypto/ec/ec_key.c',
149154
'src/crypto/ec/ec_montgomery.c',
150155
'src/crypto/ec/oct.c',
156+
'src/crypto/ec/p224-64.c',
151157
'src/crypto/ec/p256-64.c',
158+
'src/crypto/ec/p256-x86_64.c',
152159
'src/crypto/ec/simple.c',
153160
'src/crypto/ec/util-64.c',
154161
'src/crypto/ec/wnaf.c',
@@ -158,9 +165,9 @@
158165
'src/crypto/engine/engine.c',
159166
'src/crypto/err/err.c',
160167
'src/crypto/evp/algorithm.c',
161-
'src/crypto/evp/asn1.c',
162168
'src/crypto/evp/digestsign.c',
163169
'src/crypto/evp/evp.c',
170+
'src/crypto/evp/evp_asn1.c',
164171
'src/crypto/evp/evp_ctx.c',
165172
'src/crypto/evp/p_dsa_asn1.c',
166173
'src/crypto/evp/p_ec.c',
@@ -198,7 +205,6 @@
198205
'src/crypto/poly1305/poly1305.c',
199206
'src/crypto/poly1305/poly1305_arm.c',
200207
'src/crypto/poly1305/poly1305_vec.c',
201-
'src/crypto/rand/hwrand.c',
202208
'src/crypto/rand/rand.c',
203209
'src/crypto/rand/urandom.c',
204210
'src/crypto/rand/windows.c',
@@ -303,6 +309,7 @@
303309
],
304310
'boringssl_linux_aarch64_sources': [
305311
'linux-aarch64/crypto/aes/aesv8-armx64.S',
312+
'linux-aarch64/crypto/bn/armv8-mont.S',
306313
'linux-aarch64/crypto/modes/ghashv8-armx64.S',
307314
'linux-aarch64/crypto/sha/sha1-armv8.S',
308315
'linux-aarch64/crypto/sha/sha256-armv8.S',
@@ -320,6 +327,7 @@
320327
'linux-arm/crypto/sha/sha512-armv4.S',
321328
'src/crypto/chacha/chacha_vec_arm.S',
322329
'src/crypto/cpu-arm-asm.S',
330+
'src/crypto/curve25519/asm/x25519-asm-arm.S',
323331
'src/crypto/poly1305/poly1305_arm_asm.S',
324332
],
325333
'boringssl_linux_x86_sources': [
@@ -329,7 +337,6 @@
329337
'linux-x86/crypto/bn/bn-586.S',
330338
'linux-x86/crypto/bn/co-586.S',
331339
'linux-x86/crypto/bn/x86-mont.S',
332-
'linux-x86/crypto/cpu-x86-asm.S',
333340
'linux-x86/crypto/md5/md5-586.S',
334341
'linux-x86/crypto/modes/ghash-x86.S',
335342
'linux-x86/crypto/rc4/rc4-586.S',
@@ -346,16 +353,16 @@
346353
'linux-x86_64/crypto/bn/rsaz-x86_64.S',
347354
'linux-x86_64/crypto/bn/x86_64-mont.S',
348355
'linux-x86_64/crypto/bn/x86_64-mont5.S',
349-
'linux-x86_64/crypto/cpu-x86_64-asm.S',
356+
'linux-x86_64/crypto/ec/p256-x86_64-asm.S',
350357
'linux-x86_64/crypto/md5/md5-x86_64.S',
351358
'linux-x86_64/crypto/modes/aesni-gcm-x86_64.S',
352359
'linux-x86_64/crypto/modes/ghash-x86_64.S',
353360
'linux-x86_64/crypto/rand/rdrand-x86_64.S',
354-
'linux-x86_64/crypto/rc4/rc4-md5-x86_64.S',
355361
'linux-x86_64/crypto/rc4/rc4-x86_64.S',
356362
'linux-x86_64/crypto/sha/sha1-x86_64.S',
357363
'linux-x86_64/crypto/sha/sha256-x86_64.S',
358364
'linux-x86_64/crypto/sha/sha512-x86_64.S',
365+
'src/crypto/curve25519/asm/x25519-asm-x86_64.S',
359366
],
360367
'boringssl_mac_x86_sources': [
361368
'mac-x86/crypto/aes/aes-586.S',
@@ -364,7 +371,6 @@
364371
'mac-x86/crypto/bn/bn-586.S',
365372
'mac-x86/crypto/bn/co-586.S',
366373
'mac-x86/crypto/bn/x86-mont.S',
367-
'mac-x86/crypto/cpu-x86-asm.S',
368374
'mac-x86/crypto/md5/md5-586.S',
369375
'mac-x86/crypto/modes/ghash-x86.S',
370376
'mac-x86/crypto/rc4/rc4-586.S',
@@ -381,12 +387,11 @@
381387
'mac-x86_64/crypto/bn/rsaz-x86_64.S',
382388
'mac-x86_64/crypto/bn/x86_64-mont.S',
383389
'mac-x86_64/crypto/bn/x86_64-mont5.S',
384-
'mac-x86_64/crypto/cpu-x86_64-asm.S',
390+
'mac-x86_64/crypto/ec/p256-x86_64-asm.S',
385391
'mac-x86_64/crypto/md5/md5-x86_64.S',
386392
'mac-x86_64/crypto/modes/aesni-gcm-x86_64.S',
387393
'mac-x86_64/crypto/modes/ghash-x86_64.S',
388394
'mac-x86_64/crypto/rand/rdrand-x86_64.S',
389-
'mac-x86_64/crypto/rc4/rc4-md5-x86_64.S',
390395
'mac-x86_64/crypto/rc4/rc4-x86_64.S',
391396
'mac-x86_64/crypto/sha/sha1-x86_64.S',
392397
'mac-x86_64/crypto/sha/sha256-x86_64.S',
@@ -399,7 +404,6 @@
399404
'win-x86/crypto/bn/bn-586.asm',
400405
'win-x86/crypto/bn/co-586.asm',
401406
'win-x86/crypto/bn/x86-mont.asm',
402-
'win-x86/crypto/cpu-x86-asm.asm',
403407
'win-x86/crypto/md5/md5-586.asm',
404408
'win-x86/crypto/modes/ghash-x86.asm',
405409
'win-x86/crypto/rc4/rc4-586.asm',
@@ -416,12 +420,11 @@
416420
'win-x86_64/crypto/bn/rsaz-x86_64.asm',
417421
'win-x86_64/crypto/bn/x86_64-mont.asm',
418422
'win-x86_64/crypto/bn/x86_64-mont5.asm',
419-
'win-x86_64/crypto/cpu-x86_64-asm.asm',
423+
'win-x86_64/crypto/ec/p256-x86_64-asm.asm',
420424
'win-x86_64/crypto/md5/md5-x86_64.asm',
421425
'win-x86_64/crypto/modes/aesni-gcm-x86_64.asm',
422426
'win-x86_64/crypto/modes/ghash-x86_64.asm',
423427
'win-x86_64/crypto/rand/rdrand-x86_64.asm',
424-
'win-x86_64/crypto/rc4/rc4-md5-x86_64.asm',
425428
'win-x86_64/crypto/rc4/rc4-x86_64.asm',
426429
'win-x86_64/crypto/sha/sha1-x86_64.asm',
427430
'win-x86_64/crypto/sha/sha256-x86_64.asm',

third_party/boringssl/boringssl_configurations.gypi

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,10 @@
44

55
# This file is included to modify the configurations to build third-party
66
# code from BoringSSL.
7-
# This code is C code, not C++, and is not warning-free, so we need to remove
8-
# C++-specific flags, and add flags to supress the warnings in the code.
97
{
10-
'variables': {
11-
# Used by third_party/nss, which is from Chromium.
12-
# Include the built-in set of root certificate authorities.
13-
'exclude_nss_root_certs': 0,
14-
'os_posix%': 1,
15-
'os_bsd%': 0,
16-
'chromeos%': 0,
17-
'clang%': 0,
18-
},
198
'target_defaults': {
20-
'cflags': [
21-
'-w',
22-
'-UHAVE_CVAR_BUILT_ON_SEM',
23-
],
249
# Removes these flags from the list cflags.
2510
'cflags!': [
26-
# NSS code from upstream mozilla builds with warnings,
27-
# so we must allow warnings without failing.
28-
'-Werror',
29-
'-Wall',
3011
'-ansi',
3112
# Not supported for C, only for C++.
3213
'-Wnon-virtual-dtor',
@@ -35,93 +16,5 @@
3516
'-fvisibility-inlines-hidden',
3617
'-Woverloaded-virtual',
3718
],
38-
'configurations': {
39-
'Dart_Base': {
40-
'xcode_settings': {
41-
'WARNING_CFLAGS': [
42-
'-w',
43-
],
44-
'WARNING_CFLAGS!': [
45-
'-Wall',
46-
'-Wextra',
47-
],
48-
},
49-
},
50-
# Dart_Macos_Debug and Dart_Macos_Release are merged after
51-
# Dart_Macos_Base, so we can override the 'ansi' and '-Werror' flags set
52-
# at the global level in tools/gyp/configurations_xcode.gypi.
53-
'Dart_Macos_Debug': {
54-
'abstract': 1,
55-
'xcode_settings': {
56-
# Remove 'ansi' setting.
57-
'GCC_C_LANGUAGE_STANDARD': 'c99',
58-
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
59-
},
60-
},
61-
'Dart_Macos_Release': {
62-
'abstract': 1,
63-
'xcode_settings': {
64-
# Remove 'ansi' setting.
65-
'GCC_C_LANGUAGE_STANDARD': 'c99',
66-
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
67-
},
68-
},
69-
# Disable hand-coded assembly routines on ARMv6 and ARMv5TE.
70-
'Dart_armv6_Base': {
71-
'abstract': 1,
72-
'defines': [
73-
'OPENSSL_NO_ASM',
74-
],
75-
},
76-
'Dart_armv5te_Base': {
77-
'abstract': 1,
78-
'defines': [
79-
'OPENSSL_NO_ASM',
80-
],
81-
},
82-
# TODO(24321): Also disable temporarily on arm64. Reenable after the next
83-
# roll.
84-
'Dart_arm64_Base': {
85-
'abstract': 1,
86-
'defines': [
87-
'OPENSSL_NO_ASM',
88-
],
89-
},
90-
# Android 64-bit dbc build is for arm64, disable temporarily as well.
91-
'Dart_Android_arm64_Base': {
92-
'abstract': 1,
93-
'defines': [
94-
'OPENSSL_NO_ASM',
95-
],
96-
},
97-
# When being built for Android nss expects __linux__ to be defined.
98-
'Dart_Android_Base': {
99-
'target_conditions': [
100-
['_toolset=="host"', {
101-
'defines!': [
102-
'ANDROID',
103-
],
104-
# Define __linux__ on Android build for NSS.
105-
'defines': [
106-
'__linux__',
107-
],
108-
'cflags!': [
109-
'-U__linux__',
110-
],
111-
}],
112-
['_toolset=="target"', {
113-
'defines': [
114-
'__linux__',
115-
'CHECK_FORK_GETPID', # Android does not provide pthread_atfork.
116-
'__USE_LARGEFILE64',
117-
],
118-
# Define __linux__ on Android build for NSS.
119-
'cflags!': [
120-
'-U__linux__',
121-
],
122-
}]
123-
],
124-
},
125-
},
12619
},
12720
}

third_party/boringssl/boringssl_dart.gyp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'defines': [
2323
'BORINGSSL_IMPLEMENTATION',
2424
'BORINGSSL_NO_STATIC_INITIALIZER',
25+
'OPENSSL_SMALL',
2526
],
2627
# TODO(davidben): Fix size_t truncations in BoringSSL.
2728
# https://crbug.com/429039
@@ -47,10 +48,6 @@
4748
],
4849
'include_dirs': [
4950
'src/include',
50-
# This is for arm_arch.h, which is needed by some asm files. Since the
51-
# asm files are generated and kept in a different directory, they
52-
# cannot use relative paths to find this file.
53-
'src/crypto',
5451
],
5552
'direct_dependent_settings': {
5653
'include_dirs': [

0 commit comments

Comments
 (0)