Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
074b6da
Test ASN1_TYPE parsing more extensively
davidben Aug 27, 2025
7c1863d
Make some test data of unknown ASN.1 types slightly less invalid
davidben Aug 28, 2025
85c1fe0
Unexport a few more ASN1_ITEMs
davidben Aug 28, 2025
50e28f5
Use the new SPKI API in d2i_RSA_PUBKEY and friends
davidben Aug 28, 2025
28e4622
Add a few more TODOs for functions that should be const but aren't
davidben Aug 29, 2025
087d397
Document ASN1_item_sign's order of operations a bit
davidben Aug 30, 2025
dba32d7
Refresh basic constraints test certificates
davidben Aug 30, 2025
40e035a
Clear the extension list when removing the last extension
davidben Sep 1, 2025
3682758
Use std::string_view in x509_test.cc
davidben Sep 2, 2025
f3230c3
Test verifying signatures over "unusual" TBSCertificates
davidben Sep 2, 2025
e2a6fe9
Systematically test that parsers catch trailing data
davidben Sep 2, 2025
d000ce1
Add a benchmark for parsing with d2i_X509
davidben Aug 27, 2025
f33224e
Test the implicit cleanup feature of X509_sign_ctx, etc.
davidben Sep 3, 2025
26111ab
Avoid one malloc indirection in X509
davidben Aug 27, 2025
06296a8
Make CBS/CBB-versions of crypto/asn1 types
davidben Aug 27, 2025
15f2302
Write some templated functions for the d2i/i2d convention
davidben Aug 28, 2025
e8db903
Add X509_ALGOR_copy
davidben Aug 28, 2025
c08d7ba
Remove the tag parameter to IMPLEMENT_EXTERN_ASN1
davidben Aug 29, 2025
a79eeb4
Make ASN1_EXTERN_FUNCS's parse callback CBS-based
davidben Aug 29, 2025
421f177
Parse X509_ALGOR without depending on the templates
davidben Aug 28, 2025
c1811e0
Parse X509's signature algorithm with the CBS/CBB functions
davidben Aug 28, 2025
8999c98
Rewrite X509_PUBKEY's parsers with CBS/CBB
davidben Aug 29, 2025
a317d59
Rename X509_CINF::signature to X509_CINF::tbs_sig_alg
davidben Aug 29, 2025
117f86e
Rewrite X509's parser with CBS/CBB
davidben Aug 29, 2025
9e96cc5
Make X509_verify X509_sign_ctx work with EVP_PKEY_RSA_PSS
davidben Sep 2, 2025
4bc3b84
Add X509_parse_with_algorithms
davidben Sep 2, 2025
29cd444
Remove stale static asserts about atomics
davidben Aug 30, 2025
b6b33a8
[gtest] Clean up single-arg `testing::Invoke()`s
jonathan-j-lee Sep 6, 2025
0226f30
Various IWYU fixes
davidben Sep 7, 2025
94fddae
Require configured groups for key exchange to be unique
chlily1 Sep 9, 2025
0459431
Always populate supported_group_list
chlily1 Sep 9, 2025
b28a8c9
Allow SSL_HANDSHAKE::key_shares to vary in size
chlily1 Sep 9, 2025
d142233
Don't include every field in every EVP_PKEY_ALG
davidben Sep 9, 2025
4c14fb3
Store the PSS parameters in the RSA object
davidben Sep 9, 2025
f7309e7
Add EVP_pkey_rsa_pss_sha384 and EVP_pkey_rsa_pss_sha512
davidben Sep 9, 2025
30c7a1d
Make make_unusual_tbs.go test data idempotent
davidben Sep 13, 2025
8780ea0
Test that X509_NAME_add_entry will not allow invalid entries to be added
davidben Aug 30, 2025
e85883f
Make more of atomic<T> available to libcrypto
davidben Aug 30, 2025
3cb3f9e
Test a few more cases of null STACK_OF(T)
davidben Sep 5, 2025
336efd4
Parameterize the tag in IMPLEMENT_EXTERN_ASN1_SIMPLE
davidben Sep 5, 2025
8fe61c3
Rewrite the X509_NAME parser
davidben Aug 30, 2025
0fc0e7a
Const-correct X509_NAME and test thread-safety
davidben Sep 5, 2025
59eaed6
Don't create partial X509 and X509_CRL objects to search the X509_STORE
davidben Sep 5, 2025
854867e
Embed X509_NAME into X509
davidben Sep 5, 2025
acd171c
Unwind ASN1_ANY_AS_STRING
davidben Sep 5, 2025
49aa5bc
Const-correct a bunch more of <openssl/x509.h>
davidben Sep 8, 2025
de49ac9
Test a few more unusual TBS certificates
davidben Sep 7, 2025
413704b
draft-ietf-lamps-x509-policy-graph is now RFC 9618
davidben Sep 6, 2025
dcaedb5
Add API for configuring client key shares
chlily1 Sep 16, 2025
05ff000
Bump the minimum CMake version to 3.22
davidben Sep 18, 2025
f875db3
Reject explicit default X.509 versions and empty extension lists
davidben Sep 18, 2025
e8c1dc3
Remove some stale ifdefs from urandom.cc
davidben Sep 20, 2025
63f42a0
Upgrade the opportunistic CRYPTO_sysrand calls to normal ones
davidben Sep 20, 2025
fa47b1d
Remove stale comment
davidben Sep 21, 2025
a135fe1
Forbid setting EC public key to point at infinity
chlily1 Sep 22, 2025
db41dc2
Use a simpler process to compute n0
davidben Sep 11, 2025
a34ea4d
Use CRYPTO_addc_w in bn_from_montgomery_in_place
davidben Sep 14, 2025
d41763c
Make the ASN1_TYPE-level type take precedence over the ASN1_STRING one
davidben Sep 25, 2025
95f0592
Make setting an X509_NAME to itself work
davidben Sep 25, 2025
f12212b
Fix bugs found by clangsa
poliudian-iv Sep 23, 2025
d5e9aa6
Add a missing note about the hashes in ssl_compliance_policy_fips_202…
davidben Sep 25, 2025
a6b93d1
Document that HMAC_Final can have a nullptr `out_len`.
agl Sep 25, 2025
83297c2
Add ACVP modulewrapper for the jitter entropy SHA-384 implementation.
agl Sep 24, 2025
00676c4
Const-correct all i2d_*_bio functions
chlily1 Sep 26, 2025
857ca8d
Fix and test other self-assignment cases in crypto/x509
davidben Sep 26, 2025
2375765
Add some missing includes
davidben Sep 26, 2025
db63823
Tolerate nullptr in i2d_X509_NAME
davidben Sep 26, 2025
91f3df0
Update status of FIPS 20250728
Sep 29, 2025
b2a2955
Introduce cipher constants without the leading 0x03
davidben Sep 26, 2025
42d9a13
Put the legacy cipher constants back in tls1.h and ssl3.h
davidben Sep 30, 2025
b887f19
Add ML-KEM-768 option for HPKE.
iontzialla Sep 26, 2025
ab74c15
Define X-Wing constants as expressions.
iontzialla Sep 29, 2025
29b9f0f
Add some missing includes
davidben Sep 30, 2025
480148c
entropy_modulewrapper: set batch mode.
agl Sep 30, 2025
706742e
Add ML-KEM-1024 option for HPKE.
iontzialla Sep 30, 2025
21544c5
Rework ML-DSA modular operations
davidben Sep 30, 2025
f6b9ddd
Add newer HPKE configuration to Rust wrappers.
agl Oct 1, 2025
52bb398
Update Bazel deps and bump version for BCR
davidben Oct 2, 2025
caf5961
Update CI dependencies
davidben Oct 2, 2025
19ec2a1
Add API for caller to hint server's preferred key shares
chlily1 Oct 2, 2025
88d0c0f
Bump BORINGSSL_API_VERSION to 37
chlily1 Oct 3, 2025
a056951
Update to upstream 88d0c0f
pi-314159 Oct 6, 2025
6f6cf9a
Update algorithms
pi-314159 Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Unless otherwise noted, build tools must at most five years old, matching
[Abseil guidelines](https://abseil.io/about/compatibility). If in doubt, use the
most recent stable version of each tool.

* [CMake](https://cmake.org/download/) 3.12 or later is required.
* [CMake](https://cmake.org/download/) 3.22 or later is required.

* Building with [Ninja](https://ninja-build.org/) instead of Make is
recommended, because it makes builds faster. On Windows, CMake's Visual
Expand Down Expand Up @@ -74,8 +74,8 @@ themselves automatically.
### Building for Android

It's possible to build BoringSSL with the Android NDK using CMake. Recent
versions of the NDK include a CMake toolchain file which works with CMake 3.6.0
or later. This has been tested with version r16b of the NDK.
versions of the NDK include a CMake toolchain file. This has been tested with
version r16b of the NDK.

Unpack the Android NDK somewhere and export `ANDROID_NDK` to point to the
directory. Then run CMake like this:
Expand Down
27 changes: 5 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.22)

# Defer enabling C and CXX languages.
project(BoringSSL NONE)
Expand Down Expand Up @@ -43,11 +43,6 @@ include(GNUInstallDirs)

set(INSTALL_ENABLED 1)

if(CMAKE_VERSION VERSION_LESS 3.21 AND
CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(PROJECT_IS_TOP_LEVEL 1)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_CROSSCOMPILING AND
BUILD_TESTING)
find_package(PkgConfig QUIET)
Expand Down Expand Up @@ -384,16 +379,6 @@ if(FIPS_DELOCATE OR NOT OPENSSL_NO_ASM)
if (NOT OPENSSL_NO_ASM)
set(OPENSSL_ASM TRUE)
endif()
# Work around https://gitlab.kitware.com/cmake/cmake/-/issues/20771 in older
# CMake versions.
if(APPLE AND CMAKE_VERSION VERSION_LESS 3.19)
if(CMAKE_OSX_SYSROOT)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
endif()
foreach(arch ${CMAKE_OSX_ARCHITECTURES})
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -arch ${arch}")
endforeach()
endif()
if(NOT WIN32)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
endif()
Expand Down Expand Up @@ -749,6 +734,8 @@ endif()
if(FIPS)
add_executable(modulewrapper ${MODULEWRAPPER_SOURCES})
target_link_libraries(modulewrapper crypto)
add_executable(entropy_modulewrapper ${ENTROPY_MODULEWRAPPER_SOURCES})
target_link_libraries(entropy_modulewrapper crypto)
endif()

add_executable(bssl ${BSSL_SOURCES})
Expand All @@ -770,12 +757,8 @@ if(FUZZ)
endif()

if(RUST_BINDINGS)
find_program(BINDGEN_EXECUTABLE bindgen)
if(NOT BINDGEN_EXECUTABLE)
message(FATAL_ERROR "Could not find bindgen but was asked to generate Rust bindings.")
else()
add_subdirectory(rust)
endif()
find_program(BINDGEN_EXECUTABLE bindgen REQUIRED)
add_subdirectory(rust)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# the revision where we bump the version.
module(
name = "boringssl",
version = "0.20250818.0",
version = "0.20251002.0",
compatibility_level = 2,
)

Expand All @@ -30,7 +30,7 @@ module(
# need to request they run tests when triaging issues. If
# https://github.com/bazelbuild/bazel/issues/22187 is ever fixed, we can change
# this.
bazel_dep(name = "googletest", version = "1.17.0")
bazel_dep(name = "googletest", version = "1.17.0.bcr.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.0")
bazel_dep(name = "rules_cc", version = "0.2.8")
bazel_dep(name = "rules_license", version = "1.0.0")
8 changes: 4 additions & 4 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Both liboqs and this fork are part of the **Open Quantum Safe (OQS) project**, w

## Status

This fork is built on top of [commit 208361a](https://github.com/google/boringssl/commit/208361a22e217afca0081acf78b2a3f3cf328a7e), and adds:
This fork is built on top of [commit 88d0c0f](https://github.com/google/boringssl/commit/88d0c0f4772f3abe74f4f1012fe580fa85bab417), and adds:

- quantum-safe key exchange
- hybrid (quantum-safe + elliptic curve) key exchange
Expand Down Expand Up @@ -93,8 +93,6 @@ The following quantum-safe digital signature algorithms from liboqs are supporte
- **UOV**: `OV_Ip_pkc`, `OV_Ip_pkc_skc`
<!--- OQS_TEMPLATE_FRAGMENT_LIST_SIGS_END -->

No [composite signature algorithms](https://datatracker.ietf.org/doc/draft-ietf-lamps-pq-composite-sigs/) are currently implemented. If you need those algorithms, please use the [OQS-provider](https://github.com/open-quantum-safe/oqs-provider) or implement them yourself and create a pull request.

## Quickstart

We've only tested the fork on the latest Ubuntu LTS and Windows. This fork has limited support for other platforms and may not function properly.
Expand Down
17 changes: 15 additions & 2 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@
"crypto/x509/x_req.cc",
"crypto/x509/x_sig.cc",
"crypto/x509/x_spki.cc",
"crypto/x509/x_val.cc",
"crypto/x509/x_x509.cc",
"crypto/x509/x_x509a.cc",
"crypto/xwing/xwing.cc"
Expand Down Expand Up @@ -775,6 +774,7 @@
"test_support": {
"srcs": [
"crypto/test/abi_test.cc",
"crypto/test/der_trailing_data.cc",
"crypto/test/file_test.cc",
"crypto/test/file_test_gtest.cc",
"crypto/test/file_util.cc",
Expand All @@ -784,6 +784,7 @@
],
"internal_hdrs": [
"crypto/test/abi_test.h",
"crypto/test/der_trailing_data.h",
"crypto/test/file_test.h",
"crypto/test/file_util.h",
"crypto/test/gtest_main.h",
Expand Down Expand Up @@ -948,6 +949,7 @@
"crypto/slhdsa/slhdsa_siggen.txt",
"crypto/slhdsa/slhdsa_sigver.txt",
"crypto/x509/test/*.pem",
"crypto/x509/test/*.pk8",
"third_party/wycheproof_testvectors/*.txt"
]
},
Expand Down Expand Up @@ -1087,7 +1089,18 @@
"modulewrapper": {
"srcs": [
"util/fipstools/acvp/modulewrapper/main.cc",
"util/fipstools/acvp/modulewrapper/modulewrapper.cc"
"util/fipstools/acvp/modulewrapper/modulewrapper.cc",
"util/fipstools/acvp/modulewrapper/proto.cc"
],
"internal_hdrs": [
"util/fipstools/acvp/modulewrapper/modulewrapper.h"
]
},
"entropy_modulewrapper": {
"srcs": [
"util/fipstools/acvp/entropy_modulewrapper/main.cc",
"util/fipstools/acvp/entropy_modulewrapper/modulewrapper.cc",
"util/fipstools/acvp/modulewrapper/proto.cc"
],
"internal_hdrs": [
"util/fipstools/acvp/modulewrapper/modulewrapper.h"
Expand Down
44 changes: 13 additions & 31 deletions cmake/go.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,19 @@ endfunction()
function(go_executable dest package)
require_go()
set(godeps "${PROJECT_SOURCE_DIR}/util/godeps.go")
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
# The DEPFILE parameter to add_custom_command only works with Ninja. Query
# the sources at configure time. Additionally, everything depends on go.mod.
# That affects what external packages to use.
#
# TODO(davidben): Starting CMake 3.20, it also works with Make. Starting
# 3.21, it works with Visual Studio and Xcode too.
execute_process(COMMAND ${GO_EXECUTABLE} run ${godeps} -format cmake
-pkg ${package}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE sources
RESULT_VARIABLE godeps_result)
add_custom_command(OUTPUT ${dest}
COMMAND ${GO_EXECUTABLE} build
-o ${CMAKE_CURRENT_BINARY_DIR}/${dest} ${package}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${sources} ${PROJECT_SOURCE_DIR}/go.mod)
else()
# Ninja expects the target in the depfile to match the output. This is a
# relative path from the build directory.
binary_dir_relative_path(${dest} target)
# Ninja expects the target in the depfile to match the output. This is a
# relative path from the build directory.
set(target "${CMAKE_CURRENT_BINARY_DIR}/${dest}")
cmake_path(RELATIVE_PATH target BASE_DIRECTORY "${CMAKE_BINARY_DIR}")

set(depfile "${CMAKE_CURRENT_BINARY_DIR}/${dest}.d")
add_custom_command(OUTPUT ${dest}
COMMAND ${GO_EXECUTABLE} build
-o ${CMAKE_CURRENT_BINARY_DIR}/${dest} ${package}
COMMAND ${GO_EXECUTABLE} run ${godeps} -format depfile
-target ${target} -pkg ${package} -out ${depfile}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${godeps} ${PROJECT_SOURCE_DIR}/go.mod
DEPFILE ${depfile})
endif()
set(depfile "${CMAKE_CURRENT_BINARY_DIR}/${dest}.d")
add_custom_command(OUTPUT ${dest}
COMMAND ${GO_EXECUTABLE} build
-o ${CMAKE_CURRENT_BINARY_DIR}/${dest} ${package}
COMMAND ${GO_EXECUTABLE} run ${godeps} -format depfile
-target ${target} -pkg ${package} -out ${depfile}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${godeps} ${PROJECT_SOURCE_DIR}/go.mod
DEPFILE ${depfile})
endfunction()

12 changes: 0 additions & 12 deletions cmake/paths.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# binary_dir_relative_path sets outvar to
# ${CMAKE_CURRENT_BINARY_DIR}/${cur_bin_dir_relative}, but expressed relative to
# ${CMAKE_BINARY_DIR}.
#
# TODO(davidben): When we require CMake 3.20 or later, this can be replaced with
# the built-in cmake_path(RELATIVE_PATH) function.
function(binary_dir_relative_path cur_bin_dir_relative outvar)
string(LENGTH "${CMAKE_BINARY_DIR}/" root_dir_length)
string(SUBSTRING "${CMAKE_CURRENT_BINARY_DIR}/${cur_bin_dir_relative}" ${root_dir_length} -1 result)
set(${outvar} ${result} PARENT_SCOPE)
endfunction()

# copy_post_build causes targets in ${ARGN} to be copied to
# ${CMAKE_CURRENT_BINARY_DIR}/${dir} after being built.
function(copy_post_build dir)
Expand Down
Loading