Commit Graph

3079 Commits

Author SHA1 Message Date
Jordan Rose
3c9a3db0e8 Mark 'libsignal' branch as frozen.
Some checks failed
CI / Test (map[]) (push) Has been cancelled
CI / rustfmt (push) Has been cancelled
CI / clippy (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (--workspace --exclude tokio-boring --exclude hyper-boring, windows-latest, stable-x86_64-msvc, i686-pc-windows-msvc, i686-msvc) (push) Has been cancelled
CI / Test (--workspace --exclude tokio-boring --exclude hyper-boring, windows-latest, stable-x86_64-msvc, x86_64-pc-windows-msvc, x86_64-msvc) (push) Has been cancelled
CI / Test (crossbuild-essential-arm64, true, map[CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER:aarch64-linux-gnu-g++ CC:aarch64-linux-gnu-gcc CXX:aarch64-linux-gnu-g++], ubuntu-latest, stable, aarch64-unknown-linux-gnu, aarch64-linux) (push) Has been cancelled
CI / Test (false) (push) Has been cancelled
CI / Test (gcc-arm-linux-gnueabi g++-arm-linux-gnueabi, true, map[CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER:arm-linux-gnueabi-g++ CC:arm-linux-gnueabi-gcc CXX:arm-linux-gnueabi-g++], ubuntu-latest, stable, arm-unknown-linux-gnueabi, arm-linux) (push) Has been cancelled
CI / Test (gcc-multilib g++-multilib, ubuntu-latest, stable, i686-unknown-linux-gnu, i686-linux) (push) Has been cancelled
CI / Test (macos-latest, stable, x86_64-apple-darwin, x86_64-macos) (push) Has been cancelled
CI / Test (true, macos-latest, aarch64-apple-ios, aarch64-ios) (push) Has been cancelled
CI / Test (true, macos-latest, aarch64-apple-ios-sim, aarch64-ios-sim) (push) Has been cancelled
CI / Test (true, macos-latest, stable, aarch64-apple-darwin, arm64-macos) (push) Has been cancelled
CI / Test (true, macos-latest, x86_64-apple-ios, x86_64-ios) (push) Has been cancelled
CI / Test (true, ubuntu-latest, stable, aarch64-linux-android, arm64-android) (push) Has been cancelled
CI / Test (true, ubuntu-latest, stable, armv7-linux-androideabi, arm-android) (push) Has been cancelled
CI / Test (true, ubuntu-latest, stable, i686-linux-android, i686-android) (push) Has been cancelled
CI / Test (true, ubuntu-latest, stable, x86_64-linux-android, x86_64-android) (push) Has been cancelled
CI / Test (ubuntu-latest, stable, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
CI / Test FIPS integration (push) Has been cancelled
CI / Test features (push) Has been cancelled
2024-04-11 16:50:04 -07:00
Chris Eager
8245063ae6 Update CI to build all matrix targets
This adds the matrix `--target` to relevant `cargo` commands. Some
targets are now “check-only”, which confirms cross-compilation succeeds,
without doing a full test run, because running these tests may require
emulation.

musl and MinGW have been dropped, because musl has no standard C++
setup, and MinGW isn’t a target for us.

All this requires some adjustments to boring-sys:

- Blocklist max_align_t in bindgen
   - https://github.com/rust-lang/rust-bindgen/issues/1823
- Don't check for MSVC with target_env
   - x86_64-pc-windows-gnu is identified as `target_env = "msvc"` too,
but doesn't use the Visual Studio CMake generator.
2023-10-18 15:50:51 -05:00
Anthony Ramine
8d4822be72 Fix clippy lints 2023-10-12 15:27:55 -07:00
Jordan Rose
02e4a3f9aa Merge upstream release 3.1.0 into libsignal branch 2023-10-12 15:19:22 -07:00
Jordan Rose
3c50b28a61 Remove Catalyst support 2023-10-10 16:14:12 -07:00
Ivan Nikulin
4749c525e4 Update Cargo.toml 2023-09-13 12:38:03 +01:00
Ivan Nikulin
e02d03b5e0 Update RELEASE_NOTES 2023-09-13 12:38:03 +01:00
Ivan Nikulin
255409cb98 Update RELEASE_NOTES 2023-09-13 12:38:03 +01:00
Manuel Olguín Muñoz
c2cd349132 Release 3.0.5 2023-09-13 12:38:03 +01:00
Manuel Olguín Muñoz
bdbef2003f tweaks for ergonomic linking 2023-09-13 12:38:03 +01:00
Christopher Patton
2fa3d96966 Use features to set key exchange preferences
Overwrite boringSSL's default key exchange preferences with safe
defaults using feature flags:

* "kx-pq-supported" enables support for PQ key exchange algorithms.
  Classical key exchange is still preferred, but will be upgraded to PQ
  if requested.

* "kx-pq-preferred" enables preference for PQ key exchange,
  with fallback to classical key exchange if requested.

* "kx-nist-required" disables non-NIST key exchange.

Each feature implies "kx-safe-default". When this feature is enabled,
don't compile bindings for `SSL_CTX_set1_curves()` and `SslCurve`. This
is to prevent the feature flags from silently overriding curve
preferences chosen by the user.

Ideally we'd allow both: that is, use "kx-*" to set defaults, but still
allow the user to manually override them. However, this doesn't work
because by the time the `SSL_CTX` is constructed, we don't yet know
whether we're the client or server. (The "kx-*" features set different
preferences for each.) If "kx-sfe-default" is set, then the curve
preferences are set just before initiating a TLS handshake
(`SslStreamBuilder::connect()`) or waiting for a TLS handshake
(`SslStreamBuilder::accept()`).
2023-09-01 14:21:35 -07:00
Ivan Nikulin
5d6ca7e19c Introduce no-patches feature 2023-09-01 09:28:27 +01:00
Eliza Weisman
190fb900a0 run publish --dry-run instead of pacakge on CI
As suggested by @inikulin in
https://github.com/cloudflare/boring/pull/159#issuecomment-1697324821
2023-08-30 14:54:18 +01:00
Eliza Weisman
e9318132d8 fix missing space in cargo package CI command 2023-08-30 14:54:18 +01:00
Eliza Weisman
3056660c86 ci: run the cargo package check for all targets 2023-08-30 14:54:18 +01:00
Eliza Weisman
2345c2f988 boring-sys: include all files needed to build FIPS
This commit modifies the Cargo `include` field for `boring-sys` to
include all the files necessary to actually build the FIPS-certified
revision of BoringSSL. Currently, some of these files are missing (see
#157 for details on this).

This branch improves on my previous approach in PR #158, which switched
from using a Cargo `include` to a Cargo `exclude`. Using `exclude`
rather than `include` resulted in a much larger crates.io package, but
at the time, I thought this was less likely to result in breakage in the
future, because I was concerned about the inability to verify that the
set of excludes/includes can build a new pinned `boringssl` git revision
without having to actually publish a crates.io release.

However, as @nox pointed out in [this comment][1], `cargo package` can
be used to verify a build with the `exclude`s/`include`s applied. This
branch therefore adds `cargo package` steps to CI that check that the
package can actually be built. This way, we are able to make a much
smaller change to the included files, resulting in a smaller package
published to crates.io.

On this branch, the package is 6.7MiB compressed, which is not much
larger than it was previously:

```
    Finished dev [unoptimized + debuginfo] target(s) in 55.65s
    Packaged 1851 files, 33.7MiB (6.7MiB compressed)
```

Fixes #157
Closes #158

[1]: https://github.com/cloudflare/boring/pull/158#issuecomment-1693067112,
2023-08-30 14:54:18 +01:00
Eliza Weisman
c8d52a7614 add CI jobs to run cargo package 2023-08-30 14:54:18 +01:00
Paolo Barbolini
ed91cce367 Fix -Z minimal-versions 2023-08-30 12:19:04 +01:00
Ivan Nikulin
011d500460 Separate fips and fips-link-precompiled features.
Make the later compatible with `rpk` feature.
2023-08-30 11:41:20 +01:00
Ivan Nikulin
a6e35a46b6 Bump version in Cargo.toml 2023-08-05 14:36:12 +01:00
Ivan Nikulin
c482097d96 Release 3.0.4 2023-08-05 14:34:05 +01:00
Ivan Nikulin
edfe18b196 Add missing cmake files to the package 2023-08-05 14:32:02 +01:00
Ivan Nikulin
55d2731a18 Release 3.0.3 2023-08-05 14:03:58 +01:00
Manuel Olguín Muñoz
57e54be907 Fix missing .trim() when verifying FIPS module name 2023-08-05 13:54:26 +01:00
Ivan Nikulin
bb063aa9e6 Fix Diplay panics for HandshakeError with rpk (fixes #140) 2023-08-03 15:00:09 +01:00
Ivan Nikulin
308f0405bd Release 3.0.2 2023-08-03 13:38:59 +01:00
Ivan Nikulin
7fd29555b6 Fix feature gates for fips-link-precompiled 2023-08-03 13:38:59 +01:00
Anthony Ramine
abfe2f7980 Switch boring from lazy_static to once_cell 2023-08-02 12:14:02 +01:00
Anthony Ramine
af5bb39a78 Clean up and remove some unsafe code from ffi callbacks 2023-08-02 12:14:02 +01:00
Ivan Nikulin
959d7c034e Reduce release bundle size by excluding PQ test data 2023-08-01 18:36:51 +01:00
Nathan Mittler
74fd7a8ce4 Adding hmac.h to included headers
This was originally going to be fixed by #101, however that PR was closed and superseded by #117, which was missing this fix.

The original problem was caused by #97, which updated boringssl to a version that included [a change that removed hmac.h from ssl.h](05b360d797).

This PR adds an include for hmac.h, so it is again available through boring-sys.
2023-08-01 19:13:19 +02:00
Ivan Nikulin
2475ef386b Reduce release bundle size by excluding PQ test data 2023-08-01 17:51:44 +01:00
Ivan Nikulin
33e3d756ff Fix builds for features that require git patches
Previously we were building from the deps directory with submodules. For publishing we were copying files in sumbodules into the package. With this we were making the package directory dirty with build artifacts and applied patches.

This commit change the build script's behaviour: sources are now copied to the output directory and then boringssl is built from there.

In addition, this commit adds files that were missing from the package for building with patches.
2023-08-01 17:33:29 +01:00
Ivan Nikulin
6435c5b8d5 Fix publishing 2023-08-01 11:32:20 +01:00
Ivan Nikulin
c71e2bed39
Merge pull request #131 from inikulin/rel-3.0.0
Release 3.0.0
2023-07-28 14:15:39 +01:00
Ivan Nikulin
c12bfc21f6 Release 3.0.0 2023-07-28 14:07:22 +01:00
Ivan Nikulin
07a8b431ea Add git-cliff configuration 2023-07-28 14:02:46 +01:00
Ivan Nikulin
4761cf7805
Merge pull request #84 from signalapp/macos-cross-compile
boring-sys: Handle cross-compiling macOS targets
2023-07-28 13:21:04 +01:00
Ivan Nikulin
4e190ad00c
Merge pull request #95 from signalapp/libsignal-arm
boring-sys: Add support for cross-compiling to Linux ARM(v7)
2023-07-28 13:20:32 +01:00
Ivan Nikulin
c07c414565
Merge pull request #96 from signalapp/android-sysroot
boring-sys: Update Android NDK sysroot path
2023-07-28 13:19:58 +01:00
Jordan Rose
a39f0c78ee boring-sys: Handle cross-compiling macOS targets
...such as compiling for Apple Silicon on an Intel Mac.
2023-07-27 13:17:40 -07:00
morph027
bb5caa43a2 boring-sys: Add support for Linux ARM(v7)
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-07-27 13:15:53 -07:00
Jordan Rose
32feb4f958 boring-sys: Update Android NDK sysroot path
This longer path (inside the prebuilt toolchain included in the NDK)
has been the preferred sysroot since NDK r19. Newer NDKs no longer
have a top-level "sysroot" directory at all.
2023-07-27 13:12:57 -07:00
Ivan Nikulin
3478bc2668
Merge pull request #83 from signalapp/private_key_to_der_pkcs8
boring: Expose PKey::private_key_to_der_pkcs8(_passphrase)
2023-07-27 10:11:02 +01:00
Ivan Nikulin
f9e1d2e51c
Merge pull request #130 from inikulin/frankenfips
Add fips-link-precompiled feature
2023-07-27 10:05:08 +01:00
Ivan Nikulin
d4ddd16ee2 Add fips-link-precompiled feature 2023-07-26 14:35:40 +01:00
Ivan Nikulin
09d92e54fc
Merge pull request #128 from ghedo/bssl_source_path
Allow specifying a custom BoringSSL source directory
2023-07-14 15:14:42 +01:00
Alessandro Ghedini
f772338238 Allow specifying a custom BoringSSL source directory 2023-07-14 10:47:37 +01:00
Ivan Nikulin
63e178d880
Merge pull request #126 from inikulin/rpk-pqc
Add RPK and PQ crypto features
2023-07-10 23:08:33 +01:00
Ivan Nikulin
0b542999d4 Address review comments 2023-07-10 14:00:52 +01:00