Commit Graph

3305 Commits

Author SHA1 Message Date
0x676e67 50437d514c v4.15.6 2025-02-16 21:07:21 +08:00
0x676e67 46aeed7868
boring(patch): Fix `alps_use_new_codepoint` not initialized, may lead to undefined behavior, then get any value (#52) 2025-02-16 21:04:33 +08:00
0x676e67 e7c534cda3 v4.15.5 2025-02-14 02:11:25 +08:00
0x676e67 8adb21b3b4
build: Fix 32-bit platform build (#51) 2025-02-14 02:10:21 +08:00
0x676e67 0d30ebfd58
Use corresponds macro (#50)
* 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

* chore: Fix docs on SslRef::replace_ex_data

* Detailed error codes

* Clean up boring_sys::init()

We don't need the workaround that was initially introduced for a bug in
openssl, and OPENSSL_init_ssl always calls into CRYPTO_library_init on
boringssl, so just call it explicitly.

* Expose EVP_HPKE_KEY

* Expose client/server-side ECH

Resolves https://github.com/cloudflare/boring/issues/282

* Clean up ECH tests

* Expose SSL_set_enable_ech_grease

* update

* Use corresponds macro

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
Co-authored-by: Kornel <kornel@cloudflare.com>
Co-authored-by: Rushil Mehra <rmehra@cloudflare.com>
2025-02-14 02:07:41 +08:00
0x676e67 e82939f52e
Expose SSL_set_enable_ech_grease (#49)
* 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

* chore: Fix docs on SslRef::replace_ex_data

* Detailed error codes

* Clean up boring_sys::init()

We don't need the workaround that was initially introduced for a bug in
openssl, and OPENSSL_init_ssl always calls into CRYPTO_library_init on
boringssl, so just call it explicitly.

* Expose EVP_HPKE_KEY

* Expose client/server-side ECH

Resolves https://github.com/cloudflare/boring/issues/282

* Clean up ECH tests

* Expose SSL_set_enable_ech_grease

* update

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
Co-authored-by: Kornel <kornel@cloudflare.com>
Co-authored-by: Rushil Mehra <rmehra@cloudflare.com>
2025-02-13 19:32:46 +08:00
0x676e67 d1f73a9aae
Expose client/server-side ECH (#48)
* 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

* chore: Fix docs on SslRef::replace_ex_data

* Detailed error codes

* Clean up boring_sys::init()

We don't need the workaround that was initially introduced for a bug in
openssl, and OPENSSL_init_ssl always calls into CRYPTO_library_init on
boringssl, so just call it explicitly.

* Expose EVP_HPKE_KEY

* Expose client/server-side ECH

Resolves https://github.com/cloudflare/boring/issues/282

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
Co-authored-by: Kornel <kornel@cloudflare.com>
Co-authored-by: Rushil Mehra <rmehra@cloudflare.com>
2025-02-13 04:46:36 +08:00
0x676e67 dded5d4e8c
Sync `Detailed error codes` and `Clean up boring_sys::init()` (#47)
* 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

* chore: Fix docs on SslRef::replace_ex_data

* Detailed error codes

* Clean up boring_sys::init()

We don't need the workaround that was initially introduced for a bug in
openssl, and OPENSSL_init_ssl always calls into CRYPTO_library_init on
boringssl, so just call it explicitly.

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
Co-authored-by: Kornel <kornel@cloudflare.com>
Co-authored-by: Rushil Mehra <rmehra@cloudflare.com>
2025-02-12 22:49:09 +08:00
0x676e67 2e17f2bc16 v4.15.3 2025-02-11 17:24:26 +08:00
0x676e67 3c63f0b24e
fix: Fix `key share` patch (#46) 2025-02-11 17:18:10 +08:00
0x676e67 4edbff8cad v4.15.2 2025-02-07 13:45:58 +08:00
0x676e67 b48c194d16
feat(boring): Add set_verify_cert_store_ref method to SslContextBuilder (#45) 2025-02-07 13:45:24 +08:00
0x676e67 72424152a9
feat(boring): Add add_cert_compression_alg support (#44) 2025-02-07 13:37:09 +08:00
0x676e67 dbb58741f6 v4.15.1 2025-02-07 12:28:22 +08:00
0x676e67 79949c2a8e chore: Removal unused deps 2025-02-07 12:27:42 +08:00
0x676e67 32492cd4f0
feat: Add `set_options` binding function to ConnectConfiguration (#43) 2025-02-07 12:19:41 +08:00
0x676e67 c6e390a8b8
feat: Add new binding functions to `ConnectConfiguration` (#42) 2025-02-07 12:08:49 +08:00
0x676e67 025f25c5bb chore: update documentation link 2025-02-07 11:52:24 +08:00
0x676e67 ed56d2c06a feat: Removal of `rpk` support 2025-02-07 11:50:05 +08:00
0x676e67 5d33987600
feat: Removal of `rpk` support (#41) 2025-02-07 11:36:39 +08:00
0x676e67 18b295a155 chore: remove unused `hyper-boring` crate 2025-02-07 11:24:58 +08:00
0x676e67 c75345aba4
chore: Fix docs on SslRef::replace_ex_data (#40)
* 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

* chore: Fix docs on SslRef::replace_ex_data

---------

Co-authored-by: Bas Westerbaan <bas@cloudflare.com>
Co-authored-by: Alessandro Ghedini <alessandro@cloudflare.com>
Co-authored-by: Evan Rittenhouse <erittenhouse@cloudflare.com>
2025-02-07 11:01:38 +08:00
0x676e67 7410a00788 v4.15.0 2025-02-02 19:32:21 +08:00
0x676e67 30c6bedc4d
feat: Add ALPS use new endpoint (#39) 2025-02-02 19:29:29 +08:00
0x676e67 af53f4b86e v4.14.2 2025-01-23 10:09:27 +08:00
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
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
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