Commit Graph

176 Commits

Author SHA1 Message Date
Jordan Rose
2c157897fe Merge in upstream v5.0.2
Some checks failed
CI / Test (true, map[CC:gcc CPLUS_INCLUDE_PATH:C:\msys64\usr\include CXX:g++ C_INCLUDE_PATH:C:\msys64\usr\include LIBRARY_PATH:C:\msys64\usr\lib RUSTC_BOOTSTRAP:1], --workspace --exclude tokio-boring --exclude hyper-boring -Z checksum-freshness, windows-lat… (push) Has been cancelled
CI / Test (true, map[CMAKE_GENERATOR:MinGW Makefiles COLLECT_GCC:<nil> RUSTC_BOOTSTRAP:1], --workspace --exclude tokio-boring --exclude hyper-boring -Z checksum-freshness, windows-latest, stable, i686-pc-windows-gnu, i686-mingw) (push) Has been cancelled
CI / Test (true, map[CXXFLAGS:-msse2], ubuntu-latest, stable, i686-linux-android, i686-android) (push) Has been cancelled
CI / Test (true, map[IPHONEOS_DEPLOYMENT_TARGET:17.5], macos-latest, aarch64-apple-ios, aarch64-ios) (push) Has been cancelled
CI / Test (true, map[IPHONEOS_DEPLOYMENT_TARGET:17.5], macos-latest, aarch64-apple-ios-sim, aarch64-ios-sim) (push) Has been cancelled
CI / Test (true, map[IPHONEOS_DEPLOYMENT_TARGET:17.5], 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, 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 (macos-latest, stable, x86_64-apple-darwin, x86_64-macos) (push) Has been cancelled
CI / Test (map[CXXFLAGS:-msse2 RUSTC_BOOTSTRAP:1], --workspace --exclude tokio-boring --exclude hyper-boring -Z checksum-freshness, windows-latest, stable-x86_64-msvc, i686-pc-windows-msvc, i686-msvc) (push) Has been cancelled
CI / Test (map[RUSTC_BOOTSTRAP:1 RUSTFLAGS:-Dwarnings -C target-feature=+crt-static], --workspace --exclude tokio-boring --exclude hyper-boring -Z checksum-freshness, windows-latest, stable-x86_64-msvc, x86_64-pc-windows-msvc, x86_64-msvc-static) (push) Has been cancelled
CI / Test (map[RUSTC_BOOTSTRAP:1], --workspace --exclude tokio-boring --exclude hyper-boring -Z checksum-freshness, windows-latest, stable-x86_64-msvc, x86_64-pc-windows-msvc, x86_64-msvc) (push) Has been cancelled
CI / Test (map[]) (push) Has been cancelled
CI / Test (true, macos-latest, stable, aarch64-apple-darwin, arm64-macos) (push) Has been cancelled
CI / rustfmt (push) Has been cancelled
CI / clippy (push) Has been cancelled
CI / Test () (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, map[CXXFLAGS:-msse2], ubuntu-latest, stable, i686-unknown-linux-gnu, i686-linux) (push) Has been cancelled
CI / Test FIPS integration (push) Has been cancelled
CI / Cross build from macOS to Linux (x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / Test features (push) Has been cancelled
2026-02-18 17:24:41 -08:00
Kornel
1f8a1041df Don't add build/ to non-FIPS pre-built path 2026-02-17 19:59:23 +00:00
Jordan Rose
ee95e2060a boring-sys: Support static MSVC runtime 2026-02-13 01:51:50 +00:00
Kornel
5bd645077b README links 2026-02-12 13:29:59 +00:00
Jordan Rose
c740bd7715 Revert "Support TARGET_CC and CC_{target}"
This reverts commit a50a39fde7,
which interferes with CMake's own support for these variables,
at least how Signal has been using them.
2026-02-11 13:37:41 -08:00
Kornel
a40cba6cd6 Make ML-KEM optional 2026-02-11 21:00:08 +00:00
Kornel
9cc97c87c7 Don't always require all headers from all versions of BoringSSL 2026-02-11 21:00:08 +00:00
Kornel
532003e437 Don't always require all headers from all versions of BoringSSL 2026-02-11 16:22:11 +00:00
Kornel
ae4a737426 Update README 2026-02-10 16:28:54 +00:00
Kornel
8ba06e1974 rm symlink 2026-02-10 16:28:54 +00:00
Kornel
5f4cf54cc5 Bump rust-version to 1.85 2026-02-04 00:54:35 +00:00
Kornel
7cb4c89550 Detect bad headers in boring-sys 2026-02-04 00:54:35 +00:00
Lina Baquero
f4dba99cd3
feat(boring-sys): add mlkem.h to bindgen headers (#455)
This enables rust bindings for BoringSSL's ML-KEM pq key encapsulation
including MLKEM758 and MLKEM1024
2026-01-27 06:10:37 -08:00
Kirill A. Korinsky
13b2db754d OpenBSD uses -lc++ as well 2026-01-27 00:59:21 +00:00
Kornel
48e27ae5a3 More helpful build errors 2026-01-26 15:29:07 +00:00
Kornel
f76cdc7502 Handle broken include dirs 2026-01-26 15:29:07 +00:00
Kornel
64b3e14976 Fix docs.rs build 2026-01-23 13:03:08 +00:00
Kornel
f10b98672a Fix docs.rs build 2026-01-21 19:09:22 +00:00
Kornel
97aa4a987e Include err.h in FFI bindings 2026-01-20 17:05:55 +00:00
Kornel
b65a064e76 Remove blanket Eq from FFI types 2026-01-20 15:53:04 +00:00
Kornel
d322d3a380 Clippy 2026-01-20 15:49:25 +00:00
Kornel
13ef735d35 Cleaner include path check 2026-01-20 15:49:25 +00:00
Anthony Ramine
93d9018774 Update boring to a newer version
RPK support has changed completely, it uses SSL_CREDENTIAL now.

Have fun reviewing this!
2026-01-20 14:40:35 +00:00
Anthony Ramine
acd8cbaf02 Fix MinGW builds
Those need to link against libstdc++.
2026-01-20 14:40:35 +00:00
Anthony Ramine
3ac364abc4 Fix Android builds
For starters, they should link against libc++, as they have always
intended to use STL "c++_shared".

824f2a7a20/Modules/Platform/Android-Common.cmake (L70-L75)

Also, fix the variable names we define, as far as I know cmake never
cared about ANDROID_NATIVE_API_LEVEL nor ANDROID_STL.
2026-01-20 14:40:35 +00:00
Anthony Ramine
c299b1476b Never use the debug CRT on Windows
See https://github.com/rust-lang/cmake-rs/pull/30#issuecomment-2968661195.
2026-01-20 14:40:35 +00:00
Kornel
7cb075cc6f Include err.h in FFI bindings 2026-01-20 14:40:35 +00:00
Kornel
41b4d6b77e Warn about BORING_BSSL_FIPS_PATH vs BORING_BSSL_PATH 2026-01-07 19:47:48 +00:00
Kornel
fc4ccbee1d Clippy CI blocker 2026-01-07 19:47:48 +00:00
Kornel
04114a8868 Fewer unwrap()s 2026-01-06 16:09:57 +00:00
southorange0929
1999540f7d feat: support openharmony platform 2026-01-06 13:09:19 +00:00
Jaap Aarts
f2f4871a39 Freebsd build 2025-12-05 14:15:58 +00:00
Bas Westerbaan
237c82d394 pq: fix MSVC C4146 warning 2025-12-05 14:15:58 +00:00
Kornel
7c8dd2678a Ensure that ERR_LIB type can be named 2025-12-05 14:15:58 +00:00
Bas Westerbaan
47c33f6428 pq patch: also enable P256Kyber768Draft00 by default 2025-10-28 10:54:23 +00:00
Bas Westerbaan
410a96752b pq patch: enable PQ by default like upstream
The big diff is misleading. Applying each patch to the base 478b28ab12f
and comparing them, we see:

git range-diff 478b28ab12f2001a03261624261fd041f5439706..adcd4022f75953605a9bf9f6a4a45c0b4fd8ed94 478b28ab12f2001a03261624261fd041f5439706..6f1b1e1f451e61cd2bda0922eecaa8387397ac5a
1:  adcd4022f ! 1:  6f1b1e1f4 Add additional post-quantum key agreements
    @@ Commit message

         This patch adds:

    -    1. Support for MLKEM768X25519 under the codepoint 0x11ec. The version
    -       of BoringSSL we patch against did not support it yet.
    +    1. Support for X25519MLKEM768 under the codepoint 0x11ec. The version
    +       of BoringSSL we patch against did not support it yet. Like recent
    +       upstream, enable by default.

         2. Supports for P256Kyber768Draft00 under 0xfe32, which we temporarily
            need for compliance reasons.  (Note that this is not the codepoint
    @@ ssl/extensions.cc: static bool tls1_check_duplicate_extensions(const CBS *cbs) {
            return true;
          default:
            return false;
    +@@ ssl/extensions.cc: bool ssl_client_hello_get_extension(const SSL_CLIENT_HELLO *client_hello,
    + }
    +
    + static const uint16_t kDefaultGroups[] = {
    ++    SSL_GROUP_X25519_MLKEM768,
    +     SSL_GROUP_X25519,
    +     SSL_GROUP_SECP256R1,
    +     SSL_GROUP_SECP384R1,

      ## ssl/ssl_key_share.cc ##
     @@
2025-10-28 10:54:23 +00:00
Jaap Aarts
e23d2d16d4 Update main.rs 2025-10-16 13:31:09 +01:00
Christopher Patton
5cd912df1d Remove "pq-experimental", apply PQ patch by default
Users can override the new default behavior in the usual way. The
expectation is that the build of BoringSSL they provide the feature set
implemented by the patch.
2025-10-15 10:36:27 +01:00
Bas Westerbaan
21735accf8 pq: fix MSVC C4146 warning 2025-09-30 16:22:47 +02:00
Alessandro Ghedini
4cb7e260a8 Clean-up legacy FIPS options
Per BoringSSL's FIPS policy, its `main` branch is the "update branch"
for FedRAMP compliance's purposes.

This means that we can stop using a specific BoringSSL branch when
enabling FIPS, as well as a number of hacks that allowed us to build
more recent BoringSSL versions with an older pre-compiled FIPS modules.

This also required slightly updating the main BoringSSL submodule, as
the previous version had an issue when building with the FIPS option
enabled. This is turn required some changes to the PQ patch as well as
some APIs that don't seem to be exposed publicly, as well as changing
some paths in the other patches.

In order to allow a smooth upgrade of internal projects, the `fips-compat`
feature is reduced in scope and renamed to `legacy-compat-deprecated` so
that we can incrementally upgrade internal BoringSSL forks. In practice
this shouldn't really be something anyone else would need, since in
order to work it requires a specific mix of BoringSSL version and
backported patches.
2025-09-26 17:12:23 +01:00
Kornel
974c3d2db0 Ensure that ERR_LIB type can be named 2025-09-26 14:17:31 +01:00
Kornel
3116032a83 Skip Rust version detection for bindgen 2025-09-26 13:34:13 +01:00
Kornel
9bad96e48b Style nits 2025-09-26 13:33:19 +01:00
Kornel
a50a39fde7 Support TARGET_CC and CC_{target} 2025-09-26 10:57:01 +01:00
Kornel
21f2885be3 Fix swapped host/target args 2025-09-26 10:57:01 +01:00
Kornel
c5045fb6b4 Fix patched docs.rs builds 2025-09-03 17:24:22 +01:00
Kornel
a264df22fa Clippy 2025-08-29 10:51:09 -07:00
Kornel
0ca11b5680 Use cargo:warning for warnings 2025-06-13 15:06:50 +02:00
Kornel
8d5fba3767 Don't link binaries on docs.rs 2025-06-13 15:06:50 +02:00
Kornel
5fa9c81c88
Sprinkle #[must_use] (#368) 2025-06-05 20:40:35 +01:00