53 Commits
Author SHA1 Message Date
Cory Benfield 86458a336b Update BoringSSL to 8eb25be6fa18d475291122887a7bccd3762ff236 (#607)
As a standard pattern, the vendoring script needed some changes, as did
our internal code.

The biggest change here is that BoringSSL has changed its name mangling
scheme. This causes us to no longer need to explicitly write the prefix
out anymore: in fact, doing that causes compiler errors. So this patch
rewrites the code to resolve that issue.

Along the way, I've also added some checks for making sure the name
mangling is correct.
2026-10-09 17:19:47 +00:00
Cory Benfield 049520bf7d Update BoringSSL to 817ab07ebb53da35afea409ab9328f578492832d (#506)
This PR updates BoringSSL to a newer commit.

Relatedly, this also lifts our minimum C++ version to C++17, to match
BoringSSL.
2025-02-10 15:43:01 +00:00
Cory Benfield e252d9bf14 Update BoringSSL to 9559c4566a6d12194c42db5f3dbbcb5de35cfec2 (#496)
This patch updates BoringSSL.
2024-12-09 16:48:49 +00:00
Cory Benfield 3ee8d53556 Update BoringSSL to 059585c8dadc7c8170c788f8c89843ee1c5b8f11 (#495) 2024-11-28 16:10:21 +00:00
Cory Benfield d7ceaf0e4d Update BoringSSL to d0a175601b9e180ce58cb1e33649057f5c484146 (#483)
This patch has 3 parts: a commit to update the vendoring script, a
commit that contains the results of running the script, and then a fixup
for the API breaks we got.
2024-10-09 18:11:48 +01:00
Cory Benfield 13460776e7 Update BoringSSL to 3309ca66385ecb0c37f1ac1be9f88712e25aa8ec (#446)
* Update vendoring and perlasm

* Update vendoring script

* Update to BoringSSL 3309ca66385ecb0c37f1ac1be9f88712e25aa8ec

* Handle API break in BoringSSL
2023-10-30 10:48:37 +00:00
Cory Benfield 9d0d5d8798 Update BoringSSL to abfd5ebc87ddca0fab9fca067c9d7edbc355eae8 (#424)
* Update BoringSSL vendoring scripts for new perlasm

* More patches

* Update BoringSSL to abfd5ebc87ddca0fab9fca067c9d7edbc355eae8

* Fixup newly opaquified types
2023-04-13 12:42:47 +01:00
George Barnett 4fb7ead803 Update BoringSSL to b819f7e9392d25db6705a6bd3c92be3bb91775e2 (#406) 2022-10-20 13:19:57 +01:00
George Barnett 9f1a28849b Update BoringSSL to cab31f65f1ad6e6daca62e95b25dd6cd805fce0b 2022-09-28 12:08:28 +01:00
Cory Benfield ba7c0d7f82 Update BoringSSL to 8462a367bb57e9524c3d8eca9c62733c63a63cf4 (#399)
* Update BoringSSL umbrella header

* Update BoringSSL to 8462a367bb57e9524c3d8eca9c62733c63a63cf4
2022-09-02 04:38:36 -07:00
George Barnett fd5f38b003 Update BoringSSL to c239ffd0552179f358de31517391679e9b62ccd3 (#378)
* Various vendor script fixes:

- Fix various 'gsed' occurrences with '$sed'
- Remove the delocate patch, it is no longer required
- Add another patch to include inttypes in
  CNIOBoringSSL/crypto/x509/t_x509.c where PRIu64 is used and remove it
  from CNIOBoringSSL_bn.h. this works around a build failure with
  xcodeproj.
- Use the host platform build directory when mangling C++ symbols
- Fix Python bytes/string writing in build-asm.py

* Update BoringSSL to c239ffd0552179f358de31517391679e9b62ccd3
2022-07-04 10:53:09 +01:00
George Barnett 42436a25ff Update BoringSSL to 1e469e45a46ff580899cbef939babe02ad916c85 (#370)
* Update vendor-boringssl.sh

* Update BoringSSL
2022-06-09 06:03:49 -07:00
George Barnett 876748fde7 Update BoringSSL to f299342e38fd34b589604ef5b730623da13ee235 (#356)
* Update BoringSSL to f299342e38fd34b589604ef5b730623da13ee235

* Add a note about stray xcodeproj
2022-04-22 10:24:36 +01:00
Cory Benfield b5260a31c2 Update BoringSSL to 8bbefbfeee609b17622deedd100163c12f5c95dc (#350) 2022-03-22 15:10:36 +00:00
Cory Benfield 52a486ff6d Update BoringSSL to 295b31324f8c557dcd3c1c831857e33a7f23bc52 2022-01-11 08:55:02 +00:00
Cory Benfield 2b329e37e9 Update BoringSSL to 2042972e8458833714bce23386931b1c79978439 (#334) 2021-12-09 06:24:01 -08:00
Cory Benfield 0324d60429 Update BoringSSL to 3a667d10e94186fd503966f5638e134fe9fb4080 2021-11-25 17:30:53 +00:00
Cory Benfield 08e701df9a Add x509_vfy.h to umbrella header 2021-11-10 09:09:23 +00:00
Cory Benfield 4b7979a723 Update BoringSSL to a9670a8b476470e6f874fef3554e8059683e1413 2021-11-10 09:09:23 +00:00
Cory Benfield 688f902407 Update BoringSSL to 25773430c07075a368416c3646fa4b07daf4968a (#315)
* Update BoringSSL to 25773430c07075a368416c3646fa4b07daf4968a

* Clean up the use of the X509 pointer

Motivation:

BoringSSL has begun opaquifying their X.509 library. This unfortunately
manifests as source code changes in Swift due to the way OpaquePointer
behaves. As a result, we need to change the places that held an X.509
pointer directly.

While we're here, we've been playing a bit fast-and-loose with the
lifetime of owned pointers. We should take this opportunity to clean
things up and be a bit better behaved.

Modifications:

- Replace the X509 pointers with OpaquePointer
- Use scoped access to the X.509 access outside the NIOSSLCertificate
  class.

Result:

Code compiles with better pointer hygeine.
2021-09-09 08:54:01 +01:00
Cory Benfield 0119cf84a0 Update BoringSSL to 2e68a05c9943a8dec1758d4a393b2ae906fd3295 (#308)
Also tweak the vendor script to add an explicit destination when
building for iOS.
2021-08-17 09:37:51 +01:00
Cory Benfield 3d576964a1 Update BoringSSL to ab7811ee8751ea699b22095caa70246f641ed3a2 (#289) 2021-04-22 11:16:54 +01:00
Cory Benfield 6b6c0582d6 Update boringssl to 04b3213d43492b6c9e0434d8e2a4530a9938f958 (#279) 2021-03-10 14:31:02 +00:00
Cory Benfield 5cf978934a Update vendor script to namespace C++ structures. (#269)
Motivation:

C++ structures emit a number of symbols into their binaries that are
named based on the name of the structure. Most notably, these are the
three (or five, depending on mode) magic structure methods: copy
constructor, copy assignment operator, destructor.

By and large this isn't an issue for us as BoringSSL already namespaces
most of its structures. However, a few structures are the target of
opaque typedefs in the public header files. These need to use the names
that would appear in the internal source. If they didn't, the internal
source wouldn't compile! As a result they need to appear outside the
inner prefixing namespace.

We knew about this limitation at the time we did this work, but hoped
we'd get along just fine without changing anything. In fact we did, for
nearly three years. But the chickens have come home to roost in
https://github.com/grpc/grpc-swift/issues/1134.

So it's time to fix it.

Fortunately for us, we never write down the names of the inner types in
our source code. That means we don't actually care what that name _is_.
This gives us our escape hatch: we can namespace the names of the
underlying C++ types using the same preprocessor trick as the function
names. This will have the effect of also namespacing their magic
methods.

Modifications:

This patch attempts to make this change defensively, by assuming that
other structures may be added that meet this pattern. To do it, we
compile the binary _again_ and search for any C++ methods that haven't
already been namespaced and that don't belong to Swift. We then extract
the structure name from them and add a `#define` for it. This forcibly
renames the structure in all cases.

Result:

No more colliding symbols.
2021-02-12 08:23:29 +00:00
Cory Benfield f6726f800c Update BoringSSL to bb43a45d6de7375f3310511d37f040d1055f8a10 (#268) 2021-02-03 12:55:20 +00:00
Cory Benfield 62bf5083df Update BoringSSL to df75139becd7355e117c9860452265b898b49376. (#261) 2020-12-16 09:34:00 +00:00
George Barnett 901a014233 Fixup vendoring script and update BoringSSL. (#256)
* Update vendoring script to fix a missing includeo

Motivation:

The openssl/evp.h header was missing causing compilation to fail.
In addition, a previously missing header is now included by BoringSSL.

Modifications:

- Update the fix import line to fix the new missing header.

Result:

BoringSSL can be vendored using our script.

* Update BoringSSL to 4a265be4d931e35f0d108040c94d37bb49827948.
2020-11-27 11:15:57 +00:00
David Evans eb102ad32a Update boring ssl (#249) 2020-10-14 15:25:02 +01:00
Cory Benfield cc0e80dbcc Update BoringSSL to 67818bea6690a230e2f42e8a588e0f54949bbbf1 (#244) 2020-09-30 13:27:21 +01:00
George Barnett ea1dfd6419 Update BoringSSL to 1c58648f14ed75f2a8cc3ae08897987d97f493ec (#239)
* Update patch-2-arm-arch.patch

* Update BoringSSL to 1c58648f14ed75f2a8cc3ae08897987d97f493ec
2020-08-26 16:17:22 +01:00
Cory Benfield 8a137b72a9 Update BoringSSL to 54858b63c1d886f6c8d903d4a4f594f1485de189 (#235) 2020-07-24 11:43:48 +01:00
Cory Benfield ea1498d4d5 Update BoringSSL to 53a17f55247101105ae35767d5c5a6c311843a8e. (#218) 2020-06-02 08:53:34 +01:00
Cory Benfield f6ad7f7ef1 Update BoringSSL to 7c522995d1ea5386b3223a19b0f62e73c1f76b17 (#216)
Also remove a temporary BoringSSL patch and deal with no C files being
in fiat/
2020-05-13 11:10:35 +01:00
Cory Benfield 7add274f6e Update BoringSSL to 5298ef99bf2b2d77600b3bb74dd572027bf495be (#200)
Note that the vendor script changed: BoringSSL added a new top-level
header that had to be added to the umbrella header.
2020-03-18 08:38:46 +00:00
Cory Benfield b99ca3a19a Mitigate Folly/BoringSSL static linking issue. (#191)
Motivation:

BoringSSL and Folly both attempt to play silly buggers with the sdallocx
symbol defined in jemalloc. Unfortunately, they don't play nicely
together, and the end result if you have both present is that BoringSSL
will reliably SIGBUS or SIGSEGV on initialization. Naturally, this isn't
good.

Modifications:

- Resolve the issue by patching out BoringSSL's allocator optimisation.
- Update BoringSSL to 6432bb46ab44731567ec923e6c8fc182f13d0070.

Result:

Flow and BoringSSL will play better together.
2020-02-24 14:41:27 +00:00
Cory Benfield 978dfd6c9a Update BoringSSL to 21a879a78a60c8667468a9eba994c8365eaf92ea. (#182) 2020-02-12 13:51:22 +00:00
Cory Benfield 803cbead75 Update BoringSSL to 0deb91ab3f7e24307572497f0f7438684590bf92 (#167) 2020-01-07 18:02:13 +00:00
Cory Benfield 7b2e7cfe8c Update BoringSSL to 134fb89c4f9da7903d9aa81c6bd1d3c466782de1 (#159) 2019-12-04 12:04:20 +00:00
Cory Benfield ccf96bbe65 Add cross-compilation to symbol mangling. (#150)
Motivation:

BoringSSL potentially defines different symbols on different
architecture and platform combinations. This means that we've
historically missed mangling some symbol names when our script only
involved building on macOS.

We should build on more platforms to test this.

Modifications:

- Added support for cross compiling to Linux amd64, Linux aarch64, and
    Linux armv7 in symbol mangling script.
- Added support for compiling for iOS armv6 and arm64 in symbol mangling
    script.

Result:

Harder to run the mangling script, better results when you do.
2019-11-13 18:40:43 +00:00
Cory Benfield 63e61ed857 Update BoringSSL to 6ba98ff60144f60aba589b4d6121689528fbae76 (#149) 2019-11-13 15:04:17 +00:00
Cory Benfield bd235c580b Update BoringSSL to 4ca15d5dcbe6e8051a4654df7c971ea8307abfe0 (#142) 2019-10-10 13:36:50 +01:00
Will Lisac 8a5135cce9 Fix BoringSSL compilation on aarch64 ARM Linux (#141) 2019-10-10 10:35:55 +01:00
Cory Benfield 109faef770 Use .note.GNU-stack section in ASM. (#137)
Motivation:

Well-formed Linux assembly code declares a .note.GNU-stack section in
order to help out the linker. When absent, the linker makes some
suboptimal linking decisions that can cause pain in running programs.

Modifications:

- Amend the vendoring script to add the .note.GNU-stack section to all
    assembly files on Linux.
- Updated BoringSSL

Results:

Better linker behaviour.
2019-10-03 18:30:58 +01:00
Cory Benfield dc2e9c0a25 Catch and namespace extra autogenerated functions. (#131)
Motivation:

Our scripts have code to catch the functions that are used with STACK_OF
and LHASH_OF data structures in BoringSSL in order to namespace them.
Sadly, some declarations were falling through the cracks: we missed some
LHASH_OF functions used internally, and we missed the
DEFINE_NAMED_STACK_OF macro used for a new C++ data type.

Modifications:

- Improved these scripts to catch more cases.
- Updated BoringSSL to 9806ae005b3085683a2fcf2953e4170893e0973d.

Result:

Fewer exported symbols from BoringSSL.
2019-08-20 13:42:56 +01:00
fabstu 00546ebd78 Fix compilation on iPad Pro 1st Gen with iPadOS13 and iOS 12 (#125)
Resolves an issue where the ARM architecture helpers were inadvertently excluded on 64-bit ARM platforms.
2019-08-10 15:42:30 +01:00
George Barnett 125078ea20 Re-namespace BoringSSL from CNIOBoringSSL/ to CNIOBoringSSL_ (#122)
Motivation:

When including an xcodeproj generated by SwiftPM (which builds
CNIOBoringSSL) into an xcodeproj which wasn't generated by SwiftPM it
doesn't know about the correct header paths.

Modifications:

Update the vendor-boringssl script to:
- Namespace BoringSSL with CNIOBoringSSL_ instead of CNIOBoringSSL/
- Create an umbrealla CNIOBoringSSL header
- Apply a patch to replace inttypes.h with sys/types.h in bn.h
- Apply a patch to conditionally include arm_arch.h

BoringSSL was also updated to: ae223d6138807a13006342edfeef32e813246b39

Result:

Non-SwiftPM xcodeproj's can build a SwiftPM generated xcodeproj
which includes CNIOBoringSSL.
2019-08-09 10:23:16 +01:00
Cory Benfield 16de4b45c7 Update BoringSSL to a86c69888b9a416f5249aacb4690a765be064969 (#118) 2019-07-19 16:52:06 +01:00
Cory Benfield 77173ac903 Disable 32-bit assembly on Apple platforms. (#109)
Motivation:

The 32-bit assembly in BoringSSL doesn't assemble correctly on 32-bit
apple platforms. It took us a while to notice because we previously
haven't had any supported 32-bit platforms. NIOSSL still doesn't really
support any 32-bit Apple platforms, as all production use on those
platforms should use NIOTS, but there's no excuse for the compilation
failures really.

Modifications:

Remove assembly acceleration on 32-bit Apple platforms.

Result:

Better compilation on 32-bit Apple platforms.
2019-06-18 16:15:25 +01:00
Cory Benfield dc23a24fbe Update boringssl to ff62b38 (#108) 2019-05-22 16:41:33 +01:00
Cory Benfield 842506da7b Update BoringSSL to ad9eee1628aa4dac2ac3528cb6bb5ddf27e73560. (#97)
Motivation:

We want to avoid BoringSSL falling too far out of date. This patch updates
BoringSSL.

Modifications:

Updated BoringSSL.

Result:

Newer BoringSSL.
2019-04-11 14:22:18 +01:00