Skip to content

Update BoringSSL to match gRPC v1.69.0 (b8b3e6e111) - #2002

Merged
AustinBenoit merged 1 commit into
mainfrom
ab-boringssl-firestore-sync
Dec 4, 2026
Merged

AustinBenoit merged 1 commit into
mainfrom
ab-boringssl-firestore-sync

Conversation

@AustinBenoit

Copy link
Copy Markdown
Contributor

Description

Updates firebase-cpp-sdk's desktop BoringSSL dependency from fips-20220613 (June 2022) to commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6 (September 2024), matching the BoringSSL version pinned in grpc/grpc@v1.69.0/bazel/grpc_deps.bzl (which Firestore's CMake build uses).

Key changes:

  • cmake/external/boringssl.cmake: Switched from a shallow git fetch of fips-20220613 to a SHA256-verified tarball download of b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6, and removed the obsolete scripts/git/patches/boringssl/0001-disable-warnings.patch (no longer needed with the generated master-with-bazel CMake build).
  • CMakeLists.txt, cmake/external_rules.cmake, build_scripts/desktop/package.sh: Updated BoringSSL header paths (boringssl/src/include) and flattened static library output paths (boringssl-build/{libssl.a,libcrypto.a} on Unix and boringssl-build/<Config>/{ssl,crypto}.lib on MSVC).
  • GCC 14+/15 support: b8b3e6e111 builds cleanly under GCC 15 without patching (resolving the -Werror=discarded-qualifiers failure in fips-20220613's bcm.c and including upstream #if !defined(__cplusplus) guards around C11 _Generic).

Testing

  • Built on Linux (GCC 15.2.0) with -DFIREBASE_USE_BORINGSSL=ON -DFIREBASE_INCLUDE_FIRESTORE=ON -DFIREBASE_CPP_BUILD_TESTS=ON -DFIREBASE_FORCE_FAKE_SECURE_STORAGE=ON -DFIREBASE_LINUX_USE_CXX11_ABI=TRUE:
    • Confirmed BoringSSL b8b3e6e111, libcurl 8.23.0 (Enabled SSL backends: BoringSSL), firebase_database, and firebase_firestore / gRPC 1.69.0 (gRPC_SSL_PROVIDER=package) compile and link cleanly.
    • Ran firebase_app_rest_tls_policy_test and firebase_rtdb_util_desktop_test via ctest (2/2 passed).
  • Ran scripts/gha/check_copyright.sh -g.
  • Relying on CI for Windows (MSVC), macOS, and packaging verification.

Type of Change

Place an x in the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Update firebase-cpp-sdk's BoringSSL dependency from fips-20220613 to commit
b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6, matching gRPC v1.69.0's
bazel/grpc_deps.bzl:

- Download the pinned tarball with SHA256 verification instead of shallow git
  fetch, and remove the obsolete scripts/git/patches/boringssl/0001-disable-warnings.patch.
- Update BoringSSL header path (boringssl/src/include) and flattened static
  library paths (boringssl-build/{libssl.a,libcrypto.a} and MSVC config subdirs)
  in CMakeLists.txt, cmake/external_rules.cmake, and build_scripts/desktop/package.sh.
- Fixes GCC 14+/15 compilation (b8b3e6e111 includes upstream C++ guards around
  C11 _Generic in crypto/internal.h).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the BoringSSL dependency configuration by switching from a git-based download with a patch to downloading a specific commit tarball with SHA256 verification. It also adjusts the associated library and header paths across the build and packaging scripts. The feedback recommends renaming the generic commit variable in CMake to prevent scope pollution and wrapping file paths in double quotes to ensure robustness against paths containing spaces.

Comment on lines +23 to +31
set(commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6)

ExternalProject_Add(
boringssl

DOWNLOAD_COMMAND
COMMAND git init boringssl
COMMAND cd boringssl && git fetch --depth=1 https://github.com/google/boringssl.git ${boringssl_commit_tag} && git reset --hard FETCH_HEAD

PATCH_COMMAND git apply ${patch_file} && git gc --aggressive
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME boringssl-${commit}.tar.gz
URL https://github.com/google/boringssl/archive/${commit}.tar.gz
URL_HASH SHA256=c70d519e4ee709b7a74410a5e3a937428b8198d793a3d771be3dd2086ae167c8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using a generic variable name like commit can lead to variable pollution and conflicts if other external dependency scripts (which may be included in the same CMake scope) also define a variable named commit. It is safer to use a prefixed variable name, such as boringssl_commit, or retain the previous boringssl_commit_tag naming convention.

set(boringssl_commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6)

ExternalProject_Add(
  boringssl

  DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
  DOWNLOAD_NAME boringssl-${boringssl_commit}.tar.gz
  URL https://github.com/google/boringssl/archive/${boringssl_commit}.tar.gz
  URL_HASH SHA256=c70d519e4ee709b7a74410a5e3a937428b8198d793a3d771be3dd2086ae167c8

# CMake's find_package(OpenSSL) doesn't quite work right with BoringSSL
# unless the header file contains OPENSSL_VERSION_NUMBER.
file(READ ${PROJECT_BINARY_DIR}/external/src/boringssl/include/openssl/opensslv.h TMP_HEADER_CONTENTS)
file(READ ${PROJECT_BINARY_DIR}/external/src/boringssl/src/include/openssl/opensslv.h TMP_HEADER_CONTENTS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

File paths in CMake should be wrapped in double quotes to prevent errors if the path contains spaces (e.g., if the build directory path contains spaces). Please apply this quoting to all file(READ) and file(APPEND) calls in this block (lines 111, 113, 119, and 121).

      file(READ "${PROJECT_BINARY_DIR}/external/src/boringssl/src/include/openssl/opensslv.h" TMP_HEADER_CONTENTS)

@AustinBenoit AustinBenoit added the skip-release-notes Skip release notes check label Dec 3, 2026
@AustinBenoit
AustinBenoit marked this pull request as ready for review December 3, 2026 20:15
@AustinBenoit AustinBenoit added the tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). label Dec 3, 2026
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

❌  Integration test FAILED

Requested by @AustinBenoit on commit 66dce9f
Last updated: Fri Dec 4 12:05 PST 2026
View integration test log & download artifacts

Failures Configs
database [TEST] [FLAKINESS] [Android] [1/3 os: ubuntu] [1/2 android_device: android_target]
(1 failed tests)  CRASH/TIMEOUT
firestore [TEST] [FAILURE] [Android] [1/3 os: windows] [1/2 android_device: emulator_ftl_target]
(22 failed tests)  FirestoreTest.TestDocumentSnapshotEventsForAdd
  FirestoreTest.TestDocumentSnapshotEventsForChange
  NumericTransformsTest.CreateDocumentWithIncrement
  NumericTransformsTest.DoubleIncrementWithExistingDouble
  NumericTransformsTest.DoubleIncrementWithExistingInteger
  NumericTransformsTest.DoubleIncrementWithExistingString
  NumericTransformsTest.IncrementDeleteIncrementInABatch
  NumericTransformsTest.IncrementTwiceInABatch
  NumericTransformsTest.IntegerIncrementWithExistingDouble
  NumericTransformsTest.IntegerIncrementWithExistingInteger
  NumericTransformsTest.IntegerIncrementWithExistingString
  NumericTransformsTest.MergeOnNonExistingDocumentWithIncrement
  NumericTransformsTest.MultipleDoubleIncrements
  NumericTransformsTest.ServerTimestampAndIncrement
  ServerTimestampTest.TestServerTimestampsCanRetainPreviousValueThroughConsecutiveUpdates
  ServerTimestampTest.TestServerTimestampsCanReturnEstimatedValue
  ServerTimestampTest.TestServerTimestampsCanReturnPreviousValue
  ServerTimestampTest.TestServerTimestampsCanReturnPreviousValueOfDifferentType
  ServerTimestampTest.TestServerTimestampsUsesPreviousValueFromLocalMutation
  ServerTimestampTest.TestServerTimestampsWorkViaSet
  ServerTimestampTest.TestServerTimestampsWorkViaTransactionUpdate
  ValidationTest.QueriesCannotBeSortedByAnUncommittedServerTimestamp
[TEST] [FLAKINESS] [Android] [1/3 os: macos] [1/2 android_device: emulator_ftl_target]
(15 failed tests)  NumericTransformsTest.CreateDocumentWithIncrement
  NumericTransformsTest.DoubleIncrementWithExistingDouble
  NumericTransformsTest.IntegerIncrementWithExistingDouble
  NumericTransformsTest.IntegerIncrementWithExistingInteger
  NumericTransformsTest.MergeOnNonExistingDocumentWithIncrement
  QueryTest.TestCanListenForTheSameQueryWithDifferentOptions
  ServerTimestampTest.TestServerTimestampsCanRetainPreviousValueThroughConsecutiveUpdates
  ServerTimestampTest.TestServerTimestampsCanReturnEstimatedValue
  ServerTimestampTest.TestServerTimestampsCanReturnPreviousValue
  ServerTimestampTest.TestServerTimestampsUsesPreviousValueFromLocalMutation
  ServerTimestampTest.TestServerTimestampsWorkViaSet
  ServerTimestampTest.TestServerTimestampsWorkViaTransactionUpdate
  ServerTimestampTest.TestServerTimestampsWorkViaUpdate
  ValidationTest.QueriesCannotBeSortedByAnUncommittedServerTimestamp
  WriteBatchTest.TestBatchesCommitAtomicallyRaisingCorrectEvents

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions Bot added the tests: succeeded This PR's integration tests succeeded. label Dec 3, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 3, 2026
@AustinBenoit
AustinBenoit merged commit 66dce9f into main Dec 4, 2026
88 of 106 checks passed
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests: succeeded This PR's integration tests succeeded. labels Dec 4, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release-notes Skip release notes check tests: failed This PR's integration tests failed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants