Commit Graph

3433 Commits

Author SHA1 Message Date
0x676e67 13eb268616
feat: replace once_cell with LazyLock (#38)
* RTG-3333 Support X25519MLKEM768 by default, but don't sent it as client

X25519MLKEM768 is the standardised successor of the preliminary
X25519Kyber768Draft00. Latest browsers have switched to X25519MLKEM768.
Cloudflare supports both on the edge.

We've had support for X25519MLKEM768 in this crate for a while, but
didn't enable by default. We're now enabling serverside support by
default. We also let clients advertise support when set
to kx-client-pq-supported.

We don't enable support by default yet for clients set to
kx-client-pq-preferred, as that would cause an extra round-trip due to
HelloRetryRequest if the server doesn't support X25519MLKEM768 yet.

BoringSSL against which we build must support X25519MLKEM768, otherwise
this will fail.

* replace once_cell with LazyLock

We can drop the once_cell dependency since the same functionality is
implemented in std now.

Requires bumping MSRV to 1.80.

* fix manual_c_str_literals clippy warning

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
2025-01-23 10:08:15 +08:00
Alessandro Ghedini 76b592673f fix manual_c_str_literals clippy warning 2025-01-22 17:52:35 +00:00
Alessandro Ghedini af9df3765d replace once_cell with LazyLock
We can drop the once_cell dependency since the same functionality is
implemented in std now.

Requires bumping MSRV to 1.80.
2025-01-22 17:52:35 +00:00
0x676e67 1a0f1cd24e v4.14.1 2025-01-22 21:46:54 +08:00
0x676e67 0e555ba26b
feat: deprecated `set_key_shares_length_limit` (#37) 2025-01-22 13:19:08 +08:00
0x676e67 6bd4118645 Update README.md 2025-01-22 13:14:37 +08:00
0x676e67 bed5243775
feat: Add `kDHE` && `ffdhe2048`/`ffdhe3072` curves working implement (#36)
* RTG-3333 Support X25519MLKEM768 by default, but don't sent it as client

X25519MLKEM768 is the standardised successor of the preliminary
X25519Kyber768Draft00. Latest browsers have switched to X25519MLKEM768.
Cloudflare supports both on the edge.

We've had support for X25519MLKEM768 in this crate for a while, but
didn't enable by default. We're now enabling serverside support by
default. We also let clients advertise support when set
to kx-client-pq-supported.

We don't enable support by default yet for clients set to
kx-client-pq-preferred, as that would cause an extra round-trip due to
HelloRetryRequest if the server doesn't support X25519MLKEM768 yet.

BoringSSL against which we build must support X25519MLKEM768, otherwise
this will fail.

* feat: Add kDHE && ffdhe2048/ffdhe3072 curves working implement

* Update

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
2025-01-22 13:08:20 +08:00
0x676e67 5da88184f1
RTG-3333 Support X25519MLKEM768 by default, but don't sent it as client (#35)
X25519MLKEM768 is the standardised successor of the preliminary
X25519Kyber768Draft00. Latest browsers have switched to X25519MLKEM768.
Cloudflare supports both on the edge.

We've had support for X25519MLKEM768 in this crate for a while, but
didn't enable by default. We're now enabling serverside support by
default. We also let clients advertise support when set
to kx-client-pq-supported.

We don't enable support by default yet for clients set to
kx-client-pq-preferred, as that would cause an extra round-trip due to
HelloRetryRequest if the server doesn't support X25519MLKEM768 yet.

BoringSSL against which we build must support X25519MLKEM768, otherwise
this will fail.

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
2025-01-14 22:17:57 +08:00
Bas Westerbaan 6ca27a7738 RTG-3333 Support X25519MLKEM768 by default, but don't sent it as client
X25519MLKEM768 is the standardised successor of the preliminary
X25519Kyber768Draft00. Latest browsers have switched to X25519MLKEM768.
Cloudflare supports both on the edge.

We've had support for X25519MLKEM768 in this crate for a while, but
didn't enable by default. We're now enabling serverside support by
default. We also let clients advertise support when set
to kx-client-pq-supported.

We don't enable support by default yet for clients set to
kx-client-pq-preferred, as that would cause an extra round-trip due to
HelloRetryRequest if the server doesn't support X25519MLKEM768 yet.

BoringSSL against which we build must support X25519MLKEM768, otherwise
this will fail.
2025-01-13 18:10:32 +01:00
0x676e67 038c5b2105 v4.13.8 2025-01-13 13:05:29 +08:00
0x676e67 a9feffea83
docs: Fix docs build (#34) 2025-01-13 13:05:00 +08:00
0x676e67 b875e49daf
boring-sys: Optional SSL_OP_NO_RENEGOTIATION to disable client renegotiation extension (#33) 2025-01-10 16:16:41 +08:00
0x676e67 74c03ad71f Merge remote-tracking branch 'upstream/master' 2025-01-07 15:10:56 +08:00
Rushil Mehra 796afe1637 Allow dead_code instead of disabling clippy entirely for bindgen 2025-01-06 16:12:53 +00:00
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