Skip to content

Conversation

@rushilmehra
Copy link
Collaborator

@rushilmehra rushilmehra commented Aug 16, 2024

  • Support linking with a runtime cpp library

As of https://boringssl-review.googlesource.com/c/boringssl/+/66288,
libssl allows a C++ runtime dependency. As such, we need to link with a
cpp runtime library. Implementation is inspired heavily from
google/boringssl@54c956b. Before releasing this change, we'll need to figure out a way to support
this for windows.

  • Fix bug with accessing memzero'd X509StoreContext in tests

As of https://boringssl-review.googlesource.com/c/boringssl/+/64141,
X509_STORE_CTX_cleanup will zero the memory allocated to the
X509_STORE_CTX. Because X509StoreContextRef::init invokes
X509_STORE_CTX_cleanup once the with_context closure has finished,
calling X509StoreContextRef::verify_result (or any API really) is going
to be invalid because memory has been zerod out. This is a pretty big
footgun, so maybe we should consider screaming a bit louder for this
case.

This patch doesn't sync with upstream yet, because all of our patches break due to upstream directory structure changes, and the RPK patch needs to be completely reworked

@rushilmehra rushilmehra changed the title Sync upstream Prepare for syncing with upstream Aug 16, 2024
As of https://boringssl-review.googlesource.com/c/boringssl/+/66288,
libssl allows a C++ runtime dependency. As such, we need to link with a
cpp runtime library. Implementation is inspired heavily from
google/boringssl@54c956b.

Before releasing this change, we'll need to figure out a way to support
this for windows.
As of https://boringssl-review.googlesource.com/c/boringssl/+/64141,
X509_STORE_CTX_cleanup will zero the memory allocated to the
X509_STORE_CTX. Because X509StoreContextRef::init invokes
X509_STORE_CTX_cleanup once the with_context closure has finished,
calling X509StoreContextRef::verify_result (or any API really) is going
to be invalid because memory has been zerod out. This is a pretty big
footgun, so maybe we should consider screaming a bit louder for this
case.
@kornelski kornelski merged commit 33b5113 into master Jan 6, 2025
@kornelski kornelski deleted the sync-upstream branch January 6, 2025 16:08
fhanau added a commit to fhanau/boring that referenced this pull request Mar 18, 2025
This was added in cloudflare#264, but not documented so far.
rushilmehra pushed a commit that referenced this pull request Mar 18, 2025
This was added in #264, but not documented so far.
@RvdE
Copy link

RvdE commented Apr 29, 2025

This patch is causing build failure on FreeBSD. Not sure about the other BSD's, but FreeBSD doesn't have libstdc++, but does have libc++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants