Skip to content

Commit

Permalink
Rolls BoringSSL forward
Browse files Browse the repository at this point in the history
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

R=iposva@google.com, whesse@google.com

Review URL: https://codereview.chromium.org/1924693003 .
  • Loading branch information
zanderso committed Apr 29, 2016
1 parent ff1b117 commit e954a24
Show file tree
Hide file tree
Showing 48 changed files with 21,401 additions and 8,705 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ vars = {
"barback_tag" : "@0.15.2+7",
"bazel_worker_tag": "@v0.1.0",
"boolean_selector_tag" : "@1.0.0",
"boringssl_rev" : "@daeafc22c66ad48f6b32fc8d3362eb9ba31b774e",
"boringssl_rev" : "@c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9",
"charcode_tag": "@1.1.0",
"chrome_rev" : "@19997",
"cli_util_tag" : "@0.0.1+2",
Expand Down
7 changes: 1 addition & 6 deletions third_party/boringssl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ config("internal_config") {
defines = [
"BORINGSSL_IMPLEMENTATION",
"BORINGSSL_NO_STATIC_INITIALIZER",
"OPENSSL_SMALL_FOOTPRINT",
"OPENSSL_SMALL",
]
}

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

if (current_cpu == "x64") {
Expand Down
37 changes: 20 additions & 17 deletions third_party/boringssl/boringssl.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
{
'variables': {
'boringssl_ssl_sources': [
'src/ssl/custom_extensions.c',
'src/ssl/d1_both.c',
'src/ssl/d1_clnt.c',
'src/ssl/d1_lib.c',
'src/ssl/d1_meth.c',
'src/ssl/d1_pkt.c',
'src/ssl/d1_srtp.c',
'src/ssl/d1_srvr.c',
'src/ssl/dtls_record.c',
'src/ssl/pqueue/pqueue.c',
'src/ssl/s3_both.c',
'src/ssl/s3_clnt.c',
Expand All @@ -23,18 +25,19 @@
'src/ssl/s3_pkt.c',
'src/ssl/s3_srvr.c',
'src/ssl/ssl_aead_ctx.c',
'src/ssl/ssl_algs.c',
'src/ssl/ssl_asn1.c',
'src/ssl/ssl_buffer.c',
'src/ssl/ssl_cert.c',
'src/ssl/ssl_cipher.c',
'src/ssl/ssl_ecdh.c',
'src/ssl/ssl_file.c',
'src/ssl/ssl_lib.c',
'src/ssl/ssl_rsa.c',
'src/ssl/ssl_sess.c',
'src/ssl/ssl_session.c',
'src/ssl/ssl_stat.c',
'src/ssl/ssl_txt.c',
'src/ssl/t1_enc.c',
'src/ssl/t1_lib.c',
'src/ssl/t1_reneg.c',
'src/ssl/tls_record.c',
],
'boringssl_crypto_sources': [
'err_data.c',
Expand Down Expand Up @@ -92,6 +95,7 @@
'src/crypto/bn/add.c',
'src/crypto/bn/asm/x86_64-gcc.c',
'src/crypto/bn/bn.c',
'src/crypto/bn/bn_asn1.c',
'src/crypto/bn/cmp.c',
'src/crypto/bn/convert.c',
'src/crypto/bn/ctx.c',
Expand All @@ -108,6 +112,7 @@
'src/crypto/bn/shift.c',
'src/crypto/bn/sqrt.c',
'src/crypto/buf/buf.c',
'src/crypto/bytestring/asn1_compat.c',
'src/crypto/bytestring/ber.c',
'src/crypto/bytestring/cbb.c',
'src/crypto/bytestring/cbs.c',
Expand All @@ -130,25 +135,27 @@
'src/crypto/cpu-arm.c',
'src/crypto/cpu-intel.c',
'src/crypto/crypto.c',
'src/crypto/curve25519/curve25519.c',
'src/crypto/curve25519/x25519-x86_64.c',
'src/crypto/des/des.c',
'src/crypto/dh/check.c',
'src/crypto/dh/dh.c',
'src/crypto/dh/dh_asn1.c',
'src/crypto/dh/dh_impl.c',
'src/crypto/dh/params.c',
'src/crypto/digest/digest.c',
'src/crypto/digest/digests.c',
'src/crypto/directory_posix.c',
'src/crypto/directory_win.c',
'src/crypto/dsa/dsa.c',
'src/crypto/dsa/dsa_asn1.c',
'src/crypto/dsa/dsa_impl.c',
'src/crypto/ec/ec.c',
'src/crypto/ec/ec_asn1.c',
'src/crypto/ec/ec_key.c',
'src/crypto/ec/ec_montgomery.c',
'src/crypto/ec/oct.c',
'src/crypto/ec/p224-64.c',
'src/crypto/ec/p256-64.c',
'src/crypto/ec/p256-x86_64.c',
'src/crypto/ec/simple.c',
'src/crypto/ec/util-64.c',
'src/crypto/ec/wnaf.c',
Expand All @@ -158,9 +165,9 @@
'src/crypto/engine/engine.c',
'src/crypto/err/err.c',
'src/crypto/evp/algorithm.c',
'src/crypto/evp/asn1.c',
'src/crypto/evp/digestsign.c',
'src/crypto/evp/evp.c',
'src/crypto/evp/evp_asn1.c',
'src/crypto/evp/evp_ctx.c',
'src/crypto/evp/p_dsa_asn1.c',
'src/crypto/evp/p_ec.c',
Expand Down Expand Up @@ -198,7 +205,6 @@
'src/crypto/poly1305/poly1305.c',
'src/crypto/poly1305/poly1305_arm.c',
'src/crypto/poly1305/poly1305_vec.c',
'src/crypto/rand/hwrand.c',
'src/crypto/rand/rand.c',
'src/crypto/rand/urandom.c',
'src/crypto/rand/windows.c',
Expand Down Expand Up @@ -303,6 +309,7 @@
],
'boringssl_linux_aarch64_sources': [
'linux-aarch64/crypto/aes/aesv8-armx64.S',
'linux-aarch64/crypto/bn/armv8-mont.S',
'linux-aarch64/crypto/modes/ghashv8-armx64.S',
'linux-aarch64/crypto/sha/sha1-armv8.S',
'linux-aarch64/crypto/sha/sha256-armv8.S',
Expand All @@ -320,6 +327,7 @@
'linux-arm/crypto/sha/sha512-armv4.S',
'src/crypto/chacha/chacha_vec_arm.S',
'src/crypto/cpu-arm-asm.S',
'src/crypto/curve25519/asm/x25519-asm-arm.S',
'src/crypto/poly1305/poly1305_arm_asm.S',
],
'boringssl_linux_x86_sources': [
Expand All @@ -329,7 +337,6 @@
'linux-x86/crypto/bn/bn-586.S',
'linux-x86/crypto/bn/co-586.S',
'linux-x86/crypto/bn/x86-mont.S',
'linux-x86/crypto/cpu-x86-asm.S',
'linux-x86/crypto/md5/md5-586.S',
'linux-x86/crypto/modes/ghash-x86.S',
'linux-x86/crypto/rc4/rc4-586.S',
Expand All @@ -346,16 +353,16 @@
'linux-x86_64/crypto/bn/rsaz-x86_64.S',
'linux-x86_64/crypto/bn/x86_64-mont.S',
'linux-x86_64/crypto/bn/x86_64-mont5.S',
'linux-x86_64/crypto/cpu-x86_64-asm.S',
'linux-x86_64/crypto/ec/p256-x86_64-asm.S',
'linux-x86_64/crypto/md5/md5-x86_64.S',
'linux-x86_64/crypto/modes/aesni-gcm-x86_64.S',
'linux-x86_64/crypto/modes/ghash-x86_64.S',
'linux-x86_64/crypto/rand/rdrand-x86_64.S',
'linux-x86_64/crypto/rc4/rc4-md5-x86_64.S',
'linux-x86_64/crypto/rc4/rc4-x86_64.S',
'linux-x86_64/crypto/sha/sha1-x86_64.S',
'linux-x86_64/crypto/sha/sha256-x86_64.S',
'linux-x86_64/crypto/sha/sha512-x86_64.S',
'src/crypto/curve25519/asm/x25519-asm-x86_64.S',
],
'boringssl_mac_x86_sources': [
'mac-x86/crypto/aes/aes-586.S',
Expand All @@ -364,7 +371,6 @@
'mac-x86/crypto/bn/bn-586.S',
'mac-x86/crypto/bn/co-586.S',
'mac-x86/crypto/bn/x86-mont.S',
'mac-x86/crypto/cpu-x86-asm.S',
'mac-x86/crypto/md5/md5-586.S',
'mac-x86/crypto/modes/ghash-x86.S',
'mac-x86/crypto/rc4/rc4-586.S',
Expand All @@ -381,12 +387,11 @@
'mac-x86_64/crypto/bn/rsaz-x86_64.S',
'mac-x86_64/crypto/bn/x86_64-mont.S',
'mac-x86_64/crypto/bn/x86_64-mont5.S',
'mac-x86_64/crypto/cpu-x86_64-asm.S',
'mac-x86_64/crypto/ec/p256-x86_64-asm.S',
'mac-x86_64/crypto/md5/md5-x86_64.S',
'mac-x86_64/crypto/modes/aesni-gcm-x86_64.S',
'mac-x86_64/crypto/modes/ghash-x86_64.S',
'mac-x86_64/crypto/rand/rdrand-x86_64.S',
'mac-x86_64/crypto/rc4/rc4-md5-x86_64.S',
'mac-x86_64/crypto/rc4/rc4-x86_64.S',
'mac-x86_64/crypto/sha/sha1-x86_64.S',
'mac-x86_64/crypto/sha/sha256-x86_64.S',
Expand All @@ -399,7 +404,6 @@
'win-x86/crypto/bn/bn-586.asm',
'win-x86/crypto/bn/co-586.asm',
'win-x86/crypto/bn/x86-mont.asm',
'win-x86/crypto/cpu-x86-asm.asm',
'win-x86/crypto/md5/md5-586.asm',
'win-x86/crypto/modes/ghash-x86.asm',
'win-x86/crypto/rc4/rc4-586.asm',
Expand All @@ -416,12 +420,11 @@
'win-x86_64/crypto/bn/rsaz-x86_64.asm',
'win-x86_64/crypto/bn/x86_64-mont.asm',
'win-x86_64/crypto/bn/x86_64-mont5.asm',
'win-x86_64/crypto/cpu-x86_64-asm.asm',
'win-x86_64/crypto/ec/p256-x86_64-asm.asm',
'win-x86_64/crypto/md5/md5-x86_64.asm',
'win-x86_64/crypto/modes/aesni-gcm-x86_64.asm',
'win-x86_64/crypto/modes/ghash-x86_64.asm',
'win-x86_64/crypto/rand/rdrand-x86_64.asm',
'win-x86_64/crypto/rc4/rc4-md5-x86_64.asm',
'win-x86_64/crypto/rc4/rc4-x86_64.asm',
'win-x86_64/crypto/sha/sha1-x86_64.asm',
'win-x86_64/crypto/sha/sha256-x86_64.asm',
Expand Down
107 changes: 0 additions & 107 deletions third_party/boringssl/boringssl_configurations.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,10 @@

# This file is included to modify the configurations to build third-party
# code from BoringSSL.
# This code is C code, not C++, and is not warning-free, so we need to remove
# C++-specific flags, and add flags to supress the warnings in the code.
{
'variables': {
# Used by third_party/nss, which is from Chromium.
# Include the built-in set of root certificate authorities.
'exclude_nss_root_certs': 0,
'os_posix%': 1,
'os_bsd%': 0,
'chromeos%': 0,
'clang%': 0,
},
'target_defaults': {
'cflags': [
'-w',
'-UHAVE_CVAR_BUILT_ON_SEM',
],
# Removes these flags from the list cflags.
'cflags!': [
# NSS code from upstream mozilla builds with warnings,
# so we must allow warnings without failing.
'-Werror',
'-Wall',
'-ansi',
# Not supported for C, only for C++.
'-Wnon-virtual-dtor',
Expand All @@ -35,93 +16,5 @@
'-fvisibility-inlines-hidden',
'-Woverloaded-virtual',
],
'configurations': {
'Dart_Base': {
'xcode_settings': {
'WARNING_CFLAGS': [
'-w',
],
'WARNING_CFLAGS!': [
'-Wall',
'-Wextra',
],
},
},
# Dart_Macos_Debug and Dart_Macos_Release are merged after
# Dart_Macos_Base, so we can override the 'ansi' and '-Werror' flags set
# at the global level in tools/gyp/configurations_xcode.gypi.
'Dart_Macos_Debug': {
'abstract': 1,
'xcode_settings': {
# Remove 'ansi' setting.
'GCC_C_LANGUAGE_STANDARD': 'c99',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
},
},
'Dart_Macos_Release': {
'abstract': 1,
'xcode_settings': {
# Remove 'ansi' setting.
'GCC_C_LANGUAGE_STANDARD': 'c99',
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
},
},
# Disable hand-coded assembly routines on ARMv6 and ARMv5TE.
'Dart_armv6_Base': {
'abstract': 1,
'defines': [
'OPENSSL_NO_ASM',
],
},
'Dart_armv5te_Base': {
'abstract': 1,
'defines': [
'OPENSSL_NO_ASM',
],
},
# TODO(24321): Also disable temporarily on arm64. Reenable after the next
# roll.
'Dart_arm64_Base': {
'abstract': 1,
'defines': [
'OPENSSL_NO_ASM',
],
},
# Android 64-bit dbc build is for arm64, disable temporarily as well.
'Dart_Android_arm64_Base': {
'abstract': 1,
'defines': [
'OPENSSL_NO_ASM',
],
},
# When being built for Android nss expects __linux__ to be defined.
'Dart_Android_Base': {
'target_conditions': [
['_toolset=="host"', {
'defines!': [
'ANDROID',
],
# Define __linux__ on Android build for NSS.
'defines': [
'__linux__',
],
'cflags!': [
'-U__linux__',
],
}],
['_toolset=="target"', {
'defines': [
'__linux__',
'CHECK_FORK_GETPID', # Android does not provide pthread_atfork.
'__USE_LARGEFILE64',
],
# Define __linux__ on Android build for NSS.
'cflags!': [
'-U__linux__',
],
}]
],
},
},
},
}
5 changes: 1 addition & 4 deletions third_party/boringssl/boringssl_dart.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'defines': [
'BORINGSSL_IMPLEMENTATION',
'BORINGSSL_NO_STATIC_INITIALIZER',
'OPENSSL_SMALL',
],
# TODO(davidben): Fix size_t truncations in BoringSSL.
# https://crbug.com/429039
Expand All @@ -47,10 +48,6 @@
],
'include_dirs': [
'src/include',
# This is for arm_arch.h, which is needed by some asm files. Since the
# asm files are generated and kept in a different directory, they
# cannot use relative paths to find this file.
'src/crypto',
],
'direct_dependent_settings': {
'include_dirs': [
Expand Down
Loading

0 comments on commit e954a24

Please sign in to comment.