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.
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.
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.
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.
Motivation:
Allowing readers of the API documentation to drill into the implementation of documented declarations can be educational and helpful for debugging, among several other reasons.
Modifications:
Add --github-file-prefix appending the current version in order to keep stable links. This means that documentation generated from any non-release revision may resolve incorrectly. This can be refined in the doc generation script later if it is deemed problematic by resolving to the commit sha if it doesn't exactly align with the version.
Result:
Users will be able to click a 'Show on GitHub' for all documented API declarations.
Motivation:
We namespaced our header files, but some includes had weird whitespace in
the directive that we didn't notice. This meant that ARM builds failed.
Modifications:
- Became more tolerant of whitespace.
- Fixed an error in Package.swift
Result:
Better builds on ARM
Motivation:
We have a static library target that is used as part of the BoringSSL
vendoring setup to generate a list of hidden symbols. This works nicely,
but building it fires out a bunch of warnings due to files with no symbols
in them. That's fine during the build phase, but most developers should
never need to see it.
Modifications:
- Hide the static archive product most of the time.
- Update vendor script to un-hide the static archive product on vendoring.
- Enable warnings-as-errors.
Result:
Fewer warnings.
Motivation:
When debugging, users may find it helpful to be able to nail down exactly
which version of BoringSSL is used to generate the specific release. We should
record this in two easy-to-find places: one in the Package.swift for users
going to GitHub, and one in the Sources tree for users who check the code
out.
Modifications:
- Updated the script to record the BoringSSL hash.
Result:
Easier to find out what BoringSSL release is in use.
Motivation:
Our previous namespacing effort used symbol analysis of a compiled binary
to locate all the symbols that needed to be namespaced away. This works
fine for regular C and C++ symbols, but fails for any header-only
inline functions.
These functions, while not emitted into the binary, can cause problems
with the C++ ODR if they are included in multiple clang modules. This
unfortunately does happen if the user includes both this library and,
for example, modularised headers that include OpenSSL headers.
Fortunately, we can namespace the inline functions as well.
Modifications:
- Namespaced all the inline headers by source analysis.
Result:
Fewer code conflicts.
Motivation:
Due to the way SwiftPM builds projects it's possible for our
BoringSSL header files to clash with other people's OpenSSL header
files. That leads to build errors and sadness.
Modifications:
- Updated the BoringSSL vendor script to move all header files.
- Updated script to point C files at new header files.
- Brought in new BoringSSL version.
After your change, what will change:
Happier users
Motivation:
When we moved away from the system copy of OpenSSL, we lost the
compiled-in locations of the default root CAs. We should go looking for
them so that certificate verification still works!
Modifications:
- Added a runtime one-off search to locate the roots.
Result:
Certificate verification works on Linux
Motivation:
Requiring the system's SSL library was a constant source of problems.
Modifications:
This is the patch that transitions swift-nio-ssl to use BoringSSL, as discussed in [the Swift forums](https://forums.swift.org/t/rfc-moving-swiftnio-ssl-to-boringssl/18280).
Result:
Easier SSL support
Motivation:
up to date test extentions with appropriate legal header
Modifications:
regenerate linux test extensions with updated generator
Result:
linux test extensions have correct legal header