Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge BoringSSL through 20c93abd47726624ab3e479466078f7e63f081f7 #2264

Merged
merged 44 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6855f30
Remove unused files from pki
davidben Jan 30, 2024
56d3ad9
Require SSE2 when targetting 32-bit x86
davidben Jan 27, 2024
608becc
Fix strict aliasing issues with DES_cblock
davidben Jan 20, 2024
10a2132
Create a new NameConstraints constructor that takes in an already con…
hubertchao Feb 1, 2024
79123ca
Ensure additions in this call can't overflow.
Feb 3, 2024
34b51fa
Avoid conversion overflow from struct tm.
Feb 6, 2024
8ff5add
Tighten up the warning about RSAES-PKCS1-v1_5
davidben Feb 8, 2024
fbb4133
Add SSL_get0_chain method
gredner Feb 8, 2024
5dd15f3
Expose OPENSSL_timegm in posix_time.h
Feb 8, 2024
10605c0
Minor formatting fixes
davidben Feb 9, 2024
71c5896
Add functions to convert from Span<const uint8> and std::string_view
davidben Jan 30, 2024
c39e6cd
Use uint64_t for num_read and num_write in BIO
davidben Feb 10, 2024
324db64
Allow the delegate to indicate it wishes to accept PreCertificates
Jan 25, 2024
b1d34cb
Add public API for a certificate.
Nov 23, 2023
80b08df
Don't assume that Fiat assembly is available on Windows.
Feb 13, 2024
58a318e
Make ContainsError look only for Errors, not Warnings.
Feb 13, 2024
48b8146
Move signature_verify_cache.h to openssl/pki as public api
Dec 12, 2023
8049f26
Remove unused include in now public header
davidben Feb 14, 2024
38d17d3
Mark ASN1_STRFLAGS_* and XN_FLAG_* with the right type
davidben Feb 14, 2024
ba5eb62
Add X509_STORE_get1_objects
davidben Jan 25, 2024
5a1a5fb
Remove X509_TRUST_DEFAULT
davidben Dec 26, 2023
1b08502
Unexport most of X509_TRUST and X509_PURPOSE and simplify
davidben Dec 26, 2023
8e6a26d
Merge X509_PURPOSE/X509_TRUST IDs and indices
davidben Dec 26, 2023
a028a23
Document X509_V_FLAG_*
davidben Dec 26, 2023
cb47fdc
Switch to bindgen's static inline support
davidben Feb 14, 2024
22c5477
Include verify_unittest files in PKI_TEST_DATA
agl Feb 14, 2024
9c20a89
Guard C++ headers.
agl Feb 14, 2024
d7f5e18
Work around bindgen bug around constants
davidben Feb 14, 2024
2a5db68
Remove pki/tag.h
davidben Feb 7, 2024
0568c2c
Rewrite the warning about X509_AUX
davidben Dec 28, 2023
c528061
Allow a C++ runtime dependency in libssl
davidben Feb 15, 2024
46ff4f7
Unexport DIST_POINT_set_dpname
davidben Jan 1, 2024
ea003bd
Add x509.h to doc.config
davidben Jan 25, 2024
23824fa
bssl-crypto: remove unused code.
Feb 16, 2024
99e8c6e
Add a no-op OPENSSL_INIT_NO_ATEXIT
davidben Feb 16, 2024
da3b372
Don't report libpki headers as part of libcrypto
davidben Feb 18, 2024
48b0edf
Update delegated credentials to the final RFC
davidben Feb 11, 2024
20c93ab
Remove OPENSSL_IA32_SSE2 checks in x86 perlasm
davidben Jan 27, 2024
5ab7e72
ignore BoringSSL 6855f30.
briansmith Jan 21, 2025
5895ed0
Skip BoringSSL 56d3ad9.
briansmith Jan 21, 2025
4033766
Ignore BoringSSL 608becc..b1d34cb.
briansmith Jan 21, 2025
990b092
Merge BoringSSL 80b08df: Don't assume that Fiat assembly is available…
briansmith Jan 21, 2025
7fb4201
Ignore BoringSSL 58a318e..48b0edf.
briansmith Jan 21, 2025
ee7f382
Merge BoringSSL 20c93ab: Remove OPENSSL_IA32_SSE2 checks in x86 perlasm.
briansmith Jan 21, 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
Prev Previous commit
Next Next commit
Allow a C++ runtime dependency in libssl
I believe the original blocker, gRPC, is now cleared. While I'm here,
make check_imported_libraries print all errors, rather than the first
one. (Though if this sticks, we can probably remove this script. It was
only needed for the C++ runtime check.)

Update-Note: libssl now requires a C++ runtime, in addition to the
pre-existing C++ requirement. Contact the BoringSSL team if this
causes an issue. Some projects may need to switch the final link to
use a C++ linker rather than a C linker.

Change-Id: I94808bf1dad6695ef334e262f3d2426caab0520e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/66288
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
  • Loading branch information
davidben authored and Boringssl LUCI CQ committed Feb 15, 2024
commit c52806157c97105da7fdc2b021d0a0fcd5186bf3
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_CROSSCOMPILING)
endif()
endif()

if(USE_CUSTOM_LIBCXX)
set(BORINGSSL_ALLOW_CXX_RUNTIME 1)
endif()

if(BORINGSSL_ALLOW_CXX_RUNTIME)
add_definitions(-DBORINGSSL_ALLOW_CXX_RUNTIME)
endif()

string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
if(NOT FIPS)
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "relwithassert" OR
Expand Down Expand Up @@ -177,10 +169,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_CXX_FLAGS} -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${C_CXX_FLAGS} -Wmissing-declarations")

if(NOT MSVC AND NOT BORINGSSL_ALLOW_CXX_RUNTIME)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
endif()

# In GCC, -Wmissing-declarations is the C++ spelling of -Wmissing-prototypes
# and using the wrong one is an error. In Clang, -Wmissing-prototypes is the
# spelling for both and -Wmissing-declarations is some other warning.
Expand Down
16 changes: 2 additions & 14 deletions ssl/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,10 @@ UniquePtr<T> MakeUnique(Args &&... args) {
return UniquePtr<T>(New<T>(std::forward<Args>(args)...));
}

#if defined(BORINGSSL_ALLOW_CXX_RUNTIME)
// TODO(davidben): Remove these macros after April 2024, once the C++ runtime
// dependency has stuck.
#define HAS_VIRTUAL_DESTRUCTOR
#define PURE_VIRTUAL = 0
#else
// HAS_VIRTUAL_DESTRUCTOR should be declared in any base class which defines a
// virtual destructor. This avoids a dependency on |_ZdlPv| and prevents the
// class from being used with |delete|.
#define HAS_VIRTUAL_DESTRUCTOR \
void operator delete(void *) { abort(); }

// PURE_VIRTUAL should be used instead of = 0 when defining pure-virtual
// functions. This avoids a dependency on |__cxa_pure_virtual| but loses
// compile-time checking.
#define PURE_VIRTUAL \
{ abort(); }
#endif

// Array<T> is an owning array of elements of |T|.
template <typename T>
Expand Down
35 changes: 24 additions & 11 deletions util/check_imported_libraries.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,49 @@ import (
"debug/elf"
"fmt"
"os"
"path/filepath"
)

func checkImportedLibraries(path string) {
func checkImportedLibraries(path string) bool {
file, err := elf.Open(path)
if err != nil {
fmt.Fprintf(os.Stderr, "Error opening %s: %s\n", path, err)
os.Exit(1)
return false
}
defer file.Close()

libs, err := file.ImportedLibraries()
if err != nil {
fmt.Fprintf(os.Stderr, "Error reading %s: %s\n", path, err)
os.Exit(1)
return false
}

allowCpp := filepath.Base(path) == "libssl.so"
for _, lib := range libs {
if lib != "libc.so.6" && lib != "libcrypto.so" && lib != "libpthread.so.0" {
fmt.Printf("Invalid dependency for %s: %s\n", path, lib)
fmt.Printf("All dependencies:\n")
for _, lib := range libs {
fmt.Printf(" %s\n", lib)
}
os.Exit(1)
if lib == "libc.so.6" || lib == "libcrypto.so" || lib == "libpthread.so.0" || lib == "libgcc_s.so.1" {
continue
}
if allowCpp && lib == "libstdc++.so.6" {
continue
}
fmt.Printf("Invalid dependency for %s: %s\n", path, lib)
fmt.Printf("All dependencies:\n")
for _, lib := range libs {
fmt.Printf(" %s\n", lib)
}
return false
}
return true
}

func main() {
ok := true
for _, path := range os.Args[1:] {
checkImportedLibraries(path)
if !checkImportedLibraries(path) {
ok = false
}
}
if !ok {
os.Exit(1)
}
}