Commit Graph

15 Commits

Author SHA1 Message Date
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
Rushil Mehra 796afe1637 Allow dead_code instead of disabling clippy entirely for bindgen 2025-01-06 16:12:53 +00:00
Rushil Mehra 5dce4d331b Ignore clippy / rustfmt on autogenerated code 2024-07-30 12:28:38 -07:00
Rushil Mehra 6e9ba1cb96 Clean up legacy const_fn feature gates 2024-07-30 12:28:38 -07:00
Ivan Nikulin d59d170c4d Update docs 2023-07-10 12:29:30 +01:00
Ivan Nikulin d1ee9bfd86 Use workspace metadata for crates 2023-07-10 11:38:18 +01:00
Ivan Nikulin c4e8a94a69 Add RPK and PQ crypto features 2023-07-07 13:50:36 +01:00
Joshua Nelson bd4f8d58ef Fix clippy warnings 2022-09-16 12:13:55 -05:00
Alexis (Poliorcetics) Bourget ccc0128cba chore: update to bindgen 1.60 2022-06-07 02:17:18 -05:00
Robin Lindner 44426292e0 Remove PasswordCallback 2021-12-16 13:09:39 -06:00
Joshua Nelson 57eac7dfc3 Ignore bindgen warnings until they're fixed upstream
We don't have any way of fixing these, and it's not feasible to switch away from bindgen.
Ignore the warnings for now.
2021-07-27 16:21:13 -04:00
Anthony Ramine e13112e3ca Allow uppercase acronyms 2021-04-06 11:44:47 +02:00
Frank Denis 05c6a41270 Use bindgen to automatically generate boring-sys
This ensures that all the Rust functions, types and constants
always match the actual BoringSSL definitions.

It also removes quite a lot of manually maintained code, as well
as the need for systest.

The value for `SslOptions::ALL`, for example, was wrong. On current
BoringSSL versions, this is a no-op, and is set to `0`.

Clearing it does nothing. So, the `clear_ctx_options` test, that
passed by accident, was adjusted to use a different option.

The `libc` crate is not required, as we only use it for types that
are already defined in the standard library. It was removed from
`boring-sys`. The same can be done to other crates later.
2021-02-12 15:03:45 +01:00
Ivan Nikulin fda73f4947 Fix docs 2020-11-11 20:32:53 +00:00
Ivan Nikulin 5cb8947d7e Rename stuff 2020-11-11 17:47:30 +00:00