Commit Graph

3419 Commits

Author SHA1 Message Date
Leo Blöcher baede6c0af Remove INVALID_CALL from mid-handshake error message
Mid-handshake errors that occur before certificate verification
currently look like this:

```
TLS handshake failed: cert verification failed - Invalid certificate verification context [WRONG_VERSION_NUMBER]
```

Despite no certificate even being received yet, the error complains
about a failed verification. The cause here is that `cert verification
failed` is only omitted if the verification result is `OK`. The default
in BoringSSL before verification runs is `INVALID_CALL`, however.

`INVALID_CALL` is set/returned in these places:
- 44b3df6f03/src/ssl/internal.h (L3904)
- 44b3df6f03/src/ssl/ssl_session.cc (L396)
- 44b3df6f03/src/ssl/ssl_x509.cc (L713)

It is not used anywhere else as a verification result code. To improve
the error message, this commit adds `INVALID_CALL` as a verification
result for which no additional error is dislayed.
2025-01-06 16:12:05 +00:00
Rushil Mehra 33b511331b 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.
2025-01-06 16:08:33 +00:00
Rushil Mehra c05a339911 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
54c956b2e6.

Before releasing this change, we'll need to figure out a way to support
this for windows.
2025-01-06 16:08:33 +00:00
0x676e67 787606f830 v4.13.6 2025-01-05 11:56:10 +08:00
0x676e67 0e6b794ead
feat(boring): Add optional disable `PSK_DHE_KE` (#32) 2025-01-05 11:54:25 +08:00
0x676e67 543492f35d v4.13.5 2024-12-23 08:15:44 +08:00
0x676e67 5a03ebfbb6
chore: Remove extended alignment bounds validation unless the user is knowledgeable (#31) 2024-12-23 08:14:25 +08:00
0x676e67 6e966c9dac v4.13.4 2024-12-20 14:39:40 +08:00
0x676e67 d6e1792a7f
chore: Disable extended permutation deduplication verification (#30)
* chore: Disable extended permutation deduplication verification

* Update docs
2024-12-20 14:38:42 +08:00
0x676e67 f8e01e3d0c
feat: Expose extended sorting from indices (#29) 2024-12-20 14:18:16 +08:00
0x676e67 f9a7334f54 v4.13.3 2024-12-19 23:23:11 +08:00
0x676e67 66cc25a270
feat: Add setup extension permutation (#28) 2024-12-19 23:21:31 +08:00
0x676e67 292b2a1513
refactor: refactor `key_shares` length limit (#27) 2024-12-19 18:17:40 +08:00
0x676e67 928968947a
boring-sys: Add TLS extension zstd cert compression (#24) 2024-12-18 19:34:06 +08:00
0x676e67 b4c46bb8a1
patch: Add enable three `key_shares` limit (#23) 2024-12-18 18:58:41 +08:00
0x676e67 abd65310ba
patch: Add option enable delegated_credentials (#22) 2024-12-18 16:32:38 +08:00
0x676e67 39914a641c
patch: Add option enable record_size_limit (#21) 2024-12-18 14:57:23 +08:00
0x676e67 6ef0ca379e
boring: Add SslCurve `FFDHE2048`/`FFDHE3072` NID support (#20) 2024-12-18 13:14:02 +08:00
0x676e67 30cadfb1eb
boring: Add SslCurve `FFDHE2048`/`FFDHE3072` support (#19) 2024-12-17 23:22:56 +08:00
0x676e67 0ee30f7487
boring: update old ciphers patch (#18) 2024-12-17 20:12:33 +08:00
0x676e67 b9e1dbf825 Merge remote-tracking branch 'upstream/master' 2024-12-10 12:00:48 +08:00
Paul Mabileau 49d5a61163 Refactor!: Introduce a Cargo feature for optional Hyper 0 support
Closes #294. Requires breaking changes. The default v0 is changed in
favor of v1, but v0 is still kept available, just in a forced module
path. It enables dependency de-duplication when consuming it.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2024-12-07 21:07:31 +00:00
Paul Mabileau e518c2444a Refactor!: Remove strict `TokioIo` response requirement from `hyper_boring::v1::HttpsConnector`
Closes #295.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2024-12-07 19:20:22 +00:00
0x676e67 8467142bf2 v4.13.2 2024-12-06 23:02:48 +08:00
0x676e67 cbe77fd2ff
boring: Add SslConnector no default cert verify paths builder (#16) 2024-12-06 23:01:36 +08:00
0x676e67 f1c29d439c sync upstream 2024-12-06 22:59:10 +08:00
Rushil Mehra 4685af00bb Release 4.13.0 2024-11-28 12:47:31 -08:00
Kornel 57fbe0f594 Sync X509StoreBuilder with openssl 2024-11-28 11:48:09 -08:00
Kornel b26b78611b Sync X509VerifyFlags with openssl 2024-11-28 11:48:09 -08:00
Steven Fackler 6ef5c28239 More corresponds from openssl 2024-11-28 11:48:09 -08:00
Kornel 1946603e15 Work around Rust settings inconsistent iOS SDK version 2024-11-28 11:21:39 -08:00
Kornel 81e84c26a2 Clippy 2024-11-28 11:21:39 -08:00
Paul Mabileau 7ac0d2105c Fix Windows build
Only with this does it work for us.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2024-11-27 12:56:03 -08:00
0x676e67 8b986e3521 v4.12.1 2024-11-27 19:48:56 +08:00
0x676e67 63d01c439a
Fix Windows build (#13) 2024-11-27 19:47:44 +08:00
0x676e67 5422a6bdce Merge remote-tracking branch 'upstream/master' 2024-11-21 10:02:26 +08:00
Evan Rittenhouse 2b75e1e127 Release 4.12.0 2024-11-20 08:59:31 -08:00
Evan Rittenhouse c113ec5a0d Add bindings for SSL_CB_ACCEPT_EXIT and SSL_CB_CONNECT_EXIT 2024-11-20 08:17:44 -08:00
0x676e67 1893144398
Update README.md 2024-11-15 10:55:58 +08:00
0x676e67 4e819482a1
Update README.md 2024-11-15 10:53:46 +08:00
0x676e67 5ddb1ee185 rename rboring to boring2 2024-11-15 10:44:03 +08:00
0x676e67 837ec6227b rename tokio-rboring to tokio-boring2 2024-11-15 10:42:55 +08:00
0x676e67 6b5844021d rename rboring-sys to boring-sys2 2024-11-15 10:42:09 +08:00
0x676e67 c77b15182d v4.11.1 2024-11-03 21:23:39 +08:00
0x676e67 a712b93e44 Fix X25519_MLKEM768 mapper 2024-11-03 21:23:26 +08:00
0x676e67 6768d3c437
sync upstream (#12)
* Release 4.10.3 (#280)

* Create semgrep.yml

Creating Semgrep.yml file - Semgrep is a tool that will be used to scan Cloudflare's public repos for Supply chain, code and secrets. This work is part of Application & Product Security team's initiative to onboard Semgrep onto all of Cloudflare's public repos.

In case of any questions, please reach out to "Hrushikesh Deshpande" on cf internal chat.

* Add "fips-compat" feature (#286)

This adds a feature to build against a BoringSSL version compatible with
the current boringssl-fips, but _without_ actually enabling the `fips`
feature.

This can be useful to use with `fips-link-precompiled` while using a
custom BoringSSL version based on the older FIPS branch.

* boring-sys: include HPKE header file for bindgen

BoringSSL doesn't expose these APIs for FIPs builds, so we gate them
here as well

* Release 4.11.0

* Add `set_cert_verify_callback` (`SSL_CTX_set_cert_verify`)

Add a wrapper for `SSL_CTX_set_cert_verify`, which allows consumers to
override the default certificate verification behavior.

The binding resembles `SSL_CTX_set_verify`'s.

See
https://docs.openssl.org/master/man3/SSL_CTX_set_cert_verify_callback/
for more details.

* Skip bindgen 0.70's layout tests before Rust 1.77

* (ci): brew link x86 toolchain for macos13 runner

It seems we need to manually symlink the x86_64-unknown-linux-gnu
toolchain for the macos13 runner. Also, we don't need to overwrite the
python version anymore

Fixes https://github.com/cloudflare/boring/issues/285

* feat(boring): Add SSL_CURVE_X25519_MLKEM768 curve binding

---------

Co-authored-by: Rushil Mehra <84047965+rushilmehra@users.noreply.github.com>
Co-authored-by: Hrushikesh Deshpande <161167942+hrushikeshdeshpande@users.noreply.github.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
Co-authored-by: James Larisch <jlarisch@cloudflare.com>
Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Rushil Mehra <rmehra@cloudflare.com>
2024-11-03 21:13:37 +08:00
0x676e67 ab7848d878
feat(boring): Add SSL_CURVE_X25519_MLKEM768 curve binding (#11) 2024-11-03 21:12:28 +08:00
Rushil Mehra 7bb3647406 (ci): brew link x86 toolchain for macos13 runner
It seems we need to manually symlink the x86_64-unknown-linux-gnu
toolchain for the macos13 runner. Also, we don't need to overwrite the
python version anymore

Fixes https://github.com/cloudflare/boring/issues/285
2024-10-24 09:49:47 -07:00
Jordan Rose 3044e9ba98 Skip bindgen 0.70's layout tests before Rust 1.77 2024-10-22 16:53:40 -07:00
James Larisch bb373e5550 Add `set_cert_verify_callback` (`SSL_CTX_set_cert_verify`)
Add a wrapper for `SSL_CTX_set_cert_verify`, which allows consumers to
override the default certificate verification behavior.

The binding resembles `SSL_CTX_set_verify`'s.

See
https://docs.openssl.org/master/man3/SSL_CTX_set_cert_verify_callback/
for more details.
2024-10-22 00:05:57 -07:00